3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = "a_b_c"; $array2 = array("a","c","d","e"); $promotion = explode("_",$array1); foreach($promotion as $promo) { if(in_array($promo,$array2)) { print_r($promo); break; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 19
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 19
Branch analysis from position: 19
filename:       /in/NYWGc
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array1, !1 = $array2, !2 = $promotion, !3 = $promo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'a_b_c'
    3     1        ASSIGN                                                   !1, <array>
    8     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '_'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
   10     7      > FE_RESET_R                                       $8      !2, ->19
          8    > > FE_FETCH_R                                               $8, !3, ->19
   12     9    >   INIT_FCALL                                               'in_array'
         10        SEND_VAR                                                 !3
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $9      
         13      > JMPZ                                                     $9, ->18
   14    14    >   INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                                 
   15    17      > JMP                                                      ->19
   10    18    > > JMP                                                      ->8
         19    >   FE_FREE                                                  $8
   17    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.68 ms | 1395 KiB | 19 Q