3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.13 ms | 1400 KiB | 15 Q