3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class DICT { } $a = new DICT; $a->b = function(){ echo 'b'; }; $a->c = new DICT; $a->b(); // работает $a->c->d = function(){ echo 'd'; }; $a->c->d();
based on eAa12
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gc6bJ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
   9     1        NEW                                              $2      :-5
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $2
  10     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FGc6bJ0x7f21ecfcd059'
         5        ASSIGN_OBJ                                               !0, 'b'
         6        OP_DATA                                                  ~6
  11     7        NEW                                              $8      :0
         8        DO_FCALL                                      0          
         9        ASSIGN_OBJ                                               !0, 'c'
        10        OP_DATA                                                  $8
  12    11        INIT_METHOD_CALL                                         !0, 'b'
        12        DO_FCALL                                      0          
  13    13        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FGc6bJ0x7f21ecfcd0b8'
        14        FETCH_OBJ_W                                      $11     !0, 'c'
        15        ASSIGN_OBJ                                               $11, 'd'
        16        OP_DATA                                                  ~13
  14    17        FETCH_OBJ_R                                      $14     !0, 'c'
        18        INIT_METHOD_CALL                                         $14, 'd'
        19        DO_FCALL                                      0          
        20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FGc6bJ0x7f21ecfcd059:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gc6bJ
function name:  {closure}
number of ops:  2
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  10     0  E >   ECHO                                                     'b'
         1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FGc6bJ0x7f21ecfcd059

Function %00%7Bclosure%7D%2Fin%2FGc6bJ0x7f21ecfcd0b8:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gc6bJ
function name:  {closure}
number of ops:  2
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  13     0  E >   ECHO                                                     'd'
         1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FGc6bJ0x7f21ecfcd0b8

Class DICT: [no user functions]

Generated using Vulcan Logic Dumper, using php 7.3.0