3v4l.org

run code in 300+ PHP versions simultaneously
<?php $def = array('a'=>1, 'b'=>2); //////// $arr_lang = array('de' => array('a'=>3, 'c'=>4)); $arr_lang = array_map(function ($l) { return array_merge($def, $l); }, $arr_lang); ////// print_r($arr_lang);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $def in /in/Ma3kR on line 16 Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in /in/Ma3kR:16 Stack trace: #0 /in/Ma3kR(16): array_merge(NULL, Array) #1 [internal function]: {closure}(Array) #2 /in/Ma3kR(15): array_map(Object(Closure), Array) #3 {main} thrown in /in/Ma3kR on line 16
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:
44.1 ms | 401 KiB | 8 Q