Hi Stanislav, Am Sonntag, den 10.02.2008, 21:11 -0800 schrieb Stanislav Malyshev: [...] > Actually, just as __FILE__, __LINE__, __CLASS__ etc. dirname(__FILE__) > can be a parser constant. And if somebody produces a good name and a > patch for it, I see no reason to reject it. Does anybody?
For the name I would propose __DIR__, same as to __FILE__, __CLASS__, __NAMESPACE__ etc. pp. I tried to do it yesterday, but I need some advice on how to do it. So far I need to add another token and an ST_IN_SCRIPTING entry. Basically the quick hack would be to use zend_get_compiled_filename() in it. I stuck how to extract the dirname. Should I use php_dirname() (which is platform sensitive but this is considered inappropriate from what I heard), should php_dirname() be moved? Or should I introduce another hash table entry for the current dirname? cu, Lars
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil