1
0
mirror of https://github.com/php/php-src.git synced 2026-04-30 03:33:17 +02:00
Files
archived-php-src/tests/classes/interface_constant_inheritance_002.phpt
Gabriel Caruso 4aabfe911e Revert "Update versions for PHP 8.0.21"
This reverts commit 6eedacdf15.
2022-07-06 12:06:48 +02:00

17 lines
314 B
PHP

--TEST--
Ensure a class may not shadow a constant inherited from an interface.
--FILE--
<?php
interface I {
const FOO = 10;
}
class C implements I {
const FOO = 10;
}
echo "Done\n";
?>
--EXPECTF--
Fatal error: Cannot inherit previously-inherited or override constant FOO from interface I in %s on line 6