reference/var/functions/serialize.xml
d816a0fad6c458d9515f697cc89e26ca9d8069f5
...
...
@@ -81,7 +81,7 @@
81
81
<para>
82
82
<example>
83
83
<title><function>serialize</function> example</title>
84
-
<programlisting role="php">
84
+
<programlisting role="php" annotations="non-interactive">
85
85
<![CDATA[
86
86
<?php
87
87
// $session_data contains a multi-dimensional array with session
...
...
@@ -95,7 +95,7 @@ $sqldata = array (serialize($session_data), $_SERVER['PHP_AUTH_USER']);
95
95
if (!odbc_execute($stmt, $sqldata)) {
96
96
$stmt = odbc_prepare($conn,
97
97
"INSERT INTO sessions (id, data) VALUES(?, ?)");
98
-
if (!odbc_execute($stmt, $sqldata)) {
98
+
if (!odbc_execute($stmt, array_reverse($sqldata))) {
99
99
/* Something went wrong.. */
100
100
}
101
101
}
...
...
@@ -119,8 +119,7 @@ if (!odbc_execute($stmt, $sqldata)) {
119
119
</para>
120
120
<para>
121
121
There are some historical exceptions to the above rule, where some internal objects
122
-
could be serialized without implementing the interface or exposing the methods. Notably,
123
-
the <classname>ArrayObject</classname> prior to PHP 5.2.0.
122
+
could be serialized without implementing the interface or exposing the methods.
124
123
</para>
125
124
</note>
126
125
<warning>
127
126