3v4l.org

run code in 300+ PHP versions simultaneously
<?php function example($foo) { print $foo; } // Prints ``, nothing. example(null); // Prints `1`, boolean is cast to integer and cast to a string. example(true); // Prints `0` example(0); // Fatal error: Object of class stdClass could not be converted to string. example(new \stdClass);
Output for git.master_jit, git.master, rfc.property-hooks
10 Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /in/Ih38v:5 Stack trace: #0 /in/Ih38v(18): example(Object(stdClass)) #1 {main} thrown in /in/Ih38v on line 5
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:
22.76 ms | 405 KiB | 5 Q