mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 04:27:00 +00:00
ff4d01f940
The implementation contains an optimized implementation of the function for the common case of using a string literal as the argument. It will validate the enum existence during compilation and compile the code to use `MyEnum::cases()` directly.
10 lines
107 B
PHP
10 lines
107 B
PHP
<?php
|
|
|
|
namespace Twig\Tests;
|
|
|
|
enum DummyBackedEnum: string
|
|
{
|
|
case FOO = 'foo';
|
|
case BAR = 'bar';
|
|
}
|