3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AA implements ArrayAccess { public function offsetSet($offset, $value) { echo "set $offset = $value\n"; } public function offsetExists($offset) { } public function offsetUnset($offset) { } public function offsetGet($offset) { } } class Di { public $aa; public function __construct() { $this->aa = new AA(); $this->aa['test'] = 123; } } $di = new Di(); $di->aa['test'] = 123;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/daR9p
function name:  (null)
number of ops:  8
compiled vars:  !0 = $di
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'aa'
   26     1        NEW                                              $1      'Di'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   27     4        FETCH_OBJ_W                                      $4      !0, 'aa'
          5        ASSIGN_DIM                                               $4, 'test'
          6        OP_DATA                                                  123
          7      > RETURN                                                   1

Class AA:
Function offsetset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/daR9p
function name:  offsetSet
number of ops:  9
compiled vars:  !0 = $offset, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ROPE_INIT                                     5  ~3      'set+'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_ADD                                      2  ~3      ~3, '+%3D+'
          5        ROPE_ADD                                      3  ~3      ~3, !1
          6        ROPE_END                                      4  ~2      ~3, '%0A'
          7        ECHO                                                     ~2
    5     8      > 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/daR9p
function name:  offsetExists
number of ops:  2
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1      > RETURN                                                   null

End of function offsetexists

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

End of function offsetunset

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

End of function offsetget

End of class AA.

Class Di:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/daR9p
function name:  __construct
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'AA'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'aa'
          3        OP_DATA                                                  $1
   22     4        FETCH_OBJ_W                                      $3      'aa'
          5        ASSIGN_DIM                                               $3, 'test'
          6        OP_DATA                                                  123
   23     7      > RETURN                                                   null

End of function __construct

End of class Di.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.97 ms | 1399 KiB | 13 Q