1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00
Files
archived-php-src/ext/standard/tests/general_functions/bug72920.phpt
T
2020-07-10 21:05:28 +02:00

17 lines
309 B
PHP

--TEST--
Bug #72920 (Accessing a private constant using constant() creates an exception AND warning)
--FILE--
<?php
class Foo {
private const C1 = "a";
}
try {
var_dump(constant('Foo::C1'));
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Cannot access private constant Foo::C1