3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo; class Bar { public static function hello() { echo "Hello"; } } namespace Bar; class Baz { public function hello() { echo \Foo\Bar::hello(); } } $baz = new Baz(); $baz->hello();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lgi0c
function name:  (null)
number of ops:  6
compiled vars:  !0 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'Bar%5CBaz'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'hello'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function hello

End of class Foo\Bar.

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

End of function hello

End of class Bar\Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.84 ms | 1404 KiB | 13 Q