3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = [ "Ayush" , "Vaibhav", "Shivam", "Hacker", "Topper", "ABCD", "NameR", "Tammi", "Colgate", "Britney"//, "Bra"//, "Kisser" ]; $addthis = 'ADDTHIS'; $every = 3; $arrayvariable = $result; foreach($result as $k=>$value){ if(($k+1)%3==0){ array_splice($arrayvariable, $k+1, 0, "ADDTHIS"); } } var_export($arrayvariable);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'Ayush', 1 => 'Vaibhav', 2 => 'Shivam', 3 => 'ADDTHIS', 4 => 'Hacker', 5 => 'Topper', 6 => 'ADDTHIS', 7 => 'ABCD', 8 => 'NameR', 9 => 'ADDTHIS', 10 => 'Tammi', 11 => 'Colgate', 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:
44.27 ms | 406 KiB | 5 Q