3v4l.org

run code in 300+ PHP versions simultaneously
<?php $instance = new class {}; $class_name = "class@anonymous".chr(0).__FILE__; class_alias($class_name, 'MyAlias'); $d = get_declared_classes(); end($d); var_dump(current($d)); var_dump(new $class_name); var_dump(new MyAlias);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Class "class@anonymous" not found in /in/6sZrf on line 6 string(29) "class@anonymous/in/6sZrf:3$0" Fatal error: Uncaught Error: Class "class@anonymous" not found in /in/6sZrf:11 Stack trace: #0 {main} thrown in /in/6sZrf on line 11
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
60.94 ms | 401 KiB | 8 Q