3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hello(int $n, ?bool $m = false): string { $m = $m ? 'true' : 'false'; return "The number {$n} is called {$m}"; } $a = [1, 2, 3, 4, 5]; $c = array_map('hello', $a, array_fill(0,2,true)); print_r($c);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => The number 1 is called true [1] => The number 2 is called true [2] => The number 3 is called false [3] => The number 4 is called false [4] => The number 5 is called false )

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:
81.14 ms | 406 KiB | 5 Q