get_magic_quotes_gpc () is a function that checks the configuration (php.ini) and returns 0 if magic_quotes_gpc is off (otherwise it returns 1).
When magic_quotes is enabled, all single quotes, double quotes, \ (backslash), and NUL are automatically reset using a backslash. This prevents all kinds of security problems during administration.
In your case, the code checks to see if the parameter is turned off, and adds slashes to properly avoid the content, to prevent SQL injection.
As you said, this function is deprecated and will certainly be removed in the future (in fact, they removed it in PHP6).
An alternative is to delete data at runtime as needed
DmitryK
source share