3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'abc'; echo $str[TRUE]; // Notice: String offset cast occurred echo $str[NULL]; // Notice: String offset cast occurred echo $str[[]]; // Warning: Illegal offset type $int = 123; echo $int[1]; // no error echo $int[TRUE]; // no error echo $int[[]]; // no error $bool = TRUE; echo $bool[1]; // no error echo $bool[TRUE]; // no error echo $bool[[]]; // no error
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JCXR1
function name:  (null)
number of ops:  22
compiled vars:  !0 = $str, !1 = $int, !2 = $bool
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'abc'
    5     1        FETCH_DIM_R                                      ~4      !0, <true>
          2        ECHO                                                     ~4
    6     3        FETCH_DIM_R                                      ~5      !0, null
          4        ECHO                                                     ~5
    7     5        FETCH_DIM_R                                      ~6      !0, <array>
          6        ECHO                                                     ~6
    9     7        ASSIGN                                                   !1, 123
   11     8        FETCH_DIM_R                                      ~8      !1, 1
          9        ECHO                                                     ~8
   12    10        FETCH_DIM_R                                      ~9      !1, <true>
         11        ECHO                                                     ~9
   13    12        FETCH_DIM_R                                      ~10     !1, <array>
         13        ECHO                                                     ~10
   15    14        ASSIGN                                                   !2, <true>
   17    15        FETCH_DIM_R                                      ~12     !2, 1
         16        ECHO                                                     ~12
   18    17        FETCH_DIM_R                                      ~13     !2, <true>
         18        ECHO                                                     ~13
   19    19        FETCH_DIM_R                                      ~14     !2, <array>
         20        ECHO                                                     ~14
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.03 ms | 1394 KiB | 13 Q