1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/Zend/tests/enum/__callStatic.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

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"
}
}