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);

preferences:
27.45 ms | 406 KiB | 5 Q