3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php file_put_contents('/tmp/A.php', <<<EOF <?php class a { const a = b::c; const b = b::d; } EOF); file_put_contents('/tmp/B.php', <<<EOF <?php class b { const c = a::b; const d = 1; } EOF); spl_autoload_register(function($class) { require('/tmp/'. $class .'.php'); }); var_dump(A::a, A::b, B::c, B::d);
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected end of file in /in/d1ORL on line 24
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end in /in/d1ORL on line 24
Process exited with code 255.