Re: Re: svn: /php/php-src/trunk/ NEWS ext/json/json.c ext/json/php_json.h ext/json/tests/serialize.phpt
| From: | Adam Harvey | Date: | Wed, 12 May 2010 03:52:20 +0000 |
| Subject: | Re: Re: svn: /php/php-src/trunk/ NEWS ext/json/json.c ext/json/php_json.h ext/json/tests/serialize.phpt | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48262@lists.php.net to get a copy of this message | ||
On 12 May 2010 06:01, Sara Golemon <pollita@php.net> wrote:
> On method naming, I was following the pattern of __*() for "always on" magic
> methods (__get(), __set(), etc...) versus interface-induced magic methods
> (offsetGet(), offsetSet(), etc...).
Agreed. I don't have any real preference on the interface name, but I
definitely think double-underscore prefixed method names should be
saved for global (engine-level, I guess you might say) magic methods,
which this certainly doesn't appear to be (and doesn't need to be).
Ergo, I'd much prefer jsonSerialize() to __toJSON().
Adam