3v4l.org

run code in 200+ PHP versions simultaneously
<?php $keyArray = array("clientId","clientName","clientAdsress","clientPhone"); $valuesArray = array( "0"=>array("1001","aaaaa","ddddddd","22222222"), "1"=>array("1002","bbbbbb","ddddddd","11111111"), "2"=>array("1003","ccccc","ddddddd","33333333") ); $finalData = array_combine($keyArray, array(array_column($valuesArray, 0), array_column($valuesArray, 1), array_column($valuesArray, 2), array_column($valuesArray, 3))); print_r($finalData);

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch php-master
Array ( [clientId] => Array ( [0] => 1001 [1] => 1002 [2] => 1003 ) [clientName] => Array ( [0] => aaaaa [1] => bbbbbb [2] => ccccc ) [clientAdsress] => Array ( [0] => ddddddd [1] => ddddddd [2] => ddddddd ) [clientPhone] => Array ( [0] => 22222222 [1] => 11111111 [2] => 33333333 ) )
Output for branch php-master+opcache
Array ( [clientId] => Array ( [0] => 1001 [1] => 1002 [2] => 1003 ) [clientName] => Array ( [0] => aaaaa [1] => bbbbbb [2] => ccccc ) [clientAdsress] => Array ( [0] => ddddddd [1] => ddddddd [2] => ddddddd ) [clientPhone] => Array ( [0] => 22222222 [1] => 11111111 [2] => 33333333 ) )
Output for branch php-master+jit
Array ( [clientId] => Array ( [0] => 1001 [1] => 1002 [2] => 1003 ) [clientName] => Array ( [0] => aaaaa [1] => bbbbbb [2] => ccccc ) [clientAdsress] => Array ( [0] => ddddddd [1] => ddddddd [2] => ddddddd ) [clientPhone] => Array ( [0] => 22222222 [1] => 11111111 [2] => 33333333 ) )

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