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 >   QM_ASSIGN                                                !0
   5     1        FETCH_DIM_R                                      ~4      !0, <true>
         2        ASSIGN_OBJ                                               ~4
   6     3        FETCH_DIM_R                                      ~5      !0, null
         4        ASSIGN_OBJ                                               ~5
   7     5        FETCH_DIM_R                                      ~6      !0, <array>
         6        ASSIGN_OBJ                                               ~6
   9     7        QM_ASSIGN                                                !1
  11     8        FETCH_DIM_R                                      ~8      !1, 1
         9        ASSIGN_OBJ                                               ~8
  12    10        FETCH_DIM_R                                      ~9      !1, <true>
        11        ASSIGN_OBJ                                               ~9
  13    12        FETCH_DIM_R                                      ~10     !1, <array>
        13        ASSIGN_OBJ                                               ~10
  15    14        QM_ASSIGN                                                !2
  17    15        FETCH_DIM_R                                      ~12     !2, 1
        16        ASSIGN_OBJ                                               ~12
  18    17        FETCH_DIM_R                                      ~13     !2, <true>
        18        ASSIGN_OBJ                                               ~13
  19    19        FETCH_DIM_R                                      ~14     !2, <array>
        20        ASSIGN_OBJ                                               ~14
        21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
16.2 ms | 461 KiB | 7 Q