I'm really confused when I read about the function get_magic_quotes_gpc()
in PHP.
Everywhere it's said that the function is deprecated (example).
But what is the default behaviour in PHP 5.3? I used to check, if magic_quotes_gpc
in on and stripped all slashes if that was the case, right at the beginning of my script for all POST
, GET
and COOKIE
variables, so that I don't get confused.
But if I shouldn't check for added slashes using get_magic_quotes_gpc()
, always removing slashes would result in wrong data, if no slashes are added by PHP 5.3.
I have the same confusion with this
At the moment magic_quotes_gpc
is on on my server (PHP 5.2.17), so I need to remove the slashes. But how should I handle this to be prepared for future PHP versions?
Can I somehow set the default values in future during the runtime at the beginning of my script? But what are the default values?