3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Cat; class Foobar { public function __construct() { echo '[Foobar]'; } } class Foo { public function __construct() { echo '[Foo]'; } } define('Cat\\Foo', 'Cat\\Foobar'); new Foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9HSQd
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_NS_FCALL_BY_NAME                                    'Cat%5Cdefine'
          1        SEND_VAL_EX                                              'Cat%5CFoo'
          2        SEND_VAL_EX                                              'Cat%5CFoobar'
          3        DO_FCALL                                      0          
   22     4        NEW                                              $1      'Cat%5CFoo'
          5        DO_FCALL                                      0          
          6        FREE                                                     $1
          7      > RETURN                                                   1

Class Cat\Foobar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9HSQd
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     '%5BFoobar%5D'
   10     1      > RETURN                                                   null

End of function __construct

End of class Cat\Foobar.

Class Cat\Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9HSQd
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ECHO                                                     '%5BFoo%5D'
   17     1      > RETURN                                                   null

End of function __construct

End of class Cat\Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.29 ms | 1395 KiB | 15 Q