Re: Implement Generator::__invoke($value) as alias to Generator::send($value)

From: Date: Fri, 20 May 2016 14:47:01 +0000
Subject: Re: Implement Generator::__invoke($value) as alias to Generator::send($value)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-93420@lists.php.net to get a copy of this message
2016-05-20 17:41 GMT+03:00 Niklas Keller <me@kelunik.com>: > 2016-05-20 15:34 GMT+02:00 S.A.N <ua.san.alex@gmail.com>: >> >> Many interfaces work with callback functions, but they might work with >> the generators, if there was a method Generator::__invoke($value). > > > You can just use [$generator, "send"]. > Yes, but it is slow and not nice :)

« previous php.internals (#93420) next »