3v4l.org

run code in 300+ PHP versions simultaneously
<?php $workers = array(); $workers[0] = array('a' =>1, 'b'=> 34, 'unitId'=>4); $workers[1] = array('a' =>1, 'b'=> 34, 'unitId'=>5); $workers[2] = array('a' =>1, 'b'=> 34, 'unitId'=>6); $workers[3] = array('a' =>1, 'b'=> 34, 'unitId'=>7); $workers[4] = array('a' =>1, 'b'=> 34, 'unitId'=>8); $workers[5] = array('a' =>1, 'b'=> 34, 'unitId'=>9); $units = array(); foreach($workers as $worker){ $units[] = $worker['unitId']; } var_dump($units);
Output for git.master, git.master_jit, rfc.property-hooks
array(6) { [0]=> int(4) [1]=> int(5) [2]=> int(6) [3]=> int(7) [4]=> int(8) [5]=> int(9) }

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:
51.62 ms | 401 KiB | 8 Q