3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Obj { public $num; public function __construct($num) { $this->num = $num; } } $arr = array(new Obj(1),new Obj(2)) var_dump($arr);
Output for 5.4.0 - 5.4.22, 5.5.0 - 5.5.6
Parse error: syntax error, unexpected 'var_dump' (T_STRING) in /in/EmcIO on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING in /in/EmcIO on line 12
Process exited with code 255.

preferences:
186.57 ms | 1395 KiB | 65 Q