mirror of
https://github.com/php/php-src.git
synced 2024-12-04 23:34:25 +08:00
8094bd1b58
* Make `ReflectionGenerator::getFunction()` legal after generator termination * Expose the generator function name via `Generator::__debugInfo()` * Allow creating `ReflectionGenerator` after termination * Reorder `struct _zend_generator` to avoid a hole * Adjust `ext/reflection/tests/028.phpt` This is legal now. * Fix Generator Closure collection * Add test to verify the Closure dies with the generator * NEWS / UPGRADING
33 lines
578 B
PHP
33 lines
578 B
PHP
<?php
|
|
|
|
/** @generate-class-entries */
|
|
|
|
/**
|
|
* @strict-properties
|
|
* @not-serializable
|
|
*/
|
|
final class Generator implements Iterator
|
|
{
|
|
public function rewind(): void {}
|
|
|
|
public function valid(): bool {}
|
|
|
|
public function current(): mixed {}
|
|
|
|
public function key(): mixed {}
|
|
|
|
public function next(): void {}
|
|
|
|
public function send(mixed $value): mixed {}
|
|
|
|
public function throw(Throwable $exception): mixed {}
|
|
|
|
public function getReturn(): mixed {}
|
|
|
|
public function __debugInfo(): array {}
|
|
}
|
|
|
|
class ClosedGeneratorException extends Exception
|
|
{
|
|
}
|