3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); class Foo { public function test(Bar $bar) { $bar->barMethod(); } } class Bar extends Foo { protected function barMethod(){ echo 'BAR' . "\n"; } } (new Foo())->test(new Bar());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0e27j
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   22     3        NEW                                              $1      'Foo'
          4        DO_FCALL                                      0          
          5        INIT_METHOD_CALL                                         $1, 'test'
          6        NEW                                              $3      'Bar'
          7        DO_FCALL                                      0          
          8        SEND_VAR_NO_REF_EX                                       $3
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

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

End of function test

End of class Foo.

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

End of function barmethod

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

End of function test

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.08 ms | 1396 KiB | 15 Q