3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo\Bar { class Baz { function __construct() { var_dump(get_class()); } } } namespace Foo { class Bar { function __construct() { var_dump(get_class()); } } } namespace { use Foo\Bar; use Foo\Bar\Baz; new Bar(); new Baz(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cqHhu
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $0      'Foo%5CBar'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
   22     3        NEW                                              $2      'Foo%5CBar%5CBaz'
          4        DO_FCALL                                      0          
          5        FREE                                                     $2
   23     6      > RETURN                                                   1

Class Foo\Bar\Baz:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cqHhu
function name:  __construct
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_NS_FCALL_BY_NAME                                    'Foo%5CBar%5Cvar_dump'
          1        INIT_NS_FCALL_BY_NAME                                    'Foo%5CBar%5Cget_class'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR_NO_REF_EX                                       $0
          4        DO_FCALL                                      0          
    6     5      > RETURN                                                   null

End of function __construct

End of class Foo\Bar\Baz.

Class Foo\Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cqHhu
function name:  __construct
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_NS_FCALL_BY_NAME                                    'Foo%5Cvar_dump'
          1        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cget_class'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR_NO_REF_EX                                       $0
          4        DO_FCALL                                      0          
   13     5      > RETURN                                                   null

End of function __construct

End of class Foo\Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.08 ms | 1395 KiB | 17 Q