dis-bench / src /php /php-src /Zend /tests /enum /__toString.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
240 Bytes
--TEST--
Enum __toString
--FILE--
<?php
enum Foo {
case Bar;
public function __toString(): string {
return $this->name;
}
}
?>
--EXPECTF--
Fatal error: Enum Foo cannot include magic method __toString in %s on line %d