3v4l.org

run code in 300+ PHP versions simultaneously
<?php class arr implements ArrayAccess { public function offsetGet($index) { $this[$index]; return null; } public function offsetExists($index) {} public function offsetIsset($index) {} public function offsetUnset($index){} public function offsetSet($index, $value){} } $arr = new arr(); var_dump($arr['foo']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/enLlL
function name:  (null)
number of ops:  9
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'arr'
   18     1        NEW                                              $1      'arr'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   19     4        INIT_FCALL                                               'var_dump'
          5        FETCH_DIM_R                                      ~4      !0, 'foo'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class arr:
Function offsetget:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/enLlL
function name:  offsetGet
number of ops:  6
compiled vars:  !0 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        FETCH_THIS                                       ~1      
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3        FREE                                                     ~2
    7     4      > RETURN                                                   null
    8     5*     > RETURN                                                   null

End of function offsetget

Function offsetexists:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/enLlL
function name:  offsetExists
number of ops:  2
compiled vars:  !0 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function offsetexists

Function offsetisset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/enLlL
function name:  offsetIsset
number of ops:  2
compiled vars:  !0 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function offsetisset

Function offsetunset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/enLlL
function name:  offsetUnset
number of ops:  2
compiled vars:  !0 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function offsetunset

Function offsetset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/enLlL
function name:  offsetSet
number of ops:  3
compiled vars:  !0 = $index, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > RETURN                                                   null

End of function offsetset

End of class arr.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.12 ms | 1400 KiB | 15 Q