3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace { // global class Yii { public static function abc() { echo 'hello', PHP_EOL; } } } namespace A\Name\Space { use Yii; Yii::abc(); // resolved to the global namespace // without the use statement php would resolve Yii === A\Name\Space\Yii } namespace { // global again use Yii; // warning, resolved at compile time. Yii::abc(); // you aliased Yii with Yii }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K0D61
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   INIT_STATIC_METHOD_CALL                                      'Yii', 'abc'
          1        DO_FCALL                                          0          
   17     2        INIT_STATIC_METHOD_CALL                                      'Yii', 'abc'
          3        DO_FCALL                                          0          
   18     4      > RETURN                                                       1

Class Yii:
Function abc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K0D61
function name:  abc
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                         'hello'
          1        ECHO                                                         '%0A'
          2      > RETURN                                                       null

End of function abc

End of class Yii.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.16 ms | 2940 KiB | 13 Q