3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace { class Bar extends PDO { public function baz() { parent::baz(); } } class PDO { public function baz() { echo __METHOD__; } } } namespace Foo { class FooBar extends Bar { } } namespace { $bar = new Foo\Bar(); $bar->baz(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rFBF9
function name:  (null)
number of ops:  8
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   DECLARE_CLASS                                            'pdo'
   24     1        DECLARE_CLASS                                            'foo%5Cfoobar', 'foo%5Cbar'
   32     2        NEW                                              $1      'Foo%5CBar'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   33     5        INIT_METHOD_CALL                                         !0, 'baz'
          6        DO_FCALL                                      0          
   34     7      > RETURN                                                   1

Class Bar:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rFBF9
function name:  baz
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_STATIC_METHOD_CALL                                  'baz'
          1        DO_FCALL                                      0          
   10     2      > RETURN                                                   null

End of function baz

End of class Bar.

Class PDO:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rFBF9
function name:  baz
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ECHO                                                     'PDO%3A%3Abaz'
   18     1      > RETURN                                                   null

End of function baz

End of class PDO.

Class Foo\FooBar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.79 ms | 1393 KiB | 13 Q