Cannot use ‘readonly’ as method modifier¶
Description¶
readonly is an option for properties, and it is not available for methods nor constants.
Example¶
<?php
class X {
private readonly function foo() {}
}
?>
Solutions¶
Remove the option from the method signature.