Anonymous View

3v4l.org

run code in 500+ PHP versions simultaneously
<?php //$_POST['event_id'] = '1'; function executeDone() { $eventId = (isset($_POST['event_id'])) ? (int)$_POST['event_id'] : ''; var_dump($eventId); } $res = executeDone(); class ZooMine { private $userId; public function __construct($userId) { $this->userId = $userId; } public function process($userId) { $obj = new ZooMine($userId); } } $userId = '123456'; ZooMine::process($userId);
Output for 8.2.31, 8.3.0 - 8.3.31, 8.4.1 - 8.4.22, 8.5.0 - 8.5.7
string(0) "" Fatal error: Uncaught Error: Non-static method ZooMine::process() cannot be called statically in /in/MBZ1L:22 Stack trace: #0 {main} thrown in /in/MBZ1L on line 22
Process exited with code 255.

preferences:
42.51 ms | 760 KiB | 4 Q