xref: /PHP-8.3/Zend/tests/enum/weak-map.phpt (revision bd3e5363)
1--TEST--
2Use enum as WeakMap key
3--FILE--
4<?php
5
6enum TestEnum {
7    case A;
8}
9
10$map = new WeakMap();
11$map[TestEnum::A] = 'a string';
12var_dump($map[TestEnum::A]);
13var_dump($map[TestEnum::A]);
14
15?>
16--EXPECT--
17string(8) "a string"
18string(8) "a string"
19