The behaviour of these functions is affected by settings in php.ini.
Here's a short explanation of the configuration directives.
Store full activity debug log in this directory or stream. The special value "stderr" can be provided to write to STDERR.
Please note that the debug log can contain sensitive information, such as credentials to the MongoDB server and full documents written to or read from the server. Please review any debug logs before sharing them with other people.