Re: BC break between PHP 5.6.5 and PHP 5.6.6

From: Date: Fri, 27 Feb 2015 08:30:22 +0000
Subject: Re: BC break between PHP 5.6.5 and PHP 5.6.6
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-83980@lists.php.net to get a copy of this message
Hey: On Fri, Feb 27, 2015 at 4:06 PM, Sebastian Bergmann <sebastian@php.net> 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 <?php > 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. > maybe related to your own build? http://3v4l.org/sD8SZ seems works always consistently same since PHP5 thanks > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php -- Xinchen Hui @Laruence http://www.laruence.com/

« previous php.internals (#83980) next »