## Problem **#85** covers `__DIR__`, `__FILE__`, `__LINE__`. OOP web code also needs `__CLASS__` in templates and logging. ## Goal Resolve magic constants at compile time or runtime per PHP rules. ## Tasks - [ ] Extend constant fetch in `lib/Compiler.php` for class/method context - [ ] VM: populate from active function/class frames - [ ] JIT: embed literals when statically known - [ ] PHPT inside namespaced class method (**#84**) - [ ] Update **#176** matrix ## Acceptance criteria ```php class C { public function id(): string { return __CLASS__ . '::' . __FUNCTION__; } } echo (new C)->id(); // C::id ``` ## Dependencies - **#84** namespaces - **#58** class methods in JIT ## Files - `lib/Compiler.php`, `lib/VM.php`
Problem
#85 covers
__DIR__,__FILE__,__LINE__. OOP web code also needs__CLASS__in templates and logging.Goal
Resolve magic constants at compile time or runtime per PHP rules.
Tasks
lib/Compiler.phpfor class/method contextAcceptance criteria
Dependencies
Files
lib/Compiler.php,lib/VM.php