3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ExpClass { public $index; public function __construct() { $this->index = 'super'; } public function addNode() { $index = &$this->index; $index .= 'toto'; echo $index; echo '<hr>'; echo $this->index; } } $test = new ExpClass(); $test->addNode();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9PTE1
function name:  (null)
number of ops:  6
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'ExpClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        INIT_METHOD_CALL                                         !0, 'addNode'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class ExpClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9PTE1
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_OBJ                                               'index'
          1        OP_DATA                                                  'super'
   10     2      > RETURN                                                   null

End of function __construct

Function addnode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9PTE1
function name:  addNode
number of ops:  8
compiled vars:  !0 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_OBJ_W                                      $1      'index'
          1        ASSIGN_REF                                               !0, $1
   17     2        ASSIGN_OP                                     8          !0, 'toto'
   19     3        ECHO                                                     !0
   20     4        ECHO                                                     '%3Chr%3E'
   21     5        FETCH_OBJ_R                                      ~4      'index'
          6        ECHO                                                     ~4
   22     7      > RETURN                                                   null

End of function addnode

End of class ExpClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.02 ms | 1394 KiB | 13 Q