Re: [PHP-DEV] Undefined variables undefined order

2015-06-10 Thread Dmitry Stogov
and also forgot _DEREF suffix in IDENTICAL/NOT_IDENTICAL opcodes. :( Thanks. Dmitry. On Wed, Jun 10, 2015 at 9:45 PM, Matt Wilmas wrote: > Hi Dmitry, > > - Original Message - > From: "Dmitry Stogov" > Sent: Wednesday, June 10, 2015 > > Hi Sara, >> >> https://gist.github.com/dstogov/6a9

Re: [PHP-DEV] Undefined variables undefined order

2015-06-10 Thread Matt Wilmas
Hi Dmitry, - Original Message - From: "Dmitry Stogov" Sent: Wednesday, June 10, 2015 Hi Sara, https://gist.github.com/dstogov/6a90601872b538d2ddd6 I see no problems committing this (running tests now). Cool. :-) Just FYI, I noticed you didn't update ZEND_BOOL_XOR, at least... Tha

Re: [PHP-DEV] Undefined variables undefined order

2015-06-10 Thread Dmitry Stogov
Hi Sara, https://gist.github.com/dstogov/6a90601872b538d2ddd6 I see no problems committing this (running tests now). Thanks. Dmitry. On Wed, Jun 10, 2015 at 9:02 PM, Dmitry Stogov wrote: > > > On Wed, Jun 10, 2015 at 6:00 PM, Sara Golemon wrote: > >> On Wed, Jun 10, 2015 at 7:50 AM, Sara Gol

Re: [PHP-DEV] Undefined variables undefined order

2015-06-10 Thread Dmitry Stogov
On Wed, Jun 10, 2015 at 6:00 PM, Sara Golemon wrote: > On Wed, Jun 10, 2015 at 7:50 AM, Sara Golemon wrote: > > On Wed, Jun 10, 2015 at 7:42 AM, Sara Golemon wrote: > >> Dmitry, what's the reasoning behind this diff in the first place? > >> Doesn't the compiler fold ( . ) already > >> anyhow?

Re: [PHP-DEV] Undefined variables undefined order

2015-06-10 Thread Dmitry Stogov
On Wed, Jun 10, 2015 at 5:42 PM, Sara Golemon wrote: > On Tue, Jun 9, 2015 at 6:05 AM, Matt Wilmas > wrote: > > Hah, looks like this just changed last week after barely 3 weeks. :-P I > > didn't verify, just noticed the code change: > > > http://git.php.net/?p=php-src.git;a=commitdiff;h=c096987

Re: [PHP-DEV] Undefined variables undefined order

2015-06-10 Thread Matt Wilmas
Hi Sara, - Original Message - From: "Sara Golemon" Sent: Wednesday, June 10, 2015 On Tue, Jun 9, 2015 at 6:05 AM, Matt Wilmas wrote: Hah, looks like this just changed last week after barely 3 weeks. :-P I didn't verify, just noticed the code change: http://git.php.net/?p=php-src.git;

Re: [PHP-DEV] Undefined variables undefined order

2015-06-10 Thread Sara Golemon
On Wed, Jun 10, 2015 at 7:50 AM, Sara Golemon wrote: > On Wed, Jun 10, 2015 at 7:42 AM, Sara Golemon wrote: >> Dmitry, what's the reasoning behind this diff in the first place? >> Doesn't the compiler fold ( . ) already >> anyhow? How would we wind up with CONCAT_CONST_CONST at runtime? >> > Der

Re: [PHP-DEV] Undefined variables undefined order

2015-06-10 Thread Sara Golemon
On Wed, Jun 10, 2015 at 7:42 AM, Sara Golemon wrote: > Dmitry, what's the reasoning behind this diff in the first place? > Doesn't the compiler fold ( . ) already > anyhow? How would we wind up with CONCAT_CONST_CONST at runtime? > Derp. Looked again, and it's (const *OR* string) && (const *OR*

Re: [PHP-DEV] Undefined variables undefined order

2015-06-10 Thread Sara Golemon
On Tue, Jun 9, 2015 at 6:05 AM, Matt Wilmas wrote: > Hah, looks like this just changed last week after barely 3 weeks. :-P I > didn't verify, just noticed the code change: > http://git.php.net/?p=php-src.git;a=commitdiff;h=c09698753e7d1d95299dca54c8ca888c885fd45b > Dmitry, what's the reasoning be

Re: [PHP-DEV] Undefined variables undefined order

2015-06-09 Thread Dmitry Stogov
I don't see a big problem changing this for few opcodes in PHP-7 VM, and make behavior "more defined". On the other hand I don't think we shouldn't "define" the order of operand evaluation. This may prevent us performing optimisations in the future. Fixing this in PHP-5.* doesn't cost the effort f

Re: [PHP-DEV] Undefined variables undefined order

2015-06-09 Thread Matt Wilmas
Hi all, - Original Message - From: "Sara Golemon" Sent: Monday, May 11, 2015 On Mon, May 11, 2015 at 5:12 PM, Matt Wilmas wrote: - Original Message - From: "Stanislav Malyshev" Sent: Monday, May 11, 2015 argument. I'd like to propose making the order of evaluation defined b

Re: [PHP-DEV] Undefined variables undefined order

2015-05-12 Thread Sara Golemon
On Mon, May 11, 2015 at 10:44 PM, Andi Gutmans wrote: > I don't think it is worth the change. I actually prefer to leave code path > optimization up to gcc here vs. trying to tell it what to do. > This isn't about optimizing code paths, it's about changing undefined behavior into defined behavior.

Re: [PHP-DEV] Undefined variables undefined order

2015-05-11 Thread Andi Gutmans
> On May 11, 2015, at 9:05 PM, Sara Golemon wrote: > >> On Mon, May 11, 2015 at 5:12 PM, Matt Wilmas wrote: >> - Original Message - >> From: "Stanislav Malyshev" >> Sent: Monday, May 11, 2015 >> argument. I'd like to propose making the order of evaluation defined by splitting

Re: [PHP-DEV] Undefined variables undefined order

2015-05-11 Thread Sara Golemon
On Mon, May 11, 2015 at 5:12 PM, Matt Wilmas wrote: > - Original Message - > From: "Stanislav Malyshev" > Sent: Monday, May 11, 2015 > >>> argument. I'd like to propose making the order of evaluation defined >>> by splitting this into separate statements: >> >> What is the purpose of this

Re: [PHP-DEV] Undefined variables undefined order

2015-05-11 Thread Matt Wilmas
Hi! - Original Message - From: "Stanislav Malyshev" Sent: Monday, May 11, 2015 Hi! argument. I'd like to propose making the order of evaluation defined by splitting this into separate statements: What is the purpose of this? I.e. why is it important that these notices would be prod

Re: [PHP-DEV] Undefined variables undefined order

2015-05-11 Thread Stanislav Malyshev
Hi! > argument. I'd like to propose making the order of evaluation defined > by splitting this into separate statements: What is the purpose of this? I.e. why is it important that these notices would be produced in certain order? -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runt

[PHP-DEV] Undefined variables undefined order

2015-05-11 Thread Sara Golemon
http://3v4l.org/uVNIS Prior to PHP 5.1 (and the introduction of compiled variables), the following code would output warnings for the undefined variables in the order they were used: echo $x . $y . $z; However, with the introduction of CVs, we wind up getting the warning for $y, then $x, and fin