Search code examples
phpreturnfwrite

What type does fwrite() returns?


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


Solution

  • 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.