Using magic constants from another scope
问题 I created a class Debug in which all properties and methods are static. Using late static binding I use this class as a logger of what is being done and at which moment (in fact I'm testing now performance issue, so I would like to now what and when goes). So at the moment I have something in each main method of each class like Debug::log(__CLASS__ . '::' . __METHOD__); . In Debug::log() method I can add time and store it in some array. If I'd wanted some day to change behaviour I would need