3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array['ids'] = array( '0' => array( 'id' => 1, 'val' => 'one'), 'delete' => 3, '2' => array( 'id' => 2, 'val' => 'two'), '1' => array( 'id' => 3, 'val' => 'three')); unset($array['ids']['delete']); foreach( $array['ids'] as $ids ) { $ids['new'] = 'new'; } print_r($array); $array['ids'] = array_values($array['ids']); print_r($array);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [ids] => Array ( [0] => Array ( [id] => 1 [val] => one ) [2] => Array ( [id] => 2 [val] => two ) [1] => Array ( [id] => 3 [val] => three ) ) ) Array ( [ids] => Array ( [0] => Array ( [id] => 1 [val] => one ) [1] => Array ( [id] => 2 [val] => two ) [2] => Array ( [id] => 3 [val] => three ) ) )

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:
39.23 ms | 402 KiB | 8 Q