Since `get_magic_quotes_gpc()` has been removed from PHP 7.4 onwards, the code you posted will throw a fatal error if run on those versions. You can safely remove this block of code, as magic quotes are a feature that has been deprecated and removed entirely from modern versions of PHP.
If you're maintaining backward compatibility with older versions of PHP that still have magic quotes enabled, you could wrap this code in a version check. However, considering that PHP 7.3 (the last version to contain magic quotes) has reached its end of life, it would be best to update your code to no longer rely on this feature.
Here's what you can do:
Simply remove the entire block since magic quotes are no longer relevant:
```php
<?php
// Code related to magic quotes removed
```
Or, if you really need to maintain backward compatibility:
```php
<?php
if (version_compare(PHP_VERSION, '7.4', '<')) {
// *** disabling magic quotes at runtime
if (get_magic_quotes_gpc())
{
function stripslashes_gpc(&$value)
{
$value = stripslashes($value);
}
array_walk_recursive($_GET, 'stripslashes_gpc');
array_walk_recursive($_POST, 'stripslashes_gpc');
array_walk_recursive($_COOKIE, 'stripslashes_gpc');
array_walk_recursive($_REQUEST, 'stripslashes_gpc');
}
}
```
The `version_compare` function checks the PHP version, so the code inside the block will only be executed for versions earlier than 7.4.
Again, I recommend the first option, as maintaining code for versions of PHP that are no longer supported could lead to other security and compatibility issues. If you go with the second option, please make sure to test thoroughly on all supported PHP versions to ensure there are no issues.