mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
RFC: https://wiki.php.net/rfc/enumerations Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Closes GH-6489.
28 lines
340 B
PHP
28 lines
340 B
PHP
--TEST--
|
|
Enum __callStatic
|
|
--FILE--
|
|
<?php
|
|
|
|
enum Foo {
|
|
public static function __callStatic(string $name, array $args)
|
|
{
|
|
return [$name, $args];
|
|
}
|
|
}
|
|
|
|
var_dump(Foo::bar('baz', 'qux'));
|
|
|
|
?>
|
|
--EXPECT--
|
|
array(2) {
|
|
[0]=>
|
|
string(3) "bar"
|
|
[1]=>
|
|
array(2) {
|
|
[0]=>
|
|
string(3) "baz"
|
|
[1]=>
|
|
string(3) "qux"
|
|
}
|
|
}
|