3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public function foo() { echo "C::foo\n"; D::foo(); } } class D extends C { public function foo() { echo "D::foo\n"; } } $obj = new C; $obj->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0jDT4
function name:  (null)
number of ops:  6
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'C'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'foo'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class C:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0jDT4
function name:  foo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'C%3A%3Afoo%0A'
    5     1        INIT_STATIC_METHOD_CALL                                  'D', 'foo'
          2        DO_FCALL                                      0          
    6     3      > RETURN                                                   null

End of function foo

End of class C.

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

End of function foo

End of class D.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.15 ms | 1385 KiB | 13 Q