log($msg, 'info'); } function logWarn($msg) { global $logInst; $logInst->log($msg, 'warn'); } class Logger { private $data = array(); function log($msg, $type = 'info') { $this->data[$type][] = $msg; } function display() { echo '