3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a1 = array('J.S.S 1','J.S.S 2','J.S.S 3','S.S 1','S.S 2','S.S 3','Primary One','Primary Two','Primary Three','Primary Four','Primary Five','Primary Six'); $b1 = ['S.S 2','S.S 3']; $found = false; foreach($b1 as $b) { if(in_array($b, $a1)) { $found = true; break; } } var_dump($found);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 13
Branch analysis from position: 13
filename:       /in/Z4N6j
function name:  (null)
number of ops:  18
compiled vars:  !0 = $a1, !1 = $b1, !2 = $found, !3 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
    7     2        ASSIGN                                                   !2, <false>
    8     3      > FE_RESET_R                                       $7      !1, ->13
          4    > > FE_FETCH_R                                               $7, !3, ->13
    9     5    >   INIT_FCALL                                               'in_array'
          6        SEND_VAR                                                 !3
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $8      
          9      > JMPZ                                                     $8, ->12
   10    10    >   ASSIGN                                                   !2, <true>
   11    11      > JMP                                                      ->13
    8    12    > > JMP                                                      ->4
         13    >   FE_FREE                                                  $7
   15    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
234.01 ms | 1000 KiB | 15 Q