1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 08:42:29 +01:00
Files
archived-php-src/tests/lang/bug44827.phpt
2020-07-21 14:47:03 +02:00

26 lines
459 B
PHP

--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