3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ 0 => [7 => 'foo', 13 => 'foo'], 1 => [2 => 'foo', 25 => 'foo'], 4 => [24 => 'foo'], ]; $data = array_combine(array_map(function ($key) { return ++$key; }, array_keys($data)), $data); array_walk($data, function(&$data) { $data = array_combine(array_map(function ($key) { return ++$key; }, array_keys($data)), $data); }); var_dump($data);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [1]=> array(2) { [8]=> string(3) "foo" [14]=> string(3) "foo" } [2]=> array(2) { [3]=> string(3) "foo" [26]=> string(3) "foo" } [5]=> array(1) { [25]=> string(3) "foo" } }

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