Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97790 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13516 invoked from network); 16 Jan 2017 14:58:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jan 2017 14:58:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.216 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.216 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.216] ([81.169.146.216:21648] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AD/7A-00729-F8FDC785 for ; Mon, 16 Jan 2017 09:58:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1484578700; l=2892; s=domk; d=kelunik.com; h=Content-Type:Cc:To:Subject:Date:From:References:In-Reply-To: MIME-Version; bh=hkIKJRrsFCC8UaPO0as+BbY4jrJ7Oczh5OAJ6itdIDw=; b=foxuV3GVB0G2vfgJ69dMu60CU5Z5leT87h9Y70htqUPZLw+NPBfzvJjJNaKZ03uRS9 YrV1D0B8rvoyLAZy0jU7ymHv0qoaVzw5Bn7r/AvEVk2YQ8JpVCQk79Bf0KFjctMxZRGq IWoaVN0H2R342/od9bc9YUuvg9HawWz5LhTik= X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mls2vWuiu+7SLDup6E67mzuoBPBqD/sWo= X-RZG-CLASS-ID: mo00 Received: from mail-qk0-f171.google.com ([209.85.220.171]) by smtp.strato.de (RZmta 39.11 AUTH) with ESMTPSA id 409935t0GEwKG06 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp384r1 with 384 ECDH bits, eq. 7680 bits RSA)) (Client did not present a certificate) for ; Mon, 16 Jan 2017 15:58:20 +0100 (CET) Received: by mail-qk0-f171.google.com with SMTP id s140so121441269qke.0 for ; Mon, 16 Jan 2017 06:58:20 -0800 (PST) X-Gm-Message-State: AIkVDXLpvnKbPTinYurBr4a9wBFNIMoOqNQqghz03aQgmRlKW2s0ipkXhk6EvSVan9YFIndsoHU1IXZjJB8S3w== X-Received: by 10.55.181.198 with SMTP id e189mr34250647qkf.231.1484578699507; Mon, 16 Jan 2017 06:58:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.144.132 with HTTP; Mon, 16 Jan 2017 06:58:19 -0800 (PST) In-Reply-To: References: Date: Mon, 16 Jan 2017 15:58:19 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Jani Ollikainen Cc: Jakub Zelenka , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=94eb2c06ca5206ae890546376ae5 Subject: Re: [PHP-DEV] Exposing jsonSerialize's depth From: me@kelunik.com (Niklas Keller) --94eb2c06ca5206ae890546376ae5 Content-Type: text/plain; charset=UTF-8 > > >> 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. > Even if you leave the interface as is and just pass the parameter additionally, it could have been extended by users just like in your example and pass a wrong value then. Regards, Niklas --94eb2c06ca5206ae890546376ae5--