Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97777 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78728 invoked from network); 16 Jan 2017 08:22:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jan 2017 08:22:32 -0000 Authentication-Results: pb1.pair.com header.from=jani.ollikainen@valve.fi; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jani.ollikainen@valve.fi; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain valve.fi designates 104.47.1.88 as permitted sender) X-PHP-List-Original-Sender: jani.ollikainen@valve.fi X-Host-Fingerprint: 104.47.1.88 mail-ve1eur01on0088.outbound.protection.outlook.com Received: from [104.47.1.88] ([104.47.1.88:3840] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C7/05-00729-7C28C785 for ; Mon, 16 Jan 2017 03:22:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valvegroup.onmicrosoft.com; s=selector1-valve-fi; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=9BIAVd7jA92dsg91vgaEb7mbALOSa0rq4zzc27pUKEo=; b=WElVQiE0sUcn6/Ol63DOjQbl0GGHr2osqIowCw41ykLgrBlpPK8Wa4fFz/7Wdqe1NuOJ/NcbMLFYA9rrvlH9A36uOQwJTO9TbrpDzehxlizdsrSbcBjvMP/m1k/KKBnL2PG6dDmqxOjxl+uR1d5cMrZhtyG0ysK/LERdFXJj+g0= Received: from DB5PR0101MB1736.eurprd01.prod.exchangelabs.com (10.166.9.135) by DB5PR0101MB1734.eurprd01.prod.exchangelabs.com (10.166.9.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Mon, 16 Jan 2017 08:22:27 +0000 Received: from DB5PR0101MB1736.eurprd01.prod.exchangelabs.com ([10.166.9.135]) by DB5PR0101MB1736.eurprd01.prod.exchangelabs.com ([10.166.9.135]) with mapi id 15.01.0845.014; Mon, 16 Jan 2017 08:22:27 +0000 To: Stanislav Malyshev , "internals@lists.php.net" Thread-Topic: [PHP-DEV] Exposing jsonSerialize's depth Thread-Index: AdJr3wCKd9NCtniTR+e4Syl9oAheTADvBdsAAA2GXWA= Date: Mon, 16 Jan 2017 08:22:27 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=jani.ollikainen@valve.fi; x-originating-ip: [83.145.221.65] x-ms-office365-filtering-correlation-id: 51d15e75-5755-44c8-5c7f-08d43de8ceb1 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB5PR0101MB1734; x-microsoft-exchange-diagnostics: 1;DB5PR0101MB1734;7:nvk5kembgIkwRIfyPC75vNPkGHbJw3Y+GHSpBeMIxG7RM19XUsSyxvDbjgEaA119ZC0L23WZTMUCvqEctDzhSbJLhf6LYV43/jPPGgjBoQWdLpohlbDT6he12FMm9m2A/1BT+kboduyynki7uzCHKU2cfDdU9M6cMhoxq0XwXolgEdps1qqB7JaOj6Ocd9QAqFYFp0HXS6s221kGW1ULvOtm4MTvjzd+B+f6X67ZNeJ9PF8cKg7CYldiurhAiXtftGcE0xWOJm9/vB0sivbX4q+3UKke52iBII24/9OkbSnhWo/O5xDd+u3auSXH94TPm2XsYYvgyTK+iHkef8f2tLqEVWDASOKGQG/ZUcYv0I9XfFgvVb4IGNhIVpmWtZdDjwApsD3oyBUZo/nd2EJNsxGHFK6DHJ3rb43AAGGTo15LUcKUUqkuzBuEo5aJgT0SRciqxniKncXQMCc5ji9VIA== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(2016111802025)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148)(6043046);SRVR:DB5PR0101MB1734;BCL:0;PCL:0;RULEID:;SRVR:DB5PR0101MB1734; x-forefront-prvs: 01894AD3B8 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39450400003)(39410400002)(39840400002)(189002)(199003)(2900100001)(68736007)(3660700001)(122556002)(92566002)(81166006)(9686003)(81156014)(101416001)(8676002)(8936002)(74316002)(25786008)(99286003)(2501003)(66066001)(5660300001)(6436002)(27001)(39060400001)(77096006)(55016002)(6306002)(305945005)(7696004)(6506006)(7736002)(38730400001)(2950100002)(189998001)(86362001)(107886002)(229853002)(106356001)(105586002)(33656002)(76176999)(3280700002)(50986999)(54356999)(6116002)(97736004)(2906002)(5001770100001)(102836003)(3846002)(74482002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB5PR0101MB1734;H:DB5PR0101MB1736.eurprd01.prod.exchangelabs.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: valve.fi does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: valve.fi X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jan 2017 08:22:27.3958 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: ea0c456e-fe7f-4e16-896f-4f5aaeb9c362 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0101MB1734 Subject: RE: [PHP-DEV] Exposing jsonSerialize's depth From: jani.ollikainen@valve.fi (Jani Ollikainen) Hi, > This looks like a hack covering for deficient design. Having objects that= look differently depending on hidden parameters without anybody explicitly > modifying them is a recipe for very hard to track bugs. I don't think we = should encourage this. > > There are ways to present serialized view of the object (sleep/wakeup, Se= rializable, etc.) but I don't think depth has anything to do with it. There is no hidden parameters. There is no "without anybody explicitly modi= fying". It's data that is in MongoDB. It's basicly autoloading for mongodb'= s dbrefs. https://docs.mongodb.com/manual/reference/database-references/#db= refs And yes, it doesn't have anything to do with that.