svn: /phpdoc/en/trunk/ appendices/migration70/new-features.xml reference/var/functions/unserialize.xml
| From: | Adam Harvey | Date: | Sun, 09 Aug 2015 01:17:31 +0000 |
| Subject: | svn: /phpdoc/en/trunk/ appendices/migration70/new-features.xml reference/var/functions/unserialize.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13556@lists.php.net to get a copy of this message | ||
aharvey Sun, 09 Aug 2015 01:17:31 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=337373
Log:
Add unserialize() options documentation.
Changed paths:
U phpdoc/en/trunk/appendices/migration70/new-features.xml
U phpdoc/en/trunk/reference/var/functions/unserialize.xml
Modified: phpdoc/en/trunk/appendices/migration70/new-features.xml
===================================================================
--- phpdoc/en/trunk/appendices/migration70/new-features.xml 2015-08-09 01:17:26 UTC (rev 337372)
+++ phpdoc/en/trunk/appendices/migration70/new-features.xml 2015-08-09 01:17:31 UTC (rev 337373)
@@ -345,6 +345,7 @@
</programlisting>
</informalexample>
</sect2>
+
<sect2 xml:id="migration70.new-features.intlchar-class">
<title><classname>IntlChar</classname> Class</title>
Modified: phpdoc/en/trunk/reference/var/functions/unserialize.xml
===================================================================
--- phpdoc/en/trunk/reference/var/functions/unserialize.xml 2015-08-09 01:17:26 UTC (rev 337372)
+++ phpdoc/en/trunk/reference/var/functions/unserialize.xml 2015-08-09 01:17:31 UTC (rev 337373)
@@ -13,6 +13,7 @@
<methodsynopsis>
<type>mixed</type><methodname>unserialize</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
+ <methodparam
choice="opt"><type>array</type><parameter>options</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>unserialize</function> takes a single serialized variable and
@@ -52,6 +53,47 @@
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><parameter>options</parameter></term>
+ <listitem>
+ <para>
+ Any options to be provided to <function>unserialize</function>, as an
+ associative array.
+ </para>
+ <table>
+ <title>Valid options</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>allowed_classes</literal></entry>
+ <entry><type>mixed</type></entry>
+ <entry>
+ <simpara>
+ Either an <type>array</type> of class names which should be
+ accepted, &false; to accept no classes, or &true; to accept all
+ classes. If this option is defined and
+ <function>unserialize</function> encounters an object of a class
+ that isn't to be accepted, then the object will be instantiated as
+ <classname>__PHP_Incomplete_Class</classname> instead.
+ </simpara>
+ <simpara>
+ Omitting this option is the same as defining it as &true;: PHP
+ will attempt to instantiate objects of any class.
+ </simpara>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
</refsect1>
@@ -82,6 +124,12 @@
</thead>
<tbody>
<row>
+ <entry>7.0.0</entry>
+ <entry>
+ The <parameter>options</parameter> parameter has been added.
+ </entry>
+ </row>
+ <row>
<entry>5.6.0</entry>
<entry>
Manipulating the serialised data by replacing <literal>C:</literal>