3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); ini_set('display_errors', true); ini_set('html_errors', false); // Simple array: $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"; 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 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 16
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 16
Branch analysis from position: 41
Branch analysis from position: 16
filename:       /in/ppujk
function name:  (null)
number of ops:  42
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                                                 
    3     3        INIT_FCALL                                               'ini_set'
          4        SEND_VAL                                                 'display_errors'
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                                 
    4     7        INIT_FCALL                                               'ini_set'
          8        SEND_VAL                                                 'html_errors'
          9        SEND_VAL                                                 <false>
         10        DO_ICALL                                                 
    6    11        ASSIGN                                                   !0, <array>
    7    12        COUNT                                            ~7      !0
         13        ASSIGN                                                   !1, ~7
    8    14        ASSIGN                                                   !2, 0
         15      > JMP                                                      ->39
    9    16    >   ROPE_INIT                                     3  ~11     '%0AChecking+'
         17        ROPE_ADD                                      1  ~11     ~11, !2
         18        ROPE_END                                      2  ~10     ~11, '%3A+%0A'
         19        ECHO                                                     ~10
   10    20        FETCH_DIM_R                                      ~13     !0, '%24i'
         21        CONCAT                                           ~14     'Bad%3A+', ~13
         22        CONCAT                                           ~15     ~14, '%0A'
         23        ECHO                                                     ~15
   11    24        FETCH_DIM_R                                      ~16     !0, !2
         25        CONCAT                                           ~17     'Good%3A+', ~16
         26        CONCAT                                           ~18     ~17, '%0A'
         27        ECHO                                                     ~18
   12    28        ROPE_INIT                                     3  ~21     'Bad%3A+'
         29        FETCH_DIM_R                                      ~19     !0, '%24i'
         30        ROPE_ADD                                      1  ~21     ~21, ~19
         31        ROPE_END                                      2  ~20     ~21, '%0A'
         32        ECHO                                                     ~20
   13    33        ROPE_INIT                                     3  ~25     'Good%3A+'
         34        FETCH_DIM_R                                      ~23     !0, !2
         35        ROPE_ADD                                      1  ~25     ~25, ~23
         36        ROPE_END                                      2  ~24     ~25, '%0A'
         37        ECHO                                                     ~24
    8    38        PRE_INC                                                  !2
         39    >   IS_SMALLER                                               !2, !1
         40      > JMPNZ                                                    ~28, ->16
   14    41    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.51 ms | 1400 KiB | 17 Q