3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tokens = array(); $conditions = array(); for ($i = 0; $i <= 10; $i++) { $tokens[$i] = $conditions; // First integer must be less than 8 // and second must be 8, 9 or 10 if ($i !== 0 && $i !== 8) { continue; } // Add condition and then pop off straight away. // Can also use array_shift() here. $conditions[$i] = true; $oldCondition = array_pop($conditions); } // Conditions should be empty. print_r($conditions);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 4
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 4
Branch analysis from position: 21
Branch analysis from position: 4
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 4
Branch analysis from position: 21
Branch analysis from position: 4
Branch analysis from position: 10
filename:       /in/mR874
function name:  (null)
number of ops:  25
compiled vars:  !0 = $tokens, !1 = $conditions, !2 = $i, !3 = $oldCondition
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->19
    5     4    >   ASSIGN_DIM                                               !0, !2
          5        OP_DATA                                                  !1
    9     6        IS_NOT_IDENTICAL                                 ~8      !2, 0
          7      > JMPZ_EX                                          ~8      ~8, ->10
          8    >   IS_NOT_IDENTICAL                                 ~9      !2, 8
          9        BOOL                                             ~8      ~9
         10    > > JMPZ                                                     ~8, ->12
   10    11    > > JMP                                                      ->18
   15    12    >   ASSIGN_DIM                                               !1, !2
         13        OP_DATA                                                  <true>
   16    14        INIT_FCALL                                               'array_pop'
         15        SEND_REF                                                 !1
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !3, $11
    4    18    >   PRE_INC                                                  !2
         19    >   IS_SMALLER_OR_EQUAL                                      !2, 10
         20      > JMPNZ                                                    ~14, ->4
   20    21    >   INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.79 ms | 1396 KiB | 17 Q