mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
a706d7302a
Currently interface methods with visibility `private` or `protected` fail with an error message: Access type for interface method A::b() must be omitted However, explicitly setting visibility `public` is allowed and often desired. This commit updates the error message to: Access type for interface method A::b() must be public
13 lines
229 B
PHP
13 lines
229 B
PHP
--TEST--
|
|
ZE2 An interface method cannot be private
|
|
--FILE--
|
|
<?php
|
|
|
|
interface if_a {
|
|
abstract private function err();
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Access type for interface method if_a::err() must be public in %s on line %d
|