3v4l.org

run code in 500+ PHP versions simultaneously
<?php function print_line(string $output): void { echo $output . PHP_EOL; } $rel = [ 'noopener' => true, 'external' => false, 'nofollow' => true, ]; $compiled = array_map(function ($k,$v) { return $k; }, $rel); print_r($compiled);
Output for 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure:/in/hMrLA:12}(), 1 passed and exactly 2 expected in /in/hMrLA:12 Stack trace: #0 [internal function]: {closure:/in/hMrLA:12}(true) #1 /in/hMrLA(12): array_map(Object(Closure), Array) #2 {main} thrown in /in/hMrLA on line 12
Process exited with code 255.
Output for 8.3.0 - 8.3.30
Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed and exactly 2 expected in /in/hMrLA:12 Stack trace: #0 [internal function]: {closure}(true) #1 /in/hMrLA(12): array_map(Object(Closure), Array) #2 {main} thrown in /in/hMrLA on line 12
Process exited with code 255.

preferences:
39.93 ms | 723 KiB | 4 Q