3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); class A { static public function test() { echo 'hallo'; } } $a = new A; $a->test(); $a = array(); $echo $a['foo'];
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected '$a' (T_VARIABLE) in /in/CQ4oO on line 17
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/CQ4oO on line 17
Process exited with code 255.

preferences:
181.66 ms | 1395 KiB | 67 Q