3v4l.org

run code in 300+ PHP versions simultaneously
<?php $final[0] = "San"; $final[1] = "Antonio"; $final[2] = "de"; $final[3] = "Areco"; $final[4] = 1200; foreach ($final as $c => $v) { if (ctype_alpha($v)) { $vuelta1 = ($c+1); var_dump($v); if (ctype_alpha($final[$vuelta1])) { $final[$vuelta1] = $v." ".$final[$vuelta1]; unset($final[$c]); var_export($final); } } } var_dump($final);
Output for git.master, git.master_jit, rfc.property-hooks
string(3) "San" array ( 1 => 'San Antonio', 2 => 'de', 3 => 'Areco', 4 => 1200, )string(7) "Antonio" array ( 2 => 'Antonio de', 3 => 'Areco', 4 => 1200, )string(2) "de" array ( 3 => 'de Areco', 4 => 1200, )string(5) "Areco" Deprecated: ctype_alpha(): Argument of type int will be interpreted as string in the future in /in/Y03IL on line 17 Deprecated: ctype_alpha(): Argument of type int will be interpreted as string in the future in /in/Y03IL on line 12 array(2) { [3]=> string(8) "de Areco" [4]=> int(1200) }

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:
39.99 ms | 402 KiB | 8 Q