reference/info/functions/get-magic-quotes-gpc.xml
62aa2694baf7fe904744a9b0f8a2a26e7fc3cf12
...
...
@@ -6,31 +6,30 @@
6
6
<refpurpose>Gets the current configuration setting of magic_quotes_gpc</refpurpose>
7
7
</refnamediv>
8
8
9
+
<refsynopsisdiv>
10
+
&warn.deprecated.function-7-4-0.removed-8-0-0;
11
+
</refsynopsisdiv>
12
+

9
13
<refsect1 role="description">
10
14
&reftitle.description;
11
15
<methodsynopsis>
12
-
<type>bool</type><methodname>get_magic_quotes_gpc</methodname>
16
+
<type>false</type><methodname>get_magic_quotes_gpc</methodname>
13
17
<void/>
14
18
</methodsynopsis>
15
19
<para>
16
-
Returns the current configuration setting of <link
17
-
linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link>
18
-
</para>
19
-
<para>
20
-
Keep in mind that attempting to set <link linkend="ini.magic-quotes-gpc">
21
-
magic_quotes_gpc</link> at runtime will not work.
22
-
</para>
23
-
<para>
24
-
For more information about magic_quotes, see this
25
-
<link linkend="security.magicquotes">security section</link>.
20
+
Always returns &false;.
26
21
</para>
27
22
</refsect1>
28
23

24
+
<refsect1 role="parameters">
25
+
&reftitle.parameters;
26
+
&no.function.parameters;
27
+
</refsect1>
28
+

29
29
<refsect1 role="returnvalues">
30
30
&reftitle.returnvalues;
31
31
<para>
32
-
Returns 0 if magic_quotes_gpc is off, 1 otherwise.
33
-
Or always returns &false; as of PHP 5.4.0.
32
+
Always returns &false;.
34
33
</para>
35
34
</refsect1>
36
35

...
...
@@ -47,9 +46,9 @@
47
46
</thead>
48
47
<tbody>
49
48
<row>
50
-
<entry>5.4.0</entry>
49
+
<entry>7.4.0</entry>
51
50
<entry>
52
-
Always returns &false; because the magic quotes feature was removed from PHP.
51
+
This function has been deprecated.
53
52
</entry>
54
53
</row>
55
54
</tbody>
...
...
@@ -58,53 +57,6 @@
58
57
</para>
59
58
</refsect1>
60
59

61
-
<refsect1 role="examples">
62
-
&reftitle.examples;
63
-
<para>
64
-
<example>
65
-
<title><function>get_magic_quotes_gpc</function> example</title>
66
-
<programlisting role="php">
67
-
<![CDATA[
68
-
<?php
69
-
// If magic quotes are enabled
70
-
echo $_POST['lastname']; // O\'reilly
71
-
echo addslashes($_POST['lastname']); // O\\\'reilly
72
-

73
-
// Usage across all PHP versions
74
-
if (get_magic_quotes_gpc()) {
75
-
$lastname = stripslashes($_POST['lastname']);
76
-
}
77
-
else {
78
-
$lastname = $_POST['lastname'];
79
-
}
80
-

81
-
// If using MySQL
82
-
$lastname = mysql_real_escape_string($lastname);
83
-

84
-
echo $lastname; // O\'reilly
85
-
$sql = "INSERT INTO lastnames (lastname) VALUES ('$lastname')";
86
-
?>
87
-
]]>
88
-
</programlisting>
89
-
</example>
90
-
</para>
91
-
</refsect1>
92
-

93
-
<refsect1 role="notes">
94
-
&reftitle.notes;
95
-
<note>
96
-
<para>
97
-
If the directive <link linkend="ini.magic-quotes-sybase">
98
-
magic_quotes_sybase</link> is ON it will completely override
99
-
<link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link>. So even
100
-
when <function>get_magic_quotes_gpc</function> returns
101
-
&true; neither double quotes, backslashes or NUL's will
102
-
be escaped. Only single quotes will be escaped. In this
103
-
case they'll look like: <emphasis>''</emphasis>
104
-
</para>
105
-
</note>
106
-
</refsect1>
107
-

108
60
<refsect1 role="seealso">
109
61
&reftitle.seealso;
110
62
<para>
111
63