In what circumstances should one use “magic quotes” in PHP?
25th August 2010
My answer to In what circumstances should one use “magic quotes” in PHP? on Quora
Absolutely never. Magic quotes was a badly designed feature, and PHP has been trying to escape its legacy for years. If you are constructing SQL strings using string concatenation you’re asking for trouble—use prepared statements or a library that interpolates and correctly escapes variables for you.
More recent articles
- Extract PDF text in your browser with LiteParse for the web - 23rd April 2026
- A pelican for GPT-5.5 via the semi-official Codex backdoor API - 23rd April 2026
- Is Claude Code going to cost $100/month? Probably not - it's all very confusing - 22nd April 2026