php - Using magic constants from another scope -


i created class debug in properties , methods static. using late static binding use class logger of being done , @ moment (in fact i'm testing performance issue, , when goes).

so @ moment have in each main method of each class debug::log(__class__ . '::' . __method__);. in debug::log() method can add time , store in array.

if i'd wanted day change behaviour need change lots of code in many files...

my question is: possible somehow omit these __class__ . '::' . __method__ , debug::log() method know class , method called?

a call stack perhaps?

the function looking debug_backtrace(); give data structure can use purpose. there no way make magic constants work way, although agree idea , might consider posting feature requests allow magic constants used default values in function definitions evaluated @ call time, not define time. support such feature request.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -