3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pageNumber = 1; $pageHeight = 7; $commands = [ "foo" => ["name" => "foo", "desc" => "Foo Desc", "perm" => true], "fuu" => ["name" => "fuu", "desc" => "Fuu Desc", "perm" => false], "bar" => ["name" => "bar", "desc" => "Foo Desc", "perm" => true], ]; ksort($commands, SORT_NATURAL | SORT_FLAG_CASE); $commands = array_chunk($commands, $pageHeight); $pageNumber = (int) min(count($commands), $pageNumber); printf("PageNumber=%d, CountCommands=%d", $pageNumber, count($commands)); foreach($commands[$pageNumber - 1] as $command){ printf("Name=%s, Desc=%s", $command["name"], $command["desc"]); }
Output for git.master, git.master_jit, rfc.property-hooks
PageNumber=1, CountCommands=1Name=bar, Desc=Foo DescName=foo, Desc=Foo DescName=fuu, Desc=Fuu Desc

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