3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function test(){ return function(){ return function(){ return array( function() { return 'coin'; }, function() { return 'couak'; }, function() { return 'plip'; }, function() { return 'plop'; } ); }; }; } }; $part = 'Test'; $vare = 'part'; $i = new $$vare(); $func = $i->test(); $func = $func(); foreach($func() as $f){ echo $f(); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/295fN
function name:  (null)
number of ops:  23
compiled vars:  !0 = $part, !1 = $vare, !2 = $i, !3 = $func, !4 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   ASSIGN                                                   !0, 'Test'
   25     1        ASSIGN                                                   !1, 'part'
   26     2        FETCH_R                      local               ~7      !1
          3        FETCH_CLASS                                   0  $8      ~7
          4        NEW                                              $9      $8
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !2, $9
   27     7        INIT_METHOD_CALL                                         !2, 'test'
          8        DO_FCALL                                      0  $12     
          9        ASSIGN                                                   !3, $12
   28    10        INIT_DYNAMIC_CALL                                        !3
         11        DO_FCALL                                      0  $14     
         12        ASSIGN                                                   !3, $14
   29    13        INIT_DYNAMIC_CALL                                        !3
         14        DO_FCALL                                      0  $16     
         15      > FE_RESET_R                                       $17     $16, ->21
         16    > > FE_FETCH_R                                               $17, !4, ->21
   30    17    >   INIT_DYNAMIC_CALL                                        !4
         18        DO_FCALL                                      0  $18     
         19        ECHO                                                     $18
   29    20      > JMP                                                      ->16
         21    >   FE_FREE                                                  $17
   31    22      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F295fN%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/295fN
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%2F295fN%3A5%241'
   20     1      > RETURN                                                   ~0
   21     2*     > RETURN                                                   null

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

Function %00%7Bclosure%7D%2Fin%2F295fN%3A5%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/295fN
function name:  {closure}
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F295fN%3A7%242'
    9     1        INIT_ARRAY                                       ~1      ~0
   10     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F295fN%3A10%243'
   12     3        ADD_ARRAY_ELEMENT                                ~1      ~2
   13     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F295fN%3A13%244'
   15     5        ADD_ARRAY_ELEMENT                                ~1      ~3
   16     6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F295fN%3A16%245'
   18     7        ADD_ARRAY_ELEMENT                                ~1      ~4
          8      > RETURN                                                   ~1
   20     9*     > RETURN                                                   null

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

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

End of function %00%7Bclosure%7D%2Fin%2F295fN%3A7%242

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

End of function %00%7Bclosure%7D%2Fin%2F295fN%3A10%243

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

End of function %00%7Bclosure%7D%2Fin%2F295fN%3A13%244

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

End of function %00%7Bclosure%7D%2Fin%2F295fN%3A16%245

Class Test:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/295fN
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%2F295fN%3A4%240'
   21     1      > RETURN                                                   ~0
   22     2*     > RETURN                                                   null

End of function test

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.32 ms | 1403 KiB | 13 Q