3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SpecialArray implements \ArrayAccess { public function offsetExists($index){} public function offsetGet($index){} public function offsetSet($index, $value){} public function offsetUnset($index){} } $arr = new SpecialArray; $arr[] = 1; $arr[] = 2; $arr[] = 3; var_dump(count($arr));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G0pR3
function name:  (null)
number of ops:  15
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'specialarray'
   11     1        NEW                                              $1      'SpecialArray'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   12     4        ASSIGN_DIM                                               !0
          5        OP_DATA                                                  1
   13     6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  2
   14     8        ASSIGN_DIM                                               !0
          9        OP_DATA                                                  3
   16    10        INIT_FCALL                                               'var_dump'
         11        COUNT                                            ~7      !0
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class SpecialArray:
Function offsetexists:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G0pR3
function name:  offsetExists
number of ops:  2
compiled vars:  !0 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          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/G0pR3
function name:  offsetGet
number of ops:  2
compiled vars:  !0 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          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/G0pR3
function name:  offsetSet
number of ops:  3
compiled vars:  !0 = $index, !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 offsetunset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G0pR3
function name:  offsetUnset
number of ops:  2
compiled vars:  !0 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function offsetunset

End of class SpecialArray.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.2 ms | 1401 KiB | 15 Q