3v4l.org

run code in 300+ PHP versions simultaneously
<?php START: $array = array(array("id" => "xxx","name" => "blah","highlight" => 0),array("id" => "yyy","name" => "blahblah","highlight" => 1),array("id" => "zzz","name" => "blahblahblah","highlight" => 0)); ​10: $num = - 1; ​20: $found = array(); ​30: $total = count($array); ​40: $num ++; ​50: if ($num >= $total) goto ​80; ​60: if ($array[$num]['highlight'] == 1) $found[] = $array[$num]; ​70: goto ​40; ​80: print_r($found); END:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 16
filename:       /in/dVtfH
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array, !1 = $num, !2 = $found, !3 = $total
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, -1
    4     2        ASSIGN                                                   !2, <array>
    5     3        COUNT                                            ~7      !0
          4        ASSIGN                                                   !3, ~7
    6     5    >   PRE_INC                                                  !1
    7     6        IS_SMALLER_OR_EQUAL                                      !3, !1
          7      > JMPZ                                                     ~10, ->9
          8    > > JMP                                                      ->17
    8     9    >   FETCH_DIM_R                                      ~11     !0, !1
         10        FETCH_DIM_R                                      ~12     ~11, 'highlight'
         11        IS_EQUAL                                                 ~12, 1
         12      > JMPZ                                                     ~13, ->16
         13    >   FETCH_DIM_R                                      ~15     !0, !1
         14        ASSIGN_DIM                                               !2
         15        OP_DATA                                                  ~15
    9    16    > > JMP                                                      ->5
   10    17    >   INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
   11    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.69 ms | 1400 KiB | 15 Q