Source of: /manual/en/security.magicquotes.why.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/security.magicquotes.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'security.magicquotes.why.php',
1 => 'Why did we use Magic Quotes',
),
'up' =>
array (
0 => 'security.magicquotes.php',
1 => 'Magic Quotes',
),
'prev' =>
array (
0 => 'security.magicquotes.what.php',
1 => 'What are Magic Quotes',
),
'next' =>
array (
0 => 'security.magicquotes.whynot.php',
1 => 'Why not to use Magic Quotes',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="security.magicquotes.why" class="sect1">
<h2 class="title">Why did we use Magic Quotes</h2>
<div class="warning"><b class="warning">Warning</b><p class="simpara">This feature has been
<em class="emphasis">DEPRECATED</em> as of PHP 5.3.0 and <em class="emphasis">REMOVED</em> as of PHP 6.0.0.
Relying on this feature is highly discouraged.</p></div>
<ul class="itemizedlist">
<li class="listitem">
<span class="simpara">
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.
</span>
<span class="simpara">
So why did this feature exist? Simple, to help prevent
<a href="security.database.sql-injection.php" class="link">SQL Injection</a>.
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.
</span>
</li>
</ul>
</div><?php manual_footer(); ?>