3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=array("a"=>"red","b"=>"green","c"=>"blue"); $found = false; $string = "red"; foreach($a as $item) { if($found == false) { preg_match("red",$item); } } echo $found; ?>
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 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/TUNEM
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $found, !2 = $string, !3 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <false>
    4     2        ASSIGN                                                   !2, 'red'
    5     3      > FE_RESET_R                                       $7      !0, ->12
          4    > > FE_FETCH_R                                               $7, !3, ->12
    6     5    >   BOOL_NOT                                         ~8      !1
          6      > JMPZ                                                     ~8, ->11
    7     7    >   INIT_FCALL                                               'preg_match'
          8        SEND_VAL                                                 'red'
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                                 
    5    11    > > JMP                                                      ->4
         12    >   FE_FREE                                                  $7
   10    13        ECHO                                                     !1
   11    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
212.84 ms | 1395 KiB | 15 Q