Why did error_log make a mistake in php?

Front-end ios, back-end php, I added:
error_log ($msg, 3, "error.log") where I wanted to print the error message;
found that the front end reported an error, saying that the correct json information was not returned, and this sentence was normal as soon as it was removed.
I don"t record the error log of php, so I can"t see what the error message is. Why?

Php
May.07,2021

should not be caused by error_log , unless your error.log file does not have write permission.
it is recommended that you check whether this file is writable, and then debug the front end to see what information is returned on the server side.


should be an error at the back end, the program interrupts execution, and there is no request for a return value to the front end.
it's easy to locate the problem by looking at the error log that php is running.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e864-409a9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e864-409a9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?