Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83975 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2288 invoked from network); 27 Feb 2015 08:20:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 08:20:51 -0000 Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.178 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 209.85.220.178 mail-vc0-f178.google.com Received: from [209.85.220.178] ([209.85.220.178:46266] helo=mail-vc0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/06-32582-0E820F45 for ; Fri, 27 Feb 2015 03:20:50 -0500 Received: by mail-vc0-f178.google.com with SMTP id hq11so5804623vcb.9 for ; Fri, 27 Feb 2015 00:20:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=W94BjLhH8unS63N98icol7v8+CRNgc+Y2JVV5hjWD30=; b=jk8aZgVvVs6oP7/OEpyqCN6XMXuYlAxWNb4Lq8DE0AkSYF1B9AhAgW/dwnbISRJ3Jg 7iSSZ22LQSN7crzr32S16sVLpql+gWoERunUYCX9pb2jxjAz8U5aTy7ttJyNF8M/OdBr 6/vPNfv4hpAZZ5JZX8BErbOoj6ZVRdrDY9kUH3548Z1Z0UMd9dFpGTnfmUlosy3kMo4U 2VP/wiMjGjmLmqZX2KSRgdh2aWvYZe1N7XGpIUNuzh8ndNpQJD27OybJoSJJ1wfycmEd Ii3VIRR1nTzxHCGCZ91R5WP4mHNgdgP6fbehdfnGuswWf1XUwBVx6j3N2RgVQnvbK+7D A+mw== MIME-Version: 1.0 X-Received: by 10.52.28.19 with SMTP id x19mr12227242vdg.39.1425025246450; Fri, 27 Feb 2015 00:20:46 -0800 (PST) Received: by 10.52.177.10 with HTTP; Fri, 27 Feb 2015 00:20:46 -0800 (PST) In-Reply-To: <54F02593.7040903@php.net> References: <54F02593.7040903@php.net> Date: Fri, 27 Feb 2015 08:20:46 +0000 Message-ID: To: Sebastian Bergmann Cc: internals@lists.php.net, dmitry@zend.com Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] BC break between PHP 5.6.5 and PHP 5.6.6 From: leight@gmail.com (Leigh) On 27 February 2015 at 08:06, Sebastian Bergmann wrote: > While working on PHPUnit today I noticed one test of its own test > suite failing on PHP 5.6.6 that passes on PHP 5.6.5. The details of > this can be found at > > https://github.com/sebastianbergmann/phpunit/issues/1630 > > Florian Margaine reduced the problem to the following minimal, > self-contained, reproducing script: > > 1 2 class Foo extends Exception > 3 { > 4 public function __construct() > 5 { > 6 $this->code = 123; > 7 } > 8 } > 9 > 10 try > 11 { > 12 throw new Foo; > 13 } > 14 > 15 catch (Exception $e) > 16 { > 17 assert($e->code === 123); > 18 } > > The above script works as expected on PHP 5.6.5 but errors out on > PHP 5.6.6: > > PHP Fatal error: Cannot access protected property Foo::$code in > /home/sb/exception.php on line 17 > PHP Stack trace: > PHP 1. {main}() /home/sb/exception.php:0 > > I do not see a change in http://php.net/ChangeLog-5.php#5.6.6 that would > explain this. Looking through git blames, this property has been protected for a long time. Possibly related (although not at all sure), Dmitry made some changes to zend_read_property() https://github.com/php/php-src/commit/3e31838d19750d287431d22e9290856ec962fd6a