summaryrefslogtreecommitdiff
path: root/Zend/tests/enum/cases-refcount.phpt
blob: 040589ca2331458372ee4410c19e6a9edeec2e57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Enum cases increases refcount
--FILE--
<?php

enum Foo {
    case Bar;
}

function callCases() {
    Foo::cases();
}

callCases();
debug_zval_dump(Foo::Bar);

?>
--EXPECT--
object(Foo)#1 (1) refcount(2){
  ["name"]=>
  string(3) "Bar" interned
}