3v4l.org

run code in 300+ PHP versions simultaneously
<?php $closure = function($foo, $bar) { return function($foo, $bar) { doSomething(); }; }; $class = new class($foo, $bar) { function __construct($foo, $bar) { doSomething(); } }; $instance = new Class($foo, $bar) { function __construct($foo, $bar) { doSomething(); } };
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aWfPK
function name:  (null)
number of ops:  15
compiled vars:  !0 = $closure, !1 = $class, !2 = $foo, !3 = $bar, !4 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaWfPK%3A3%240'
          1        ASSIGN                                                   !0, ~5
    9     2        DECLARE_ANON_CLASS                               <undef> 
          3        NEW                                              $8      $7
          4        SEND_VAR_EX                                              !2
          5        SEND_VAR_EX                                              !3
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $8
   15     8        DECLARE_ANON_CLASS                               'class%40anonymous%00%2Fin%2Fawfpk%3A15%243'                                    
          9        NEW                                              $12     $11
         10        SEND_VAR_EX                                              !2
         11        SEND_VAR_EX                                              !3
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !4, $12
   19    14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FaWfPK%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aWfPK
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaWfPK%3A4%241'
    6     3      > RETURN                                                   ~2
    7     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaWfPK%3A3%240

Function %00%7Bclosure%7D%2Fin%2FaWfPK%3A4%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aWfPK
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL_BY_NAME                                       'doSomething'
          3        DO_FCALL                                      0          
    6     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaWfPK%3A4%241

Class class@anonymous:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aWfPK
function name:  __construct
number of ops:  5
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        INIT_FCALL_BY_NAME                                       'doSomething'
          3        DO_FCALL                                      0          
   12     4      > RETURN                                                   null

End of function __construct

End of class class@anonymous.

Class class@anonymous:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aWfPK
function name:  __construct
number of ops:  5
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   17     2        INIT_FCALL_BY_NAME                                       'doSomething'
          3        DO_FCALL                                      0          
   18     4      > RETURN                                                   null

End of function __construct

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.79 ms | 1399 KiB | 13 Q