3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace MyProject; const CONSTANT ='asdf'; function mine() { var_dump('mine'); } function func() { var_dump('func'); } class CName { function __construct() { var_dump('__contruct'); } static function method() { var_dump('method'); } } namespace\mine(); // calls function MyProject\blah\mine() namespace\func(); // calls function MyProject\func() namespace\cname::method(); // calls static method "method" of class MyProject\cname $a = new namespace\cname(); // instantiates object of class MyProject\sub\cname $b = namespace\CONSTANT; // assigns value of constant MyProject\CONSTANT to $b ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JMLuF
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CONST                                            'MyProject%5CCONSTANT', 'asdf'
   32     1        INIT_FCALL                                               'myproject%5Cmine'
          2        DO_FCALL                                      0          
   34     3        INIT_FCALL                                               'myproject%5Cfunc'
          4        DO_FCALL                                      0          
   35     5        INIT_STATIC_METHOD_CALL                                  'MyProject%5Ccname', 'method'
          6        DO_FCALL                                      0          
   36     7        NEW                                              $5      'MyProject%5Ccname'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !0, $5
   37    10        FETCH_CONSTANT                                   ~8      'MyProject%5CCONSTANT'
         11        ASSIGN                                                   !1, ~8
   55    12      > RETURN                                                   1

Function myproject%5Cmine:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JMLuF
function name:  MyProject\mine
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_NS_FCALL_BY_NAME                                    'MyProject%5Cvar_dump'
          1        SEND_VAL_EX                                              'mine'
          2        DO_FCALL                                      0          
   11     3      > RETURN                                                   null

End of function myproject%5Cmine

Function myproject%5Cfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JMLuF
function name:  MyProject\func
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_NS_FCALL_BY_NAME                                    'MyProject%5Cvar_dump'
          1        SEND_VAL_EX                                              'func'
          2        DO_FCALL                                      0          
   15     3      > RETURN                                                   null

End of function myproject%5Cfunc

Class MyProject\CName:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JMLuF
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_NS_FCALL_BY_NAME                                    'MyProject%5Cvar_dump'
          1        SEND_VAL_EX                                              '__contruct'
          2        DO_FCALL                                      0          
   21     3      > RETURN                                                   null

End of function __construct

Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JMLuF
function name:  method
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_NS_FCALL_BY_NAME                                    'MyProject%5Cvar_dump'
          1        SEND_VAL_EX                                              'method'
          2        DO_FCALL                                      0          
   25     3      > RETURN                                                   null

End of function method

End of class MyProject\CName.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.99 ms | 1403 KiB | 17 Q