mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

RFC: https://wiki.php.net/rfc/property-hooks Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
21 lines
376 B
PHP
21 lines
376 B
PHP
--TEST--
|
|
Override attribute is not satisfied by unilateral virtual property
|
|
--FILE--
|
|
<?php
|
|
|
|
class A {
|
|
public $prop {
|
|
set {}
|
|
}
|
|
}
|
|
|
|
class B extends A {
|
|
public $prop {
|
|
#[Override]
|
|
get => parent::$prop::get();
|
|
}
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: B::$prop::get() has #[\Override] attribute, but no matching parent method exists in %s on line %d
|