3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ "data" => "data", "id_1553539135251" => "<p>nsmn</p>", "about" => "about", "id_1553539141598" => "<p>uiu</p>", ]; $result = []; for ($i = 0; $i < count($array) / 2; $i++) { $subArray = array_slice($array, $i * 2, 2); $result[array_keys($subArray)[1]] = [ 'content' => array_values($subArray)[1], 'header' => array_values($subArray)[0], ]; } var_dump($result);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { ["id_1553539135251"]=> array(2) { ["content"]=> string(11) "<p>nsmn</p>" ["header"]=> string(4) "data" } ["id_1553539141598"]=> array(2) { ["content"]=> string(10) "<p>uiu</p>" ["header"]=> string(5) "about" } }

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:
107.71 ms | 1551 KiB | 4 Q