3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ 'username' => [ '3805120' => 5, '3805121' => 7, ], 'login' => [ '3805120' => 9, '3805121' => 11, ], ]; $result = array_merge_recursive( array_combine(array_map(function($value) { return 'U'.$value; }, array_keys($data['username'])), $data['username']), array_combine(array_map(function($value) { return 'U'.$value; }, array_keys($data['login'])), $data['login']) ); $result = array_combine( array_map(function($value) { return substr($value, 1); }, array_keys($result)), $result ); var_dump($result);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [3805120]=> array(2) { [0]=> int(5) [1]=> int(9) } [3805121]=> array(2) { [0]=> int(7) [1]=> int(11) } }

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