3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = (object) [ 'a' => function(){ return 1; }, 'b' => (object) [ 'ba' => function(){ return 2; }, 'bb' => (object) [ 'bba' => function(){ return 3; } ] ] ]; $obj->a(); $obj->b->ba(); $obj->b->bb->bba();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SaKdt
function name:  (null)
number of ops:  22
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSaKdt%3A4%240'
          1        INIT_ARRAY                                       ~2      ~1, 'a'
    6     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSaKdt%3A6%241'
          3        INIT_ARRAY                                       ~4      ~3, 'ba'
    8     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSaKdt%3A8%242'
          5        INIT_ARRAY                                       ~6      ~5, 'bba'
          6        CAST                                          8  ~7      ~6
          7        ADD_ARRAY_ELEMENT                                ~4      ~7, 'bb'
          8        CAST                                          8  ~8      ~4
          9        ADD_ARRAY_ELEMENT                                ~2      ~8, 'b'
         10        CAST                                          8  ~9      ~2
    3    11        ASSIGN                                                   !0, ~9
   12    12        INIT_METHOD_CALL                                         !0, 'a'
         13        DO_FCALL                                      0          
   13    14        FETCH_OBJ_R                                      ~12     !0, 'b'
         15        INIT_METHOD_CALL                                         ~12, 'ba'
         16        DO_FCALL                                      0          
   14    17        FETCH_OBJ_R                                      ~14     !0, 'b'
         18        FETCH_OBJ_R                                      ~15     ~14, 'bb'
         19        INIT_METHOD_CALL                                         ~15, 'bba'
         20        DO_FCALL                                      0          
         21      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FSaKdt%3A4%240

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

End of function %00%7Bclosure%7D%2Fin%2FSaKdt%3A6%241

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

End of function %00%7Bclosure%7D%2Fin%2FSaKdt%3A8%242

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.94 ms | 1399 KiB | 13 Q