summaryrefslogtreecommitdiff
path: root/tests/lang/bug44827.phpt
blob: 9220439c884bd2e1576b9c6ed75dbb408bf5a70d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
Bug #44827 (Class error when trying to access :: as constant)
--CREDITS--
Sebastian Schürmann
sebs@php.net
Testfest Munich 2009
--FILE--
<?php
try {
    define('::', true);
} catch (ValueError $e) {
    echo $e->getMessage(), "\n";
}

try {
    constant('::');
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECTF--
define(): Argument #1 ($constant_name) cannot be a class constant

Fatal error: Class "" not found in %s on line %d