-
Notifications
You must be signed in to change notification settings - Fork 8k
Open
Description
Description
calling ini_set('error_log', $logger) seems to expect $logger to be a filesystem path (or a magic identifer like "syslog").
is it possible to pass in a memory stream?
use-case: in phpunit we want to capture all output a possible code beeing tested might write into error_log.
I have implemented this feature with a tmpfile() in sebastianbergmann/phpunit#6118 but IMO it would be cleaner and more efficient (no filesystem IO) if I could pass in a memory stream like php://memory or php://temp:
$stream = fopen('php://temp', 'rw');
$errorLogPrevious = ini_set('error_log', $stream);mvorisek