xref: /PHP-8.2/Zend/tests/enum/__call.phpt (revision 269c8dac)
1--TEST--
2Enum __call
3--FILE--
4<?php
5
6enum Foo {
7    case Bar;
8
9    public function __call(string $name, array $args)
10    {
11        return [$name, $args];
12    }
13}
14
15var_dump(Foo::Bar->baz('qux', 'quux'));
16
17?>
18--EXPECT--
19array(2) {
20  [0]=>
21  string(3) "baz"
22  [1]=>
23  array(2) {
24    [0]=>
25    string(3) "qux"
26    [1]=>
27    string(4) "quux"
28  }
29}
30