3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 1; $bar = 2; $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/qpGkr
function name:  (null)
number of ops:  17
compiled vars:  !0 = $foo, !1 = $bar, !2 = $closure, !3 = $class, !4 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
          1        ASSIGN                                                   !1, 2
    5     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FqpGkr%3A5%240'
          3        ASSIGN                                                   !2, ~7
   11     4        DECLARE_ANON_CLASS                               <unknown> 
          5        NEW                                              $10     $9
          6        SEND_VAR_EX                                              !0
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !3, $10
   17    10        DECLARE_ANON_CLASS                               'class%40anonymous%00%2Fin%2Fqpgkr%3A17%243'                                    
         11        NEW                                              $14     $13
         12        SEND_VAR_EX                                              !0
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !4, $14
   21    16      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FqpGkr%3A5%240

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

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

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

End of function __construct

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.29 ms | 1399 KiB | 13 Q