3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "This dude is a good man"; $bad = array('truck','shot','etc'); $flag='0'; foreach($bad as $word){ if(in_array($word,$string)) { $flag=1; } } if($flag==1) echo "Exist"; else echo "Not Exist";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/SlU81
function name:  (null)
number of ops:  19
compiled vars:  !0 = $string, !1 = $bad, !2 = $flag, !3 = $word
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'This+dude+is+a+good+man'
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, '0'
    6     3      > FE_RESET_R                                       $7      !1, ->12
          4    > > FE_FETCH_R                                               $7, !3, ->12
    7     5    >   INIT_FCALL                                               'in_array'
          6        SEND_VAR                                                 !3
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $8      
          9      > JMPZ                                                     $8, ->11
    9    10    >   ASSIGN                                                   !2, 1
    6    11    > > JMP                                                      ->4
         12    >   FE_FREE                                                  $7
   12    13        IS_EQUAL                                                 !2, 1
         14      > JMPZ                                                     ~10, ->17
   13    15    >   ECHO                                                     'Exist'
         16      > JMP                                                      ->18
   15    17    >   ECHO                                                     'Not+Exist'
         18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.51 ms | 1395 KiB | 15 Q