stream_get_contents()
function stream_get_contents(resource $stream, int $length = null, int $offset = -1): mixed
Reads remainder of a stream into a string.
Parameters:
$stream(resource)$length(int), defaultnull, optional$offset(int), default-1, optional
Returns: mixed
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/filesystem/stream_get_contents.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how stream_get_contents is implemented in the compiler, see the internals page.