Rasmus Lerdorf:
> So how about something like this:
> 
> generator function f() {
>   echo "Hello World";
> }
> 
> generator function f() {
>   return 1;
> }
> 
> generator function f($arg) {
>   if(f!$arg) yield 1;
>   else if($arg<0) return 1;
>   else return;
> }
> 
> What does the generator keyword mean in each of these cases? Anything?
> Nothing? Would I see a difference either at compile-time or at execute
> time if I left it out?

An excellent argument to use "yield" where it is needed, instead
of using "generator" at the top.

        Wietse

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to