Then use apache level error redirects to an error handling file.
I understand and share the concern, but I’d rather run the risk that an error might leak out and be logged by setting error reporting that high then have errors occur unlogged with a mysterious white screen being presented to the user.
When adding a product description I am just using a plain text field - if you write a word “you’ll” the ’ (apostrophe) causes a mess so I want to cut it out.
If your string is getting the slashes from the magic_quotes mode of PHP then, if possible, turn magic quotes off. This can be done from the .htaccess file or PHP.ini (better to use the ini file if you have access to it). Indeed, I recommend the following .htaccess code for any PHP deployment.
php_flag register_globals off
php_flag magic_quotes_gpc off
php_flag display_startup_errors on
php_flag display_errors on
php_value error_reporting -1
Notices and strict warnings are annoying, but addressing them makes you a better programmer. In any event using these settings is a lot easier than having to run strip_slashes and risk accidental removal of slashes that should be there. And turning register globals off is much easier than trying to remove the dangerous effects of having the setting on.
Reminder Register globals and magic quotes are deprecated and WILL BE REMOVED in PHP 6. So the instructions to turn them off above simulate the environment the next version of PHP will enforce nicely.