3v4l.org

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

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ktvoZ
function name:  test
number of ops:  3
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        ECHO                                                     'test'
   17     2      > RETURN                                                   null

End of function test

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

End of function test2

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

End of function offsetexists

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

End of function offsetunset

End of class MyArrayAccess.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.76 ms | 1394 KiB | 14 Q