3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = new \SplFixedArray(5); for ($i=0; $i<5; $i++) { $foo[$i] = $i*$i; } $index = 4; while (true) { echo "Trying index ($index): "; if (!$foo-> offsetExists($index)) { echo "BREAK!\n"; break; } //echo $foo[$index]."\n"; $index--; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 14
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 14
Branch analysis from position: 27
Branch analysis from position: 14
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
Branch analysis from position: 6
filename:       /in/CBmno
function name:  (null)
number of ops:  28
compiled vars:  !0 = $foo, !1 = $i, !2 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'SplFixedArray'
          1        SEND_VAL_EX                                              5
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    4     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->10
    5     6    >   MUL                                              ~8      !1, !1
          7        ASSIGN_DIM                                               !0, !1
          8        OP_DATA                                                  ~8
    4     9        PRE_INC                                                  !1
         10    >   IS_SMALLER                                               !1, 5
         11      > JMPNZ                                                    ~10, ->6
    8    12    >   ASSIGN                                                   !2, 4
    9    13      > JMP                                                      ->26
   10    14    >   ROPE_INIT                                     3  ~13     'Trying+index+%28'
         15        ROPE_ADD                                      1  ~13     ~13, !2
         16        ROPE_END                                      2  ~12     ~13, '%29%3A+'
         17        ECHO                                                     ~12
   12    18        INIT_METHOD_CALL                                         !0, 'offsetExists'
         19        SEND_VAR_EX                                              !2
         20        DO_FCALL                                      0  $15     
         21        BOOL_NOT                                         ~16     $15
         22      > JMPZ                                                     ~16, ->25
   13    23    >   ECHO                                                     'BREAK%21%0A'
   14    24      > JMP                                                      ->27
   17    25    >   PRE_DEC                                                  !2
    9    26    > > JMPNZ                                                    <true>, ->14
   18    27    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.27 ms | 1395 KiB | 13 Q