3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A { public function foo(); } class B { public function bar() { return 'World'; } } class C extends B implements A { public function foo(): string { return 'Hello'; } public function bar(): string { return parent::bar(); } } $c = new C(); echo sprintf('%s %s', $c->foo(), $c->bar());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5lN5J
function name:  (null)
number of ops:  15
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   DECLARE_CLASS                                            'c', 'b'
   27     1        NEW                                              $1      'C'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   29     4        INIT_FCALL                                               'sprintf'
          5        SEND_VAL                                                 '%25s+%25s'
          6        INIT_METHOD_CALL                                         !0, 'foo'
          7        DO_FCALL                                      0  $4      
          8        SEND_VAR                                                 $4
          9        INIT_METHOD_CALL                                         !0, 'bar'
         10        DO_FCALL                                      0  $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                         $6      
         13        ECHO                                                     $6
         14      > RETURN                                                   1

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

End of function foo

End of class A.

Class B:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5lN5J
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   'World'
   11     1*     > RETURN                                                   null

End of function bar

End of class B.

Class C:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5lN5J
function name:  foo
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E > > RETURN                                                   'Hello'
   19     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5lN5J
function name:  bar
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_STATIC_METHOD_CALL                                  'bar'
          1        DO_FCALL                                      0  $0      
          2        VERIFY_RETURN_TYPE                                       $0
          3      > RETURN                                                   $0
   24     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function bar

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.82 ms | 1400 KiB | 15 Q