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>
20 lines
280 B
PHP
20 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
|