3v4l.org

run code in 300+ PHP versions simultaneously
<?php $one = "4,5,5,4,7"; $two = "3,5,6,4,2"; $aone = explode(",", $one); $atwo = explode(",", $two); $result= ""; For($i=0;$i<count($aone);$i++){ If($atwo[$i] > $aone[$i]){ $result[] = $atwo[$i]; }else{ $result[] = $aone[$i]; } } Var_dump($result); $str = implode(",", $result); Echo $str;
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: [] operator not supported for strings in /in/SuNsI:14 Stack trace: #0 {main} thrown in /in/SuNsI on line 14
Process exited with code 255.

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