Re: [PHP-DEV] Urgent patch for traits in PHP 5.4

2012-01-15 Thread Dmitry Stogov
Hi Stefan, It couldn't be done using early binding. It should be done delaying __CLASS__ constant resolution till run-time. Doing this we can even substitute he proposed ZEND_CLASS_NAME with ZEND_FETCH_CONSTANT(__CLASS__). For default values we'll have just store the corresponding constant. I

Re: [PHP-DEV] Urgent patch for traits in PHP 5.4

2012-01-15 Thread Dmitry Stogov
On 01/14/2012 03:34 AM, Stefan Marr wrote: Hi Dmitry: On 13 Jan 2012, at 10:36, Dmitry Stogov wrote: As I understood the copying was done only for proper handling of __CLASS__ constant in trait methods. I think it's too radical solution. I've introduced ZEND_CLASS_NAME instruction instead an

Re: [PHP-DEV] Urgent patch for traits in PHP 5.4

2012-01-15 Thread Dmitry Stogov
Stas, Thank you for looking into it and finding out a new problem :) I'll take a look into it and will try to fix. Dmitry. On 01/13/2012 10:53 PM, Stas Malyshev wrote: Hi! As I understood the copying was done only for proper handling of __CLASS__ constant in trait methods. I think it's too r

Re: [PHP-DEV] Urgent patch for traits in PHP 5.4

2012-01-15 Thread Stefan Marr
Hi Dmitry: After Stas nice and encouraging words, I had another look. But to me it seems that I am not able to get to any of the relevant bits via the scoping infos in the globals. And I do not see how we could encode something into ZEND_CLASS_NAME. But I don't have a good overview of the engin