3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class B_inner_i { public abstract function bar(); } class B_inner extends B_inner_i { public function bar() { 1+1; } } class B { public function foo(B_inner_i $b) { $b->bar(); } } $b = new B(); $b_inner = new B_inner(); $b->foo($b_inner);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S4IkF
function name:  (null)
number of ops:  10
compiled vars:  !0 = $b, !1 = $b_inner
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   10     3        NEW                                              $5      'B_inner'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   12     6        INIT_METHOD_CALL                                         !0, 'foo'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function bar

End of class B_inner_i.

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

End of function bar

End of class B_inner.

Class B:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S4IkF
function name:  foo
number of ops:  4
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        INIT_METHOD_CALL                                         !0, 'bar'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   null

End of function foo

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.27 ms | 1394 KiB | 13 Q