Re: [PHP-DEV] Re: [PATCH] Constant expr folding (again), and other things

2008-09-02 Thread Stanislav Malyshev
Hi! I forgot to reply to Stas' message yesterday, sorry... But, there is no change in behavior here either as far as I know. For the code Stas quoted, with static vars (if that's what was being referred to), there's definitely not been a change (though its parser code was tweaked a bit), and t

Re: [PHP-DEV] Re: [PATCH] Constant expr folding (again), and other things

2008-08-31 Thread Matt Wilmas
Hi Stas, Dmitry, I forgot to reply to Stas' message yesterday, sorry... But, there is no change in behavior here either as far as I know. For the code Stas quoted, with static vars (if that's what was being referred to), there's definitely not been a change (though its parser code was tweaked a

Re: [PHP-DEV] Re: [PATCH] Constant expr folding (again), and other things

2008-08-31 Thread Dmitry Stogov
Hi Stas, We discussed this patch with Matt, and I allowed this change. So it probably my fault (I missed run-time locale change possibility). I don't think it is a really big issue, but it really may change behavior of some scripts. I think we should revert this patch, before we get complete sol

Re: [PHP-DEV] Re: [PATCH] Constant expr folding (again), and other things

2008-08-29 Thread Stanislav Malyshev
Hi! static $a = -'abc'; // 0 static $b = +'abc'; // abc $c = +'abc'; // 0 } We could get into trouble here. Imagine: static $a = -'12.8'; This should be -12.8, but what if locale changes and . is no longer decimal separator? Moreover, what if locale changes between compile and r

Re: [PHP-DEV] Re: [PATCH] Constant expr folding (again), and other things

2008-08-29 Thread Dmitry Stogov
Hi Matt, Sorry, I just don't have time to look into it in last minute. Thanks. Dmitry. Matt Wilmas wrote: > Hi again Dmitry, > > - Original Message - > From: "Dmitry Stogov" > Sent: Thursday, July 31, 2008 > >> Hi Matt, >> >> For now I would like to disable "-CONST" constant expressi

Re: [PHP-DEV] Re: [PATCH] Constant expr folding (again), and other things

2008-08-29 Thread Matt Wilmas
Hi again Dmitry, - Original Message - From: "Dmitry Stogov" Sent: Thursday, July 31, 2008 > Hi Matt, > > For now I would like to disable "-CONST" constant expression which > started to work after your patch. > > Later we are able to implement the complete constant expressions support. On

Re: [PHP-DEV] Re: [PATCH] Constant expr folding (again), and other things

2008-07-31 Thread Matt Wilmas
Hi Dmitry, - Original Message - From: "Dmitry Stogov" Sent: Thursday, July 31, 2008 > Hi Matt, > > For now I would like to disable "-CONST" constant expression which > started to work after your patch. Yes, that's what my new fix will do -- it's coming in just a minute, and it also corre

[PHP-DEV] Re: [PATCH] Constant expr folding (again), and other things

2008-07-31 Thread Dmitry Stogov
Hi Matt, For now I would like to disable "-CONST" constant expression which started to work after your patch. Later we are able to implement the complete constant expressions support. Thanks. Dmitry. Matt Wilmas wrote: > Hi Dmitry, > > - Original Message - > From: "Dmitry Stogov" > Sen

[PHP-DEV] Re: [PATCH] Constant expr folding (again), and other things

2008-07-31 Thread Matt Wilmas
Hi Dmitry, - Original Message - From: "Dmitry Stogov" Sent: Wednesday, July 30, 2008 > Hi Matt, > > does the following code work with your patch? > > function foo() { > static $a = A + B; > var_dump($a); > } > const A = 1; > const B = 2; > foo(); > ?> > > It would be hard to explain why

[PHP-DEV] Re: [PATCH] Constant expr folding (again), and other things

2008-07-30 Thread Dmitry Stogov
Hi Matt, does the following code work with your patch? It would be hard to explain why some of constant expression work, but others don't. Anyway, it's too late for this patches. 5.3 is going to be frozen. Thanks. Dmitry. Matt Wilmas wrote: > Hi Dmitry, all, > > I was going to send this pat