3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f() { $str = 'string'; echo $str[2]; //< Notice: It's not possible to fetch an array element on a non array [language_error] $o = new \stdClass; $obj = new \SplObjectStorage; $obj[$o] = 1; echo $obj[$o]; //< Notice: It's not possible to fetch an array element on a non array [language_error] } f();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v5l8f
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'f'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v5l8f
function name:  f
number of ops:  14
compiled vars:  !0 = $str, !1 = $o, !2 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'string'
    6     1        FETCH_DIM_R                                      ~4      !0, 2
          2        ECHO                                                     ~4
    8     3        NEW                                              $5      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
    9     6        NEW                                              $8      'SplObjectStorage'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $8
   10     9        ASSIGN_DIM                                               !2, !1
         10        OP_DATA                                                  1
   11    11        FETCH_DIM_R                                      ~12     !2, !1
         12        ECHO                                                     ~12
   12    13      > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.19 ms | 1397 KiB | 14 Q