run code in 200+ php & hhvm versions
Bugs & Features
<?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") ); $expected = array( "clientId"=>array("1001","1002","1003"), "clientName"=>array("aaaaa","bbbbbb","ccccc"), "clientAdsress"=>array("ddddddd","ddddddd","ddddddd"), "clientPhone"=>array("22222222","11111111","33333333") ); $result = []; foreach($keyArray as $key => $keyName) { foreach($valuesArray as $value) { $result[$keyName][] = $value[$key]; } } var_dump($result === $expected);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)