summaryrefslogtreecommitdiff
path: root/tests/lang/bug44827.phpt
blob: 60ce81a4cee8d948a7bac77d1a1676c9be3db3e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
Bug #44827 (Class error when trying to access :: as constant)
--CREDITS--
Sebastian Schürmann
sebs@php.net
Testfest Munich 2009
--FILE--
<?php
define('::', true);
try {
    var_dump(constant('::'));
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}
?>
--EXPECTF--
Warning: Class constants cannot be defined or redefined in %s on line %d

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