3v4l.org

run code in 300+ PHP versions simultaneously
<?php $first_array = array(1,3,4,5,6); $second_array = array(5,2,1,7,9); $return = array(); foreach($first_array as $key => $value){ if($first_array[$key] > $second_array[$key]){ $return[] = $first_array[$key]; }else{ $return[] = $second_array[$key]; } } print_r($return);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 18
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/cVR9F
function name:  (null)
number of ops:  23
compiled vars:  !0 = $first_array, !1 = $second_array, !2 = $return, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, <array>
    7     3      > FE_RESET_R                                       $8      !0, ->18
          4    > > FE_FETCH_R                                       ~9      $8, !3, ->18
          5    >   ASSIGN                                                   !4, ~9
    8     6        FETCH_DIM_R                                      ~11     !0, !4
          7        FETCH_DIM_R                                      ~12     !1, !4
          8        IS_SMALLER                                               ~12, ~11
          9      > JMPZ                                                     ~13, ->14
    9    10    >   FETCH_DIM_R                                      ~15     !0, !4
         11        ASSIGN_DIM                                               !2
         12        OP_DATA                                                  ~15
    8    13      > JMP                                                      ->17
   11    14    >   FETCH_DIM_R                                      ~17     !1, !4
         15        ASSIGN_DIM                                               !2
         16        OP_DATA                                                  ~17
    7    17    > > JMP                                                      ->4
         18    >   FE_FREE                                                  $8
   15    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.51 ms | 1010 KiB | 14 Q