3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} var_dump( $o = (object) array( "0*\0bar" => 1, "\0Foo\0baz" => 2, ) ); function bar(Foo $foo) { var_dump($foo); } bar($o);
Output for git.master, git.master_jit, rfc.property-hooks
object(stdClass)#1 (2) { ["0*bar"]=> int(1) ["baz":"Foo":private]=> int(2) } Fatal error: Uncaught TypeError: bar(): Argument #1 ($foo) must be of type Foo, stdClass given, called in /in/hAf7F on line 16 and defined in /in/hAf7F:11 Stack trace: #0 /in/hAf7F(16): bar(Object(stdClass)) #1 {main} thrown in /in/hAf7F 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:
67.65 ms | 406 KiB | 5 Q