mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Use a shared non-terminal for all class modifiers. This avoids conflicts when adding modifiers that are only valid for certain targets. This change is necessary for asymmetric visibility but might be useful for other future additions. Closes GH-9926
13 lines
189 B
PHP
13 lines
189 B
PHP
--TEST--
|
|
Method cannot be readonly
|
|
--FILE--
|
|
<?php
|
|
|
|
class Test {
|
|
readonly function test() {}
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot use the readonly modifier on a method in %s on line %d
|