Re: [PHP-DEV] Generator::

2018-03-16 Thread Christoph M. Becker
On 16.03.2018 at 17:00, Nikita Popov wrote: > On Fri, Mar 16, 2018 at 4:44 PM, Christoph M. Becker > wrote: > >> Wrt. I wonder whether the behavior has >> actually been deliberately designed this way (i.e. whether it is indeed >> a documentation issue). >> >> Conside

Re: [PHP-DEV] Generator::

2018-03-16 Thread Nikita Popov
On Fri, Mar 16, 2018 at 4:44 PM, Christoph M. Becker wrote: > Hi everybody! > > Wrt. I wonder whether the behavior has > actually been deliberately designed this way (i.e. whether it is indeed > a documentation issue). > > Consider the following variation of the Gener

[PHP-DEV] Generator::

2018-03-16 Thread Christoph M. Becker
Hi everybody! Wrt. I wonder whether the behavior has actually been deliberately designed this way (i.e. whether it is indeed a documentation issue). Consider the following variation of the Generator::send() example: . I certainly would not exp

Re: [PHP-DEV] generator/yield operator feature request

2009-01-13 Thread moo.tinys
> On the contrary, It will most likely require a lot of changes to > provide structures that are able to store their execution context to > be able to resume it later. I.e. > > function foo() { >error_reporting(0); >yield "foo"; >trigger_error("foo", E_NOTICE); >yield "bar"; > } > $

Re: [PHP-DEV] generator/yield operator feature request

2009-01-13 Thread Etienne Kneuss
Hello, On Tue, Jan 13, 2009 at 1:30 PM, moo.tinys wrote: > this topic may be discussed before, but i'd bring it up again. > > closure was introduced in PHP 5.3, function with its context can now > be stored in an callable object(or a handler in string type, whatever) > i think it's easy and read

[PHP-DEV] generator/yield operator feature request

2009-01-13 Thread moo.tinys
this topic may be discussed before, but i'd bring it up again. closure was introduced in PHP 5.3, function with its context can now be stored in an callable object(or a handler in string type, whatever) i think it's easy and read to introduce generator and yield operator in php let's see what was