3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); // Simple array: $array = array(1, 2); print_r($array); $count = count($array); for ($i = 0; $i < $count; $i++) { echo "\nChecking $i: \n"; echo "Bad: " . $array['$i'][1] . "\n"; echo "Good: " . $array[$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 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 11
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 11
Branch analysis from position: 37
Branch analysis from position: 11
filename:       /in/vePQ1
function name:  (null)
number of ops:  38
compiled vars:  !0 = $array, !1 = $count, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
    4     3        ASSIGN                                                   !0, <array>
    5     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    6     7        COUNT                                            ~6      !0
          8        ASSIGN                                                   !1, ~6
    7     9        ASSIGN                                                   !2, 0
         10      > JMP                                                      ->35
    8    11    >   ROPE_INIT                                     3  ~10     '%0AChecking+'
         12        ROPE_ADD                                      1  ~10     ~10, !2
         13        ROPE_END                                      2  ~9      ~10, '%3A+%0A'
         14        ECHO                                                     ~9
    9    15        FETCH_DIM_R                                      ~12     !0, '%24i'
         16        FETCH_DIM_R                                      ~13     ~12, 1
         17        CONCAT                                           ~14     'Bad%3A+', ~13
         18        CONCAT                                           ~15     ~14, '%0A'
         19        ECHO                                                     ~15
   10    20        FETCH_DIM_R                                      ~16     !0, !2
         21        CONCAT                                           ~17     'Good%3A+', ~16
         22        CONCAT                                           ~18     ~17, '%0A'
         23        ECHO                                                     ~18
   11    24        ROPE_INIT                                     3  ~21     'Bad%3A+'
         25        FETCH_DIM_R                                      ~19     !0, '%24i'
         26        ROPE_ADD                                      1  ~21     ~21, ~19
         27        ROPE_END                                      2  ~20     ~21, '%0A'
         28        ECHO                                                     ~20
   12    29        ROPE_INIT                                     3  ~25     'Good%3A+'
         30        FETCH_DIM_R                                      ~23     !0, !2
         31        ROPE_ADD                                      1  ~25     ~25, ~23
         32        ROPE_END                                      2  ~24     ~25, '%0A'
         33        ECHO                                                     ~24
    7    34        PRE_INC                                                  !2
         35    >   IS_SMALLER                                               !2, !1
         36      > JMPNZ                                                    ~28, ->11
   13    37    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.56 ms | 1396 KiB | 17 Q