Come da manuale:

fwrite() returns the number of bytes written
Codice PHP:
var_dump((bool)strlen(''));