summaryrefslogtreecommitdiff
path: root/ext/standard/tests/general_functions/bug72920.phpt
blob: b5ca4760c307ef96751d46cd846ced8bc3dc3a13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--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) {
	var_dump($e->getMessage());
}
--EXPECT--
string(35) "Cannot access private const Foo::C1"