xref: /PHP-8.3/Zend/tests/enum/cases-refcount.phpt (revision 269c8dac)
1--TEST--
2Enum cases increases refcount
3--FILE--
4<?php
5
6enum Foo {
7    case Bar;
8}
9
10function callCases() {
11    Foo::cases();
12}
13
14callCases();
15debug_zval_dump(Foo::Bar);
16
17?>
18--EXPECT--
19object(Foo)#1 (1) refcount(2){
20  ["name"]=>
21  string(3) "Bar" interned
22}
23