3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ids = [ 572149922960422, 1586735531587728, 1084479334908663, 9875443331682, 9291002010388, 2108382717199939, 911647002295982, 100222991929377 ]; $names = [ "John Doe", "Jane Doe", "Shawn Smith", "Jack Nickleson", "Brad Pitt", "Chad Kroger", "Angelina Jolie", "Bruce Campell" ]; function customCombine($combined){ $final = []; $i = 0; foreach($combined as $id => $name){ $final[$i]['member_id'] = $id; $final[$i]['member_name'] = $name; $i++; } return $final; } print_r(customCombine(array_combine($ids,$names)));

preferences:
54.28 ms | 402 KiB | 5 Q