1
0
mirror of https://github.com/php/php-src.git synced 2026-04-13 02:52:48 +02:00
Files
archived-php-src/tests/classes/constants_visibility_error_004.phpt
2020-02-03 22:52:20 +01:00

15 lines
325 B
PHP

--TEST--
A redeclared class constant must have the same or higher visibility
--FILE--
<?php
class A {
protected const protectedConst = 0;
}
class B extends A {
private const protectedConst = 1;
}
--EXPECTF--
Fatal error: Access level to B::protectedConst must be protected (as in class A) or weaker in %s on line 9