summaryrefslogtreecommitdiff
path: root/Zend/tests/bug44827.phpt
blob: 8e51087480bd7612060daed65a378fe8817dea87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--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