3v4l.org

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

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

End of function offsetexists

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

End of function offsetget

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

End of function offsetset

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

End of function offsetunset

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.53 ms | 1396 KiB | 15 Q