dis-bench / src /php /php-src /Zend /tests /enum /constant-aliases.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
219 Bytes
--TEST--
Enum constants can alias cases
--FILE--
<?php
enum Foo {
case Bar;
const Baz = self::Bar;
}
function test(Foo $var) {
echo "works\n";
}
test(Foo::Bar);
test(Foo::Baz);
?>
--EXPECT--
works
works