summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/ReflectionClassConstant_toString_error.phpt
blob: 54290e97aa30a4621a5281f2db9b4ae6dfeed688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Exception thrown while converting ReflectionClassConstant to string
--FILE--
<?php

class B {
    const X = self::UNKNOWN;
}

try {
    echo new ReflectionClassConstant('B', 'X');
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
Undefined constant self::UNKNOWN