Re: Re: svn: /php/php-src/trunk/ NEWS ext/json/json.c ext/json/php_json.h ext/json/tests/serialize.phpt

From: Date: Tue, 11 May 2010 22:01:44 +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  Groups: php.internals 
Request: Send a blank email to internals+get-48260@lists.php.net to get a copy of this message
However nobody ever posted anything on internals about it. The differences between the implementation and the RFC as well as the questions raised by this addition show that it would be better to discuss prior to commit. But as it is in trunk, that's less a problem, that's why trunk exists: a development tree. I would still like to see some kind of discussions about it. I would prefer a simple __toJson for example (yes, that's magic) :). Apologies for not posting first. My thinking was: Minor change and only in trunk, there'll be a complaint if it's an issue.
On interface naming, my first intention was JSON\Serializable, but since NOTHING else in core is namespaced (and it makes scripting support for pre-5.3 versions complicated), I went with non-namespaced which devolved into an underscore. I prefer JSONSerializable to Jsonizable, personally, but am not over-concerned by what direction is taken. 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...). -Sara

« previous php.internals (#48260) next »