mirror of
https://github.com/php/php-src.git
synced 2024-09-23 19:07:26 +00:00
21 lines
414 B
PHP
21 lines
414 B
PHP
--TEST--
|
|
Bug #73987 (Method compatibility check looks to original definition and not parent - return types abstract)
|
|
--FILE--
|
|
<?php
|
|
|
|
abstract class A {
|
|
abstract function example();
|
|
}
|
|
|
|
class B extends A {
|
|
function example(): int { }
|
|
}
|
|
|
|
class C extends B {
|
|
function example(): string { }
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Declaration of C::example(): string must be compatible with B::example(): int in %s
|