downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Why not to use Magic Quotes> <What are Magic Quotes
Last updated: Sun, 08 Nov 2009

view this page in

Why did we use Magic Quotes

Warning

This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.

  • There is no reason to use magic quotes because they are no longer a supported part of PHP. However, they did exist and did help a few beginners blissfully and unknowingly write better (more secure) code. But, when dealing with code that relies upon this behavior it's better to update the code instead of turning magic quotes on. So why did this feature exist? Simple, to help prevent SQL Injection. Today developers are better aware of security and end up using database specific escaping mechanisms and/or prepared statements instead of relying upon features like magical quotes.


add a note add a note User Contributed Notes
Why did we use Magic Quotes
There are no user contributed notes for this page.

Why not to use Magic Quotes> <What are Magic Quotes
Last updated: Sun, 08 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites