3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(bool $bar) { return $bar === true; } var_dump(foo(true)); // returns true function fubar(stdObject $bar) { return $bar == true; } var_dump(fubar(true)); // returns true
Output for git.master, git.master_jit
bool(true) Fatal error: Uncaught TypeError: fubar(): Argument #1 ($bar) must be of type stdObject, bool given, called in /in/83L8W on line 15 and defined in /in/83L8W:10 Stack trace: #0 /in/83L8W(15): fubar(true) #1 {main} thrown in /in/83L8W on line 10
Process exited with code 255.
Output for rfc.property-hooks
bool(true) Fatal error: Uncaught TypeError: fubar(): Argument #1 ($bar) must be of type stdObject, true given, called in /in/83L8W on line 15 and defined in /in/83L8W:10 Stack trace: #0 /in/83L8W(15): fubar(true) #1 {main} thrown in /in/83L8W on line 10
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:
85.59 ms | 407 KiB | 5 Q