3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassMap implements ArrayAccess { public function offsetSet($key, $value) { echo 'success'; } public function offsetGet($key) {} public function offsetExists($key) {} public function offsetUnset($key) {} } $cm = new ClassMap(); $cm[new stdClass] = 5;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jbcVM
function name:  (null)
number of ops:  9
compiled vars:  !0 = $cm
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'classmap'
   15     1        NEW                                              $1      'ClassMap'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   16     4        NEW                                              $4      'stdClass'
          5        DO_FCALL                                      0          
          6        ASSIGN_DIM                                               !0, $4
          7        OP_DATA                                                  5
          8      > RETURN                                                   1

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

End of function offsetset

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

End of function offsetexists

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

End of function offsetunset

End of class ClassMap.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.9 ms | 1399 KiB | 13 Q