file_put_contents()
function file_put_contents(string $filename, string $data, int $flags = 0): int
Writes data to a file.
Parameters:
$filename(string)$data(string)$flags(int), default0, optional
Returns: int
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported through a declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/filesystem/file_put_contents.rs).
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how file_put_contents is implemented in the compiler, see the internals page.