falsecz
2/13/2014 - 7:43 PM

custom-fd.php

<?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');