1--TEST--
2Bug #51791 (constant() failed to check undefined constant and php interpreter stopped)
3--FILE--
4<?php
5
6class A {
7 const B = 1;
8}
9try {
10 constant('A::B1');
11} catch (Error $e) {
12 echo $e->getMessage(), "\n";
13}
14
15?>
16--EXPECT--
17Undefined constant A::B1
18