<?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);
You have javascript disabled. You will not be able to edit any code.