3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test\Domain\Service { use Test\Domain\Builder\UserBuilder\aUser; class UserService { public function test() { echo aUser(); } } } namespace Test\Domain\Builder { class UserBuilder { public static function aUser() { return 'foo'; } } } namespace { $test = new Test\Domain\Service\UserService(); $test->test(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2KPIC
function name:  (null)
number of ops:  6
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $1      'Test%5CDomain%5CService%5CUserService'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   30     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
   31     5      > RETURN                                                   1

Class Test\Domain\Service\UserService:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2KPIC
function name:  test
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_NS_FCALL_BY_NAME                                    'Test%5CDomain%5CService%5CaUser'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   12     3      > RETURN                                                   null

End of function test

End of class Test\Domain\Service\UserService.

Class Test\Domain\Builder\UserBuilder:
Function auser:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2KPIC
function name:  aUser
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E > > RETURN                                                   'foo'
   23     1*     > RETURN                                                   null

End of function auser

End of class Test\Domain\Builder\UserBuilder.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.43 ms | 1389 KiB | 14 Q