dis-bench / src /php /php-src /Zend /tests /enum /backed-tryFrom-unknown-hash.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
177 Bytes
--TEST--
BackedEnum::tryFrom() unknown hash
--FILE--
<?php
enum Foo: string {
case Bar = 'B';
}
$s = 'A';
$s++;
var_dump(Foo::tryFrom($s));
?>
--EXPECT--
enum(Foo::Bar)