3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Fooable { } class Foo implements Fooable {} abstract class Bar { public function dump(Foo $object) { var_dump($object); } } class Baz extends Bar { public function dump(Fooable $object) { var_dump($object); } } (new Baz)->dump(new Foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nWVSM
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'foo'
   17     1        DECLARE_CLASS                                            'baz', 'bar'
   25     2        NEW                                              $0      'Baz'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $0, 'dump'
          5        NEW                                              $2      'Foo'
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $2
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Class Fooable: [no user functions]
Class Foo: [no user functions]
Class Bar:
Function dump:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nWVSM
function name:  dump
number of ops:  5
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   14     4      > RETURN                                                   null

End of function dump

End of class Bar.

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

End of function dump

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.08 ms | 1395 KiB | 15 Q