3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( 'first_name' => array( 0 => 'Ben', 1 => 'Tom', 2 => 'Sarah', ), 'last_name' => array( 0 => 'Wills', 1 => 'Main', 2 => 'Bliss', ), 'email' => array( 0 => 'ben.wills@argh.com', 1 => 'tommain@argh.com', 2 => 'sbliss@argh.com', ), ); $mi = new MultipleIterator(MultipleIterator::MIT_NEED_ALL | MultipleIterator::MIT_KEYS_ASSOC); foreach($data as $key => $column) { $mi->attachIterator(new ArrayIterator($column), $key); } $newData = []; foreach($mi as $row) { $newData[] = $row; } var_dump($newData);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> array(3) { ["first_name"]=> string(3) "Ben" ["last_name"]=> string(5) "Wills" ["email"]=> string(18) "ben.wills@argh.com" } [1]=> array(3) { ["first_name"]=> string(3) "Tom" ["last_name"]=> string(4) "Main" ["email"]=> string(16) "tommain@argh.com" } [2]=> array(3) { ["first_name"]=> string(5) "Sarah" ["last_name"]=> string(5) "Bliss" ["email"]=> string(15) "sbliss@argh.com" } }

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:
131.96 ms | 406 KiB | 5 Q