3v4l.org

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

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

End of function offsetset

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

End of function offsetget

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

End of function offsetunset

End of class ObjectArray.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.46 ms | 1395 KiB | 13 Q