3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function test(){ return function(){ return function(){ return array('coin'); }; }; } }; $part = 'Test'; $vare = 'part'; $i = new $$vare(); $func = $i->test(); echo $func()()[0];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MBjsf
function name:  (null)
number of ops:  17
compiled vars:  !0 = $part, !1 = $vare, !2 = $i, !3 = $func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 'Test'
   12     1        ASSIGN                                                   !1, 'part'
   13     2        FETCH_R                      local               ~6      !1
          3        FETCH_CLASS                                   0  $7      ~6
          4        NEW                                              $8      $7
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !2, $8
   14     7        INIT_METHOD_CALL                                         !2, 'test'
          8        DO_FCALL                                      0  $11     
          9        ASSIGN                                                   !3, $11
   15    10        INIT_DYNAMIC_CALL                                        !3
         11        DO_FCALL                                      0  $13     
         12        INIT_DYNAMIC_CALL                                        $13
         13        DO_FCALL                                      0  $14     
         14        FETCH_DIM_R                                      ~15     $14, 0
         15        ECHO                                                     ~15
         16      > RETURN                                                   1

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

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

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

End of function %00%7Bclosure%7D%2Fin%2FMBjsf%3A5%241

Class Test:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MBjsf
function name:  test
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FMBjsf%3A4%240'
    8     1      > RETURN                                                   ~0
    9     2*     > RETURN                                                   null

End of function test

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.16 ms | 1395 KiB | 13 Q