3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A implements ArrayAccess{ function offsetGet($foo){ print_r($foo); } function offsetSet($x, $v){ print_r($x); print_r($v); } function offsetUnset($x){ print_r($x); } function offsetExists($x){ print_r($x); } } $x = new A; $x[new ArrayObject] = "x";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BfMHt
function name:  (null)
number of ops:  9
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'a'
   20     1        NEW                                              $1      'A'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   22     4        NEW                                              $4      'ArrayObject'
          5        DO_FCALL                                      0          
          6        ASSIGN_DIM                                               !0, $4
          7        OP_DATA                                                  'x'
          8      > RETURN                                                   1

Class A:
Function offsetget:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BfMHt
function name:  offsetGet
number of ops:  5
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    6     4      > 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/BfMHt
function name:  offsetSet
number of ops:  9
compiled vars:  !0 = $x, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        INIT_FCALL                                               'print_r'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    9     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   10     8      > 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/BfMHt
function name:  offsetUnset
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   13     4      > RETURN                                                   null

End of function offsetunset

Function offsetexists:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BfMHt
function name:  offsetExists
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   16     4      > RETURN                                                   null

End of function offsetexists

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.46 ms | 1400 KiB | 15 Q