You want to send output to more than one filehandle; for example, you want to log messages to the screen and to a file.
Wrap your output with a loop that iterates through your filehandles, as shown in Example 23-38.
If you don't want to pass a length argument to fwrite( ) (or you always want to), you can eliminate that check from your pc_multi_fwrite( ). The version in Example 23-39 doesn't bother with a $length argument.
pc_multi_fwrite( ) without $length
23.15.4. See Also
Documentation on fwrite( ) at http://www.php.net/fwrite.