3v4l.org

run code in 300+ PHP versions simultaneously
<?php $blah = false; echo "calling function \n"; try { test($blah); }catch(\Error $e){ echo "Caught\n"; print_r($e); } function test(array $val){ echo "inside test \n"; print_r($val); echo "\n"; } echo "done\n";
Output for git.master, git.master_jit
calling function Caught TypeError Object ( [message:protected] => test(): Argument #1 ($val) must be of type array, bool given, called in /in/NaqVg on line 8 [string:Error:private] => [code:protected] => 0 [file:protected] => /in/NaqVg [line:protected] => 14 [trace:Error:private] => Array ( [0] => Array ( [file] => /in/NaqVg [line] => 8 [function] => test [args] => Array ( [0] => ) ) ) [previous:Error:private] => ) done
Output for rfc.property-hooks
calling function Caught TypeError Object ( [message:protected] => test(): Argument #1 ($val) must be of type array, false given, called in /in/NaqVg on line 8 [string:Error:private] => [code:protected] => 0 [file:protected] => /in/NaqVg [line:protected] => 14 [trace:Error:private] => Array ( [0] => Array ( [file] => /in/NaqVg [line] => 8 [function] => test [args] => Array ( [0] => ) ) ) [previous:Error:private] => ) done

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:
46.85 ms | 402 KiB | 8 Q