3v4l.org

run code in 500+ 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;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 15
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 15
Branch analysis from position: 30
Branch analysis from position: 15
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 15
Branch analysis from position: 30
Branch analysis from position: 15
filename:       /in/SuNsI
function name:  (null)
number of ops:  37
compiled vars:  !0 = $one, !1 = $two, !2 = $aone, !3 = $atwo, !4 = $result, !5 = $i, !6 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '4%2C5%2C5%2C4%2C7'
    4     1        ASSIGN                                                       !1, '3%2C5%2C6%2C4%2C2'
    6     2        INIT_FCALL                                                   'explode'
          3        SEND_VAL                                                     '%2C'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $9      
          6        ASSIGN                                                       !2, $9
    7     7        INIT_FCALL                                                   'explode'
          8        SEND_VAL                                                     '%2C'
          9        SEND_VAR                                                     !1
         10        DO_ICALL                                             $11     
         11        ASSIGN                                                       !3, $11
    9    12        ASSIGN                                                       !4, ''
   10    13        ASSIGN                                                       !5, 0
         14      > JMP                                                          ->27
   11    15    >   FETCH_DIM_R                                          ~15     !3, !5
         16        FETCH_DIM_R                                          ~16     !2, !5
         17        IS_SMALLER                                                   ~16, ~15
         18      > JMPZ                                                         ~17, ->23
   12    19    >   FETCH_DIM_R                                          ~19     !3, !5
         20        ASSIGN_DIM                                                   !4
         21        OP_DATA                                                      ~19
   11    22      > JMP                                                          ->26
   14    23    >   FETCH_DIM_R                                          ~21     !2, !5
         24        ASSIGN_DIM                                                   !4
         25        OP_DATA                                                      ~21
   10    26    >   PRE_INC                                                      !5
         27    >   COUNT                                                ~23     !2
         28        IS_SMALLER                                                   !5, ~23
         29      > JMPNZ                                                        ~24, ->15
   18    30    >   INIT_FCALL                                                   'var_dump'
         31        SEND_VAR                                                     !4
         32        DO_ICALL                                                     
   20    33        FRAMELESS_ICALL_2                implode             ~26     '%2C', !4
         34        ASSIGN                                                       !6, ~26
   21    35        ECHO                                                         !6
         36      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.08 ms | 2461 KiB | 15 Q