3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['id' => 1, 'title' => '1', 'level' => ['id' => 1], 'status' => ['id' => 1]], ['id' => 2, 'title' => '2', 'level' => ['id' => 2], 'status' => ['id' => 2]] ]; foreach($array as $id => $content) { $array[$id]['level'] = $content['level']['id']; $array[$id]['status'] = $content['status']['id']; } var_dump($array);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> array(4) { ["id"]=> int(1) ["title"]=> string(1) "1" ["level"]=> int(1) ["status"]=> int(1) } [1]=> array(4) { ["id"]=> int(2) ["title"]=> string(1) "2" ["level"]=> int(2) ["status"]=> int(2) } }

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