3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = [ [ "id" => "A12312", "status" => false, "enabled" => true, ], [ "id" => "A12313", "status" => false, "enabled" => false, ], [ "id" => "A12314", "status" => true, "enabled" => false, ], [ "id" => "A12315", "status" => true, "enabled" => true, ], ]; $ids = array_column($input, 'id'); $result = array_combine($ids, $input); var_dump($result);
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { ["A12312"]=> array(3) { ["id"]=> string(6) "A12312" ["status"]=> bool(false) ["enabled"]=> bool(true) } ["A12313"]=> array(3) { ["id"]=> string(6) "A12313" ["status"]=> bool(false) ["enabled"]=> bool(false) } ["A12314"]=> array(3) { ["id"]=> string(6) "A12314" ["status"]=> bool(true) ["enabled"]=> bool(false) } ["A12315"]=> array(3) { ["id"]=> string(6) "A12315" ["status"]=> bool(true) ["enabled"]=> bool(true) } }

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:
143.99 ms | 407 KiB | 5 Q