And what is the binary danger of other functions? For example: http://php.net/manual/ru/function.fwrite.php fwrite - Binary-safe file write
1 answer
This means that the function is suitable for processing not only plain text, but also binary data. Nothing will be lost or distorted.
Sometimes you need to work with binary data. For example, to generate something volumetric, and the result must be compressed in gzip with the gzencode function. This function will return a string of binary data. Or, data encryption functions often give exactly the binary representation - simply because it takes up less memory, and you can convert it to something text if necessary.
Functions that are not marked as binary safe can distort the value or process it incorrectly (for example, in the region of the NUL character), since designed to work with the text. And the binary-safe ones will work correctly, what bytes are told to write - they will be written.