3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} class Bar {} function takeObject(Object $obj) { var_dump(get_class($obj)); } takeObject(new Foo); takeObject(new Bar); takeObject('not an object');
Output for git.master_jit, git.master, rfc.property-hooks
string(3) "Foo" string(3) "Bar" Fatal error: Uncaught TypeError: takeObject(): Argument #1 ($obj) must be of type object, string given, called in /in/Svuij on line 12 and defined in /in/Svuij:6 Stack trace: #0 /in/Svuij(12): takeObject('not an object') #1 {main} thrown in /in/Svuij on line 6
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:
24.46 ms | 405 KiB | 5 Q