allow ini_set('error_log',...) with in-memory stream
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
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 https://github.com/sebastianbergmann/phpunit/pull/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);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how ini_set('error_log', ...) handles filesystem paths and magic identifiers such as "syslog". Review the linked PHPUnit pull request for the current tmpfile() workaround and define the supported behavior for php://memory or php://temp, including how completion would be verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100