<?php
class Logger {
private $fd;
public function __construct() {
$this->fd = @fopen('php://fd/3', 'w');
}
public function log($o) {
if($this->fd) {
return fputs($this->fd, "3:" . $o ."\n");
}
echo $o;
}
}
$logger = new Logger;
$logger->log('mrdka');