mirror of
https://github.com/php/php-src.git
synced 2026-04-21 23:18:13 +02:00
269c8dac1d
RFC: https://wiki.php.net/rfc/enumerations Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Closes GH-6489.
18 lines
171 B
PHP
18 lines
171 B
PHP
--TEST--
|
|
BackedEnum::from() unknown hash
|
|
--FILE--
|
|
<?php
|
|
|
|
enum Foo: string {
|
|
case Bar = 'B';
|
|
}
|
|
|
|
$s = 'A';
|
|
$s++;
|
|
|
|
var_dump(Foo::from($s));
|
|
|
|
?>
|
|
--EXPECT--
|
|
enum(Foo::Bar)
|