3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace One { trait foo { static $bar = []; public static function a() { echo "Hello World"; } } } namespace Two { use One\foo as OneFoo; trait foo { use OneFoo; } } namespace Three { class qux { use \One\foo; public static function a() { \Two\bat::a(); } } class bing extends qux { use \Two\foo; } } namespace { \Three\bing::a(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8MF5c
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   DECLARE_CLASS                                            'two%5Cfoo'
   21     1        DECLARE_CLASS                                            'three%5Cqux'
   29     2        DECLARE_CLASS                                            'three%5Cbing', 'three%5Cqux'
   35     3        INIT_STATIC_METHOD_CALL                                  'Three%5Cbing', 'a'
          4        DO_FCALL                                      0          
   36     5      > RETURN                                                   1

Class One\foo:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8MF5c
function name:  a
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'Hello+World'
    8     1      > RETURN                                                   null

End of function a

End of class One\foo.

Class Two\foo: [no user functions]
Class Three\qux:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8MF5c
function name:  a
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_STATIC_METHOD_CALL                                  'Two%5Cbat', 'a'
          1        DO_FCALL                                      0          
   26     2      > RETURN                                                   null

End of function a

End of class Three\qux.

Class Three\bing: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.52 ms | 1394 KiB | 13 Q