3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( 'aM' => array ( 0 => array ( 'iId' => 0, 'iTime' => 00 ), 1 => Array ( 'iId' => 1, 'iTime' => 11 ), 2 => array ( 'iId' => 2, 'iTime' => 22 ), ), 'aN' => array ( 0 => array ( 'sName' => 'a' ), 1 => array ( 'sName' => 'b' ), 2 => array ( 'sName' => 'v' ), ) ); $aM = $array['aM']; $aN = $array['aN']; $iter = new MultipleIterator; $iter->attachIterator( new ArrayIterator( $aM)); $iter->attachIterator( new ArrayIterator( $aN)); foreach( $iter as $data) { list( $a, $b) = $data; echo $a['iId'] . ' ' . $b['sName'] . ','; }
Output for 5.3.0 - 7.1.0
0 a,1 b,2 v,
Output for 5.0.0 - 5.2.17
Fatal error: Class 'MultipleIterator' not found in /in/gj7nr on line 46
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: multipleiterator in /in/gj7nr on line 46
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: multipleiterator in /in/gj7nr on line 46