3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace A { class A{ const Z = 9; define ('X', 0); } } namespace B { class B { const Z = 8; } } namespace { use B as BB; const Z = 7; echo BB::Z; }
Output for 5.4.0 - 5.4.23
Parse error: syntax error, unexpected 'define' (T_STRING), expecting function (T_FUNCTION) in /in/OVJ5Q on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /in/OVJ5Q on line 7
Process exited with code 255.