3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Container { protected $s=array(); function __set($k, $c) { $this->s[$k]=$c; } function __get($k) { return $this->s[$k]($this); } } $c = new Container; $c->something = function(){ var_dump("A"); return 'StdClass'; }; $k = $c->something; $k();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZVXui
function name:  (null)
number of ops:  11
compiled vars:  !0 = $c, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'Container'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   11     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FZVXui%3A11%240'
          4        ASSIGN_OBJ                                               !0, 'something'
   14     5        OP_DATA                                                  ~6
   16     6        FETCH_OBJ_R                                      ~7      !0, 'something'
          7        ASSIGN                                                   !1, ~7
   17     8        INIT_DYNAMIC_CALL                                        !1
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FZVXui%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZVXui
function name:  {closure}
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'A'
          2        DO_ICALL                                                 
   13     3      > RETURN                                                   'StdClass'
   14     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FZVXui%3A11%240

Class Container:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZVXui
function name:  __set
number of ops:  6
compiled vars:  !0 = $k, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_OBJ_W                                      $2      's'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
          5      > RETURN                                                   null

End of function __set

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZVXui
function name:  __get
number of ops:  9
compiled vars:  !0 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        FETCH_OBJ_R                                      ~1      's'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3        INIT_DYNAMIC_CALL                                        ~2
          4        FETCH_THIS                                       $3      
          5        SEND_VAR_EX                                              $3
          6        DO_FCALL                                      0  $4      
          7      > RETURN                                                   $4
          8*     > RETURN                                                   null

End of function __get

End of class Container.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.34 ms | 1400 KiB | 15 Q