3v4l.org

run code in 300+ PHP versions simultaneously
<?php $total = 7; $array = [1, 2]; // Dynamic, will be what you get from db. $array += array_fill(count($array), $total - count($array), 'empty'); var_dump($array);
Output for git.master, git.master_jit, rfc.property-hooks
array(7) { [0]=> int(1) [1]=> int(2) [2]=> string(5) "empty" [3]=> string(5) "empty" [4]=> string(5) "empty" [5]=> string(5) "empty" [6]=> string(5) "empty" }

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