3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { } $array = array(new A, new A, new A); foreach($array as A $a) { var_dump($a); }
Output for 5.4.0 - 5.4.14
Parse error: syntax error, unexpected '$a' (T_VARIABLE), expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/ZmMH4 on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.24
Parse error: syntax error, unexpected T_VARIABLE, expecting T_PAAMAYIM_NEKUDOTAYIM in /in/ZmMH4 on line 9
Process exited with code 255.