3v4l.org

run code in 300+ PHP versions simultaneously
<?php $instance = new class {}; $class_name = get_class($instance); $new_instance = new $class_name; class_alias($class_name, 'MyAlias'); var_dump($instance, $class_name, $new_instance, new MyAlias); // $x = "class@anonymous".chr(0).'/foo'; new $x; $d = get_declared_classes(); end($d); var_dump(current($d));
Output for git.master, git.master_jit, rfc.property-hooks
object(class@anonymous)#1 (0) { } string(29) "class@anonymous/in/i7Xul:3$0" object(class@anonymous)#2 (0) { } object(class@anonymous)#3 (0) { } Fatal error: Uncaught Error: Class "class@anonymous" not found in /in/i7Xul:13 Stack trace: #0 {main} thrown in /in/i7Xul on line 13
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:
56.92 ms | 401 KiB | 8 Q