3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Derp { protected $array = array("test" => array(1,2,3)); public function getArray() { return $this->array; } } $d = new Derp(); $array &= $d->getArray(); $array['test'] = array(); var_dump($d);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9OVb0
function name:  (null)
number of ops:  12
compiled vars:  !0 = $d, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'Derp'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        INIT_METHOD_CALL                                         !0, 'getArray'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN_OP                                    10          !1, $5
   15     6        ASSIGN_DIM                                               !1, 'test'
          7        OP_DATA                                                  <array>
   17     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class Derp:
Function getarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9OVb0
function name:  getArray
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_R                                      ~0      'array'
          1      > RETURN                                                   ~0
          2*     > RETURN                                                   null

End of function getarray

End of class Derp.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.84 ms | 1395 KiB | 15 Q