mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
14 lines
216 B
PHP
14 lines
216 B
PHP
--TEST--
|
|
Int enum invalid const expr
|
|
--FILE--
|
|
<?php
|
|
|
|
enum Foo: int {
|
|
case Bar = 1 + $x;
|
|
}
|
|
|
|
var_dump(Foo::Bar->value);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Constant expression contains invalid operations in %s on line %d
|