xref: /PHP-8.2/tests/lang/bug44827.phpt (revision b2186ca7)
1--TEST--
2Bug #44827 (Class error when trying to access :: as constant)
3--CREDITS--
4Sebastian Schürmann
5sebs@php.net
6Testfest Munich 2009
7--FILE--
8<?php
9try {
10    define('::', true);
11} catch (ValueError $e) {
12    echo $e->getMessage(), "\n";
13}
14
15try {
16    constant('::');
17} catch (Error $e) {
18    echo $e->getMessage(), "\n";
19}
20
21?>
22--EXPECTF--
23define(): Argument #1 ($constant_name) cannot be a class constant
24Class "" not found
25