summaryrefslogtreecommitdiff
path: root/ext/standard/tests/general_functions/bug72920.phpt
blob: d3508044fb1d14fbc2f1df3114a2c61baaad06c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--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 const Foo::C1