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.3.0 - 5.4.28
Parse error: syntax error, unexpected ';' in /in/7HNlr on line 10
Process exited with code 255.