3v4l.org

run code in 300+ PHP versions simultaneously
<?php class App{ protected $controller = 'home'; protected $method = 'index'; protected $params[]; public function __construct(){ // echo 'OK!!!'; $this->parseUrl(); } public function parseUrl(){ if(isset($_GET['url'])){ echo $_GET['url']; } } }
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.30
Parse error: syntax error, unexpected '[', expecting ',' or ';' in /in/SHn3R on line 5
Process exited with code 255.

preferences:
277.54 ms | 1395 KiB | 67 Q