3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { public function doSomething(int $foo = null): void; } class Bar implements Foo { public function doSomething(?int $foo = null): void { } } class ExtendedBar extends Bar { public function doSomething(int $foo = null): void { parent::doSomething($foo); } } interface Foo2 { public function doSomething(?int $foo = null): void; } class Bar2 implements Foo2 { public function doSomething(int $foo = null): void { } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VmY1C
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'bar'
   16     1        DECLARE_CLASS                                            'extendedbar', 'bar'
   29     2        DECLARE_CLASS                                            'bar2'
   35     3      > RETURN                                                   1

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

End of function dosomething

End of class Foo.

Class Bar:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VmY1C
function name:  doSomething
number of ops:  2
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV_INIT                                        !0      null
   13     1      > RETURN                                                   null

End of function dosomething

End of class Bar.

Class ExtendedBar:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VmY1C
function name:  doSomething
number of ops:  5
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV_INIT                                        !0      null
   20     1        INIT_STATIC_METHOD_CALL                                  'doSomething'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   21     4      > RETURN                                                   null

End of function dosomething

End of class ExtendedBar.

Class Foo2:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VmY1C
function name:  doSomething
number of ops:  2
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV_INIT                                        !0      null
          1      > RETURN                                                   null

End of function dosomething

End of class Foo2.

Class Bar2:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VmY1C
function name:  doSomething
number of ops:  2
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   RECV_INIT                                        !0      null
   34     1      > RETURN                                                   null

End of function dosomething

End of class Bar2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.1 ms | 1000 KiB | 13 Q