mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
RFC: https://wiki.php.net/rfc/property-hooks Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
21 lines
280 B
PHP
21 lines
280 B
PHP
--TEST--
|
|
Final hooks
|
|
--FILE--
|
|
<?php
|
|
|
|
class A {
|
|
public $prop {
|
|
final get { return 42; }
|
|
}
|
|
}
|
|
|
|
class B extends A {
|
|
public $prop {
|
|
get { return 24; }
|
|
}
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot override final property hook A::$prop::get() in %s on line %d
|