3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 =[ ["id"=> "1", "uid"=>'123', "status"=>'0'], ["id"=> "2", "uid"=>'321', "status"=>'1'] ]; $array2 =[ ["uid"=> "123", "name"=>'张三'], ["uid"=> "321", "name"=>'李四'] ]; $array2 = array_column($array2, 'name', 'uid'); foreach($array1 as &$arr) $arr['uid'] = $array2[$arr['uid']]; var_dump($array1);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> array(3) { ["id"]=> string(1) "1" ["uid"]=> string(6) "张三" ["status"]=> string(1) "0" } [1]=> &array(3) { ["id"]=> string(1) "2" ["uid"]=> string(6) "李四" ["status"]=> string(1) "1" } }

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:
51.99 ms | 402 KiB | 8 Q