1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 19:41:05 +02:00
Files
archived-php-src/Zend/tests/enum/no-from.phpt
Ilija Tovilo 269c8dac1d Implement enums
RFC: https://wiki.php.net/rfc/enumerations

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

Closes GH-6489.
2021-03-17 19:08:03 +01:00

17 lines
251 B
PHP

--TEST--
Enum no manual from method
--FILE--
<?php
enum Foo: int {
case Bar = 0;
public static function from(string|int $value): self {
return $this;
}
}
?>
--EXPECTF--
Fatal error: Cannot redeclare Foo::from() in %s on line %d