On the php manual we can read:
fwrite() returns the number of bytes written
Ok... but what kind of thing is "number of bytes written"?
Binary string? Binary number? Stream? Int?
I'm a little bit lost here.
Regards
From the manual:
Description
int
fwrite ( resource $handle , string $string [, int $length ] )
It returns an int on success, as indicated by the type name just before the function name. It returns FALSE on error:
fwrite() returns the number of bytes written, or FALSE on error.
An integer, or boolean false on failure.
$fh = fopen('/tmp/bar', 'w');
$bytes = fwrite($fh, 'Hello, world.');
var_dump($bytes); // output: int(13)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With