3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(callable $x) { return $x(42); } function inc($x) { return $x + 1; } echo foo('inc'); echo foo('oops');
Output for rfc.property-hooks, git.master, git.master_jit
43 Fatal error: Uncaught TypeError: foo(): Argument #1 ($x) must be of type callable, string given, called in /in/v9X2P on line 10 and defined in /in/v9X2P:3 Stack trace: #0 /in/v9X2P(10): foo('oops') #1 {main} thrown in /in/v9X2P on line 3
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:
42 ms | 1705 KiB | 4 Q