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', ); $result = []; foreach ($hot as $key => $value) { $result[] = $value; if(isset($new[$key])){ $result[] = $new[$key]; } } 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:
35.32 ms | 401 KiB | 8 Q