mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
RFC: https://wiki.php.net/rfc/enumerations Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Closes GH-6489.
20 lines
210 B
PHP
20 lines
210 B
PHP
--TEST--
|
|
Enum __FUNCTION__
|
|
--FILE--
|
|
<?php
|
|
|
|
enum Foo {
|
|
case Bar;
|
|
|
|
public function printFunction()
|
|
{
|
|
echo __FUNCTION__ . "\n";
|
|
}
|
|
}
|
|
|
|
Foo::Bar->printFunction();
|
|
|
|
?>
|
|
--EXPECT--
|
|
printFunction
|