summaryrefslogtreecommitdiff
path: root/Zend/tests/enum/no-unsed-value.phpt
blob: a1cbdd43cad44a421786cf1580b817efb58febb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--TEST--
Enum prevent unsetting value
--FILE--
<?php

enum Foo: int {
    case Bar = 0;
}

unset(Foo::Bar->value);

?>
--EXPECTF--
Fatal error: Cannot use temporary expression in write context in %s on line %d