Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96356 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27798 invoked from network); 13 Oct 2016 21:52:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Oct 2016 21:52:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.176 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.176 mail-pf0-f176.google.com Received: from [209.85.192.176] ([209.85.192.176:36707] helo=mail-pf0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0E/47-41968-B1200085 for ; Thu, 13 Oct 2016 17:52:30 -0400 Received: by mail-pf0-f176.google.com with SMTP id e6so40017737pfk.3 for ; Thu, 13 Oct 2016 14:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=MTkupERkFQDtY9EeEdC7K5euYAHtga8IUXypkfPvW7k=; b=dyBAy0I6N+GD529P4jypph2wr1d8XeZ9Bjih2Xi3zBXckSw5trYhhQ28j7DatTwxFm jRyx4A4sbBfjocWFSv2VQvL00ckU4GOarkBC1x6KAthH/nqVvwUXs8kMcSViuOhvwEiV cOd+y+Js1dmHbeQjtVmjk/Dk2DD29psjezCrL/zX+9HkMj75VjEQiHBv4uJckfBqqdH0 O/ymD1dQGipxJHj012vAXb/zzDhAbWc2JRisloSTLJPwWSWiEonmrkECnELu3FIPpIi8 D7zOiG9nNk15KT9VKw/MB/5WhyY/pu26q6cGYAEsXm2UT9i+8i4ZHWOlG2vB0vghPZGr AsUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=MTkupERkFQDtY9EeEdC7K5euYAHtga8IUXypkfPvW7k=; b=Ng/wZLUd2b/UavsVrL0i11fy7whN6Hd9ZjaKJMcHEQ3XKmslyBsef5pvss3rvFBXeO 8HXRXr5mQDEjZbnW7lM+9MtjrVKcy+BGmFFVR4r/6y+cFHWZmJ+81bhb8hdIj+h9VDur a/zXTb4LFaZNLBRIBCpYky42/isSStEsqhNICrwy+aKgaRPbq2btROiLzKjXH7ykU06V ZGHZjRE7tKgQ+x8UokwJp+ErB0HJp138aGFvDd2z4VZq7+1sYNWBdu/d5xACEaTThn2U aj/lc3SGyGZRXT5qopTd/D1ufeBKSSSo3IUHUlHq7bRO8Sfqc8NaMtqV1SuF9M/pEPal c9vg== X-Gm-Message-State: AA6/9RkDYFxZTL/gsYpjRm3zeZBYarwwd0fE9jJ0RKAZpAyMjVaBKjUy1E+G3XccwIpQPg== X-Received: by 10.99.101.65 with SMTP id z62mr10754785pgb.89.1476395545014; Thu, 13 Oct 2016 14:52:25 -0700 (PDT) Received: from Stas-Air.local (108-233-206-104.lightspeed.sntcca.sbcglobal.net. [108.233.206.104]) by smtp.gmail.com with ESMTPSA id y125sm21902797pfb.16.2016.10.13.14.52.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Oct 2016 14:52:24 -0700 (PDT) To: Anatol Belski , 'Nikita Popov' References: <010701d2218e$b2e12d60$18a38820$@belski.net> <002001d22223$23363300$69a29900$@belski.net> <025201d2259a$21e542f0$65afc8d0$@belski.net> Cc: 'Xinchen Hui' , 'Davey Shafik' , 'Derick Rethans' , 'PHP Developers Mailing List' Message-ID: <8d5a4bf7-3766-ae3c-400c-40b17df33a83@gmail.com> Date: Thu, 13 Oct 2016 14:52:23 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <025201d2259a$21e542f0$65afc8d0$@belski.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Regression between RC1 and RC2? From: smalyshev@gmail.com (Stanislav Malyshev) Hi! >> So the problem basically is that in PHP 7.0 both print_r and var_dump directly >> print to output. This means that by the time the exception is thrown, we've >> already written output. This makes it unclear how exactly the exception should >> be handled. Is it okay to just print everything and handle the exception >> afterward? This seems odd to me -- if an operation fails it shouldn't do anything. This sounds nice in theory, in practice often impossible. I.e. if you already started printing and then some dependency fails, then you get half-printed output. That's fine IMHO. Exception is not a normal condition, so you get result which is not normal. >> In PHP 7.1 I've rewritten print_r() to use an internal buffer, so we could handle >> this case completely gracefully. The same change could be implemented for >> var_dump(). With this approach we'd only print anything if no exception >> occurred. This is ok, but I don't think it's required. If you've got in exception in conversion, all bets are off, any result that passes a low sanity margin IMHO is ok - including both printing whatever happened before the exception and not printing anything. -- Stas Malyshev smalyshev@gmail.com