3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Node { protected $_type; protected $_props; protected $_children; public function __construct($type, array $props = null) { $this->_type = $type; $this->_props = array(); $this->_children = array(); if (null !== $props) { $this->setProps($props); } } public function getType() { return $this->_type; } public function addChild(Euhit_Markup_Latex_Parser_Node $node) { $this->_children[] = $node; return $this; } public function getChildren() { return $this->_children; } public function setProps(array $props) { foreach ($props as $key => $value) { $this->setProp($key, $value); } return $this; } public function setProp($key, $value) { $this->_props[$key] = $value; return $this; } public function &getProp($key) { if (!isset($this->_props[$key])) { $this->_props[$key] = null; } return $this->_props[$key]; } public function __set($key, $value) { $this->setProp($key, $value); } public function &__get($key) { return $this->getProp($key); } } $node = new Node(1024); $dupa = &$node->dupa; $dupa .= 'DUUPA!!!'; echo $node->dupa;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SVAZ8
function name:  (null)
number of ops:  10
compiled vars:  !0 = $node, !1 = $dupa
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   71     0  E >   NEW                                              $2      'Node'
          1        SEND_VAL_EX                                              1024
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   72     4        FETCH_OBJ_W                                      $5      !0, 'dupa'
          5        ASSIGN_REF                                               !1, $5
   73     6        ASSIGN_OP                                     8          !1, 'DUUPA%21%21%21'
   75     7        FETCH_OBJ_R                                      ~8      !0, 'dupa'
          8        ECHO                                                     ~8
          9      > RETURN                                                   1

Class Node:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/SVAZ8
function name:  __construct
number of ops:  14
compiled vars:  !0 = $type, !1 = $props
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
   12     2        ASSIGN_OBJ                                               '_type'
          3        OP_DATA                                                  !0
   13     4        ASSIGN_OBJ                                               '_props'
          5        OP_DATA                                                  <array>
   14     6        ASSIGN_OBJ                                               '_children'
          7        OP_DATA                                                  <array>
   16     8        TYPE_CHECK                                  1020          !1
          9      > JMPZ                                                     ~5, ->13
   17    10    >   INIT_METHOD_CALL                                         'setProps'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0          
   19    13    > > RETURN                                                   null

End of function __construct

Function gettype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SVAZ8
function name:  getType
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   FETCH_OBJ_R                                      ~0      '_type'
          1      > RETURN                                                   ~0
   24     2*     > RETURN                                                   null

End of function gettype

Function addchild:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SVAZ8
function name:  addChild
number of ops:  7
compiled vars:  !0 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
   28     1        FETCH_OBJ_W                                      $1      '_children'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   29     4        FETCH_THIS                                       ~3      
          5      > RETURN                                                   ~3
   30     6*     > RETURN                                                   null

End of function addchild

Function getchildren:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SVAZ8
function name:  getChildren
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   FETCH_OBJ_R                                      ~0      '_children'
          1      > RETURN                                                   ~0
   35     2*     > RETURN                                                   null

End of function getchildren

Function setprops:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/SVAZ8
function name:  setProps
number of ops:  13
compiled vars:  !0 = $props, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   37     0  E >   RECV                                             !0      
   39     1      > FE_RESET_R                                       $3      !0, ->9
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->9
          3    >   ASSIGN                                                   !2, ~4
   40     4        INIT_METHOD_CALL                                         'setProp'
          5        SEND_VAR_EX                                              !2
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
   39     8      > JMP                                                      ->2
          9    >   FE_FREE                                                  $3
   42    10        FETCH_THIS                                       ~7      
         11      > RETURN                                                   ~7
   43    12*     > RETURN                                                   null

End of function setprops

Function setprop:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SVAZ8
function name:  setProp
number of ops:  8
compiled vars:  !0 = $key, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   47     2        FETCH_OBJ_W                                      $2      '_props'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
   48     5        FETCH_THIS                                       ~4      
          6      > RETURN                                                   ~4
   49     7*     > RETURN                                                   null

End of function setprop

Function getprop:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
Return found
Branch analysis from position: 8
filename:       /in/SVAZ8
function name:  getProp
number of ops:  12
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   51     0  E >   RECV                                             !0      
   53     1        FETCH_OBJ_IS                                     ~1      '_props'
          2        ISSET_ISEMPTY_DIM_OBJ                         0  ~2      ~1, !0
          3        BOOL_NOT                                         ~3      ~2
          4      > JMPZ                                                     ~3, ->8
   54     5    >   FETCH_OBJ_W                                      $4      '_props'
          6        ASSIGN_DIM                                               $4, !0
          7        OP_DATA                                                  null
   56     8    >   FETCH_OBJ_W                                      $6      '_props'
          9        FETCH_DIM_W                                      $7      $6, !0
         10      > RETURN_BY_REF                                            $7
   57    11*     > RETURN_BY_REF                                            null

End of function getprop

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SVAZ8
function name:  __set
number of ops:  7
compiled vars:  !0 = $key, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   59     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   61     2        INIT_METHOD_CALL                                         'setProp'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
   62     6      > RETURN                                                   null

End of function __set

Function __get:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/SVAZ8
function name:  __get
number of ops:  6
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   64     0  E >   RECV                                             !0      
   66     1        INIT_METHOD_CALL                                         'getProp'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN_BY_REF                                            $1
   67     5*     > RETURN_BY_REF                                            null

End of function __get

End of class Node.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.6 ms | 1403 KiB | 13 Q