2015-03-02 0:52 GMT+01:00 Daniel Lowrey <rdlow...@php.net>:

> Hi folks,
>
> I'd like to initiate discussion on a proposal to implement generator
> delegation via the following new syntax inside generator functions:
>
>     yield * <expr>
>
> The Generator Delegation RFC is available here:
>
> https://wiki.php.net/rfc/generator-delegation
>
> This proposal is conceptually related to (and requires functionality
> proposed by) the forerunning Generator Return Expressions RFC here:
>
> https://wiki.php.net/rfc/generator-return-expressions
>
>
> Thanks for your time,
>
> Daniel
>

The proposed syntax has an issue:

<?php

function a () {
    echo yield * 3;
}

$a = a();
$a->send(42);

http://3v4l.org/n1sGb#v550

This is currently valid PHP.

Regards, Niklas

Reply via email to