Challenge 1 — Solution Task: Implement a Singleton class called Logger with a private array property for storing log lines, a static getInstance() method, and a public method log(string $message) that appends to the array. Demonstrate that calling Logger::getInstance() from two different points in the script still shares the same log entries. lines[] = $message; } public function getLines(): array { return $this->lines; } } // Point 1 in the script: Logger::getInstance()->log("Application started"); // Point 2 in the script — a completely separate call: Logger::getInstance()->log("User logged in"); print_r(Logger::getInstance()->getLines()); ?> Output: Array ( [0] => Application started [1] => User logged in ) Notes: - Both "points" in the script call Logger::getInstance() independently, yet both log entries end up in the same array - proving both calls returned the exact same shared object, not two separate Logger instances. - The constructor is private, exactly matching the chapter's Config example, so "new Logger()" is impossible from outside the class - getInstance() is the only way to obtain (or create, the first time) the one shared instance. - getLines() is a small addition beyond the chapter's own Config example, added here purely so the accumulated log entries could be demonstrated and verified.