What is __get()
class Penguin extends Animal { public function __construct($id) { $this->getPenguinFromDb($id); } public function getPenguinFromDb($id) { // elegant and robust database
Read moreclass Penguin extends Animal { public function __construct($id) { $this->getPenguinFromDb($id); } public function getPenguinFromDb($id) { // elegant and robust database
Read moreDid you spot the file handle that was also part of the constructor? We don’t really want to leave things
Read moreThe constructor is a magic method that gets called when the object is instantiated. It is usually the first thing
Read more__construct() __destruct() __call() __callStatic() __get() __set() __isset() __unset() __sleep() __wakeup() __toString() __invoke() __set_state() __clone() and __debugInfo() are magical in PHP
Read more