3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hot = array( 'hotObj 1', 'hotObj 2', 'hotObj 3', 'hotObj 4', ); $new = array( 'newObj 1', 'newObj 2', ); $count = (count($hot) > count($new)) ? count($hot) : count($new); $result = []; for($i= 0; $i < $count;$i++){ if(isset($hot[$i])){ $result[] = $hot[$i]; } if(isset($new[$i])){ $result[] = $new[$i]; } } print_r($result);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => hotObj 1 [1] => newObj 1 [2] => hotObj 2 [3] => newObj 2 [4] => hotObj 3 [5] => hotObj 4 )

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:
30.01 ms | 405 KiB | 5 Q