3v4l.org

run code in 300+ PHP versions simultaneously
<?php $names = [ "Ayush" , "Vaibhav", "Shivam", "Hacker", "Topper", "ABCD", "NameR", "Tammi", "Colgate", "Britney"//, "Bra"//, "Kisser" ]; $addThis = 'ADDTHIS'; $every = 3; for ( $count = count($names), $pos = $count - ($count % $every); $pos > 0; $pos -= $every ) { array_splice($names, $pos, 0, $addThis); } var_export($names);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'Ayush', 1 => 'Vaibhav', 2 => 'Shivam', 3 => 'ADDTHIS', 4 => 'Hacker', 5 => 'Topper', 6 => 'ABCD', 7 => 'ADDTHIS', 8 => 'NameR', 9 => 'Tammi', 10 => 'Colgate', 11 => 'ADDTHIS', 12 => 'Britney', )

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:
85.69 ms | 406 KiB | 5 Q