mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
5770b66722
Closes GH-5847
22 lines
439 B
PHP
22 lines
439 B
PHP
--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
|