Get_magic_quotes_gpc is Deprecated
- Article
- Comment
Introduction
The PHP version 7.4 is completely deprecated the get_magic_quotes_gpc() function. Earlier the magic_quotes_gpc from version 5.4 and we got alternative with get_magic_quotes_gpc(). And now it was completely deprecated and go without these functions. So those who faced bug or error with these functions.
Solution
It returns TRUE or FALSE. So most of them we used this function inside a if condition. like the below one.
if(get_magic_quotes_gpc()){ // You Code }
And some programmers might used it like this.
$result = (get_magic_quotes_gpc() ? /* True Code */ : /* False Code */ );
But more over the solution is simply easy. Just remove that from this if condition either inline or full if condition. The PHP 7.4 itself that will take care of it. And no more needed to keep this code.
Conclusion
Remove the code and start programming without this condition. PHP 7.4 onwards you dont need to care about it.