3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hello(int $n, bool $m): 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,count($a),true)); print_r($c);

preferences:
28.79 ms | 406 KiB | 5 Q