1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 23:18:13 +02:00
Files
archived-php-src/ext/reflection/tests/ReflectionEnumBackedCase_getBackingValue_002.phpt
T
Dmitry Stogov c6eb5dc5fd Fix possible crash in case of exception
Fixes oss-fuzz #49068
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"