summaryrefslogtreecommitdiff
path: root/Zend/tests/bug51791.phpt
blob: 7675cb564d2666e46a3a1b8e99ff177f8eb6bbd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Bug #51791 (constant() failed to check undefined constant and php interpreter stopped)
--FILE--
<?php

class A  {
    const B = 1;
}
try {
    constant('A::B1');
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
Undefined constant A::B1