3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = ["04" => 1, "09" => 1, "10" => 1, "01" => 1]; for ($x = 1; $x < 11; ++$x) { $key = sprintf("%02d", $x); // ensure proper padding with 0 $result[$key] = $data[$key] ?? 0; // null coalescing operator from php5.6+ } print_r($result);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [01] => 1 [02] => 0 [03] => 0 [04] => 1 [05] => 0 [06] => 0 [07] => 0 [08] => 0 [09] => 1 [10] => 1 )

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:
172.48 ms | 405 KiB | 5 Q