3v4l.org

run code in 300+ PHP versions simultaneously
<?php function show_spanish($n, $m) { return ("Nomor $n di spanyol disebut dengan $m"); } function map_spanish($n, $m) { return (array($n => $m)); } $off == array( array("1" => "uno"), array("2" => "dos"), array("3" => "tres"), array("4" => "cuatro"), array("5" => "cinco") ); $c = array_map("show_spanish", $off); print_r($c); $d = array_map("map_spanish", $off); print_r($d);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $off in /in/bTJPn on line 13 Warning: Undefined variable $off in /in/bTJPn on line 20 Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /in/bTJPn:20 Stack trace: #0 /in/bTJPn(20): array_map('show_spanish', NULL) #1 {main} thrown in /in/bTJPn on line 20
Process exited with code 255.

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:
47.7 ms | 401 KiB | 8 Q