3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1, 2); $count = count($array); for ($i = 0; $i < $count; $i++) { echo "\nChecking $i: \n"; echo "Bad: " . $array['$i'] . "\n"; echo "Good: " . $array[$i] . "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 5
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 5
Branch analysis from position: 20
Branch analysis from position: 5
filename:       /in/CiVsK
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array, !1 = $count, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        COUNT                                            ~4      !0
          2        ASSIGN                                                   !1, ~4
    5     3        ASSIGN                                                   !2, 0
          4      > JMP                                                      ->18
    6     5    >   ROPE_INIT                                     3  ~8      '%0AChecking+'
          6        ROPE_ADD                                      1  ~8      ~8, !2
          7        ROPE_END                                      2  ~7      ~8, '%3A+%0A'
          8        ECHO                                                     ~7
    7     9        FETCH_DIM_R                                      ~10     !0, '%24i'
         10        CONCAT                                           ~11     'Bad%3A+', ~10
         11        CONCAT                                           ~12     ~11, '%0A'
         12        ECHO                                                     ~12
    8    13        FETCH_DIM_R                                      ~13     !0, !2
         14        CONCAT                                           ~14     'Good%3A+', ~13
         15        CONCAT                                           ~15     ~14, '%0A'
         16        ECHO                                                     ~15
    5    17        PRE_INC                                                  !2
         18    >   IS_SMALLER                                               !2, !1
         19      > JMPNZ                                                    ~17, ->5
   10    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.37 ms | 1394 KiB | 13 Q