RE: [PHP-DEV] Exposing jsonSerialize's depth
| From: | Jani Ollikainen | Date: | Mon, 16 Jan 2017 13:32:55 +0000 |
| Subject: | RE: [PHP-DEV] Exposing jsonSerialize's depth | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-97788@lists.php.net to get a copy of this message | ||
Hi.
>> What BC break are you talking about? There is no need for using the parameter in old codes.
>> Even if we pass that depth to jsonSerialize
>> doing something like: "public function jsonSerialize() {...}" will still work
>> without any problems.
> That BC break: https://3v4l.org/L1u7q
And where you have it like that? Yes, if I run your example I have that error. If with patched
php/json or non-patched, I can have:
https://3v4l.org/BccPi and it just works. Without any
problems.. But now I understands what you meant by documentation,
if you want to describe interface JsonSerializable with PHP. Yes then if you do it like that it
causes BC problems.
If you just leave it like it is, it works. Granted it's kind of weird then. With BC problem I
don't see a problem seeing this in some
future PHP version that has that BC change.