Skip to content

Conversation

@zonuexe
Copy link
Member

@zonuexe zonuexe commented Aug 18, 2016

iterable and void keyword is implemented in PHP 7.1.0alpha3.

Example

https://3v4l.org/VLjTY

<?php

function a(iterable $b = []) :void
{
    foreach ($b as $c) {
        var_dump($c);
    }
}

a(call_user_func(function(){ yield; }));

@syohex
Copy link
Collaborator

syohex commented Aug 18, 2016

void is not added. ??

@zonuexe
Copy link
Member Author

zonuexe commented Aug 18, 2016

I forgot push another commit...

@syohex syohex merged commit 5fa7e7d into emacs-php:master Aug 18, 2016
@syohex
Copy link
Collaborator

syohex commented Aug 18, 2016

Thanks

@zonuexe zonuexe deleted the language-keyword-iterable branch August 18, 2016 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants