php-src/Zend/tests/property_hooks/override_attribute_fail.phpt
Ilija Tovilo 780a8280d2
[RFC] Property hooks (#13455)
RFC: https://wiki.php.net/rfc/property-hooks

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2024-07-14 11:55:03 +02:00

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