php-src/ext/reflection/tests/ReflectionEnumBackedCase_getBackingValue_002.phpt
2022-07-18 15:40:11 +03:00

16 lines
294 B
PHP

--TEST--
ReflectionEnumBackedCase::getBackingValue() exception
--FILE--
<?php
enum Inm:int {
case Foo=y;
}
try {
var_dump((new ReflectionEnumBackedCase(Inm::class,'Foo'))->getBackingValue());
} catch (Error $e) {
echo $e->getMessage() . "\n";
}
?>
--EXPECT--
Undefined constant "y"