php-src/Zend/tests/enum/backed-string-heredoc.phpt
Ilija Tovilo 269c8dac1d
Implement enums
RFC: https://wiki.php.net/rfc/enumerations

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

Closes GH-6489.
2021-03-17 19:08:03 +01:00

30 lines
288 B
PHP

--TEST--
String enum value with heredoc
--FILE--
<?php
enum Foo: string {
case Bar = <<<BAR
Bar
bar
bar
BAR;
case Baz = <<<'BAZ'
Baz
baz
baz
BAZ;
}
echo Foo::Bar->value . "\n";
echo Foo::Baz->value . "\n";
?>
--EXPECT--
Bar
bar
bar
Baz
baz
baz