mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
7ce531f2c2
This means we get an Error exception and a much better error message indicating the root cause (e.g. accessing a private class constant).
20 lines
403 B
PHP
20 lines
403 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
|
|
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
|