1--TEST-- 2Bug #72920 (Accessing a private constant using constant() creates an exception AND warning) 3--FILE-- 4<?php 5class Foo { 6 private const C1 = "a"; 7} 8 9try { 10 var_dump(constant('Foo::C1')); 11} catch (Error $e) { 12 echo $e->getMessage(), "\n"; 13} 14?> 15--EXPECT-- 16Cannot access private constant Foo::C1 17