3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace A { const Z = 9; define ('X', 0); } namespace B { const Z = 8; } namespace { use B::Z; //const Z = 7; echo Z; }
Output for 5.4.0 - 5.4.23
Warning: The use statement with non-compound name 'B' has no effect in /in/58UUQ on line 21 Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM), expecting ',' or ';' in /in/58UUQ on line 21
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Warning: The use statement with non-compound name 'B' has no effect in /in/58UUQ on line 21 Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting ',' or ';' in /in/58UUQ on line 21
Process exited with code 255.