Re: PATCH: Implementing closures in PHP
| From: | Jon Parise | Date: | Mon, 24 Dec 2007 20:06:44 +0000 |
| Subject: | Re: PATCH: Implementing closures in PHP | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34240@lists.php.net to get a copy of this message | ||
On Mon, Dec 24, 2007 at 04:14:00PM +0100, Christian Seiler wrote:
> > 3. The "is_anonymous" flags could be zend_bool values instead of bare
> > integers, although that breaks the precedent started by some
> > related flags (such as "is_method").
>
> You're right, zend_bool is a better idea. Since PHP 5.3 is going to
> break binary compability anyway, would it do any harm changing the
> types of the existing flags, too?
I don't have a strong opinion one way or another, but other folks
might.
I think using it would make the API clearer, and there might be memory
size benefits when used as a structure member.
On the other hand, changing those integers to zend_bool (unsigned
char) types could potentially have a runtime performance cost on some
platforms (depending on how those values are being marshaled around),
but that would have to be measured.
--
Jon Parise (jon of php.net) :: The PHP Project (http://www.php.net/)