3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C extends ArrayObject { public function getArrayCopy() {return [__METHOD__];} public function getIterator() {yield __METHOD__;} public function serialize() {return serialize([__METHOD__]);} public function unserialize($data) {} public function offsetGet($key) {return __METHOD__;} public function offsetExists($key) {return TRUE;} public function offsetSet($key, $value) {} public function offsetUnset($key) {} } $o = new C(['x' => 5]); var_export([ 'json' => json_encode($o), '(array)' => (array) $o, '->x' => $o->x, ]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rAc4K
function name:  (null)
number of ops:  16
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'C'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   16     4        INIT_FCALL                                               'var_export'
   17     5        INIT_FCALL                                               'json_encode'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        INIT_ARRAY                                       ~5      $4, 'json'
   18     9        CAST                                          7  ~6      !0
         10        ADD_ARRAY_ELEMENT                                ~5      ~6, '%28array%29'
   19    11        FETCH_OBJ_R                                      ~7      !0, 'x'
         12        ADD_ARRAY_ELEMENT                                ~5      ~7, '-%3Ex'
         13        SEND_VAL                                                 ~5
         14        DO_ICALL                                                 
   20    15      > RETURN                                                   1

Class C:
Function getarraycopy:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rAc4K
function name:  getArrayCopy
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   <array>
          1*     > RETURN                                                   null

End of function getarraycopy

Function getiterator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/rAc4K
function name:  getIterator
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   GENERATOR_CREATE                                         
          1        YIELD                                                    'C%3A%3AgetIterator'
          2      > GENERATOR_RETURN                                         

End of function getiterator

Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rAc4K
function name:  serialize
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'serialize'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                         $0      
          3      > RETURN                                                   $0
          4*     > RETURN                                                   null

End of function serialize

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

End of function unserialize

Function offsetget:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rAc4K
function name:  offsetGet
number of ops:  3
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1      > RETURN                                                   'C%3A%3AoffsetGet'
          2*     > 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/rAc4K
function name:  offsetExists
number of ops:  3
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1      > RETURN                                                   <true>
          2*     > 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/rAc4K
function name:  offsetSet
number of ops:  3
compiled vars:  !0 = $key, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     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/rAc4K
function name:  offsetUnset
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 offsetunset

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.31 ms | 1400 KiB | 19 Q