3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function dump(self $baz) { var_dump($baz); } } class Bar extends Foo { public function dump(Foo $baz) { parent::dump($baz); } } (new Foo)->dump(new Bar); (new Bar)->dump(new Bar); (new Bar)->dump(new Foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/73rBE
function name:  (null)
number of ops:  22
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'dump'
          3        NEW                                              $2      'Bar'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $2
          6        DO_FCALL                                      0          
   19     7        NEW                                              $5      'Bar'
          8        DO_FCALL                                      0          
          9        INIT_METHOD_CALL                                         $5, 'dump'
         10        NEW                                              $7      'Bar'
         11        DO_FCALL                                      0          
         12        SEND_VAR_NO_REF_EX                                       $7
         13        DO_FCALL                                      0          
   20    14        NEW                                              $10     'Bar'
         15        DO_FCALL                                      0          
         16        INIT_METHOD_CALL                                         $10, 'dump'
         17        NEW                                              $12     'Foo'
         18        DO_FCALL                                      0          
         19        SEND_VAR_NO_REF_EX                                       $12
         20        DO_FCALL                                      0          
         21      > RETURN                                                   1

Class Foo:
Function dump:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/73rBE
function name:  dump
number of ops:  5
compiled vars:  !0 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    7     4      > RETURN                                                   null

End of function dump

End of class Foo.

Class Bar:
Function dump:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/73rBE
function name:  dump
number of ops:  5
compiled vars:  !0 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        INIT_STATIC_METHOD_CALL                                  'dump'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   15     4      > RETURN                                                   null

End of function dump

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.75 ms | 1388 KiB | 15 Q