File size: 439 Bytes
1e94262 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | --TEST--
Bug #44827 (define() allows :: in constant names)
--FILE--
<?php
try {
define('foo::bar', 1);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
try {
define('::', 1);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
?>
--EXPECT--
define(): Argument #1 ($constant_name) cannot be a class constant
define(): Argument #1 ($constant_name) cannot be a class constant
|