3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace One { trait foo { static $bar = []; public static function a() { } } } namespace Two { use One\foo as OneFoo; trait foo { use OneFoo; public static function a() { $bar[] = 'qux'; } } } 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/ZF9ii
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'
   25     1        DECLARE_CLASS                                            'three%5Cqux'
   33     2        DECLARE_CLASS                                            'three%5Cbing', 'three%5Cqux'
   39     3        INIT_STATIC_METHOD_CALL                                  'Three%5Cbing', 'a'
          4        DO_FCALL                                      0          
   40     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/ZF9ii
function name:  a
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   null

End of function a

End of class One\foo.

Class Two\foo:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZF9ii
function name:  a
number of ops:  3
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN_DIM                                               !0
          1        OP_DATA                                                  'qux'
   20     2      > RETURN                                                   null

End of function a

End of class Two\foo.

Class Three\qux:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZF9ii
function name:  a
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   INIT_STATIC_METHOD_CALL                                  'Two%5Cbat', 'a'
          1        DO_FCALL                                      0          
   30     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:
165.38 ms | 1394 KiB | 13 Q