Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions language/enumerations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,11 @@ print serialize(Suit::Hearts);
On deserialization, if an enum and case cannot be found to match a serialized
value a warning will be issued and &false; returned.</para>

<para>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<para>
<simpara>

The <literal>allowed_classes</literal> option of
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The <literal>allowed_classes</literal> option of
The <literal>"allowed_classes"</literal> option of

Not sure about this one, but <literal> feels like it should be combined with "". Perhaps check if there's precedent.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't really a policy for this. It is done, but sometimes.. and mostly for cases like "0" not really for options or arguments. So I am more leaning towards omitting in this specific case.

<function>unserialize</function> does not affect enums.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<function>unserialize</function> does not affect enums.
<function>unserialize</function> does not affect <link linkend="language.enumerations">Enumerations</link>.

And ditto in the other file.

</para>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
</para>
</simpara>


<para>
If a Pure Enum is serialized to JSON, an error will be thrown. If a Backed Enum
is serialized to JSON, it will be represented by its scalar value only, in the
Expand Down
3 changes: 3 additions & 0 deletions reference/var/functions/unserialize.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@
Omitting this option is the same as defining it as &true;: PHP
will attempt to instantiate objects of any class.
</simpara>
<simpara>
This option does not affect enums.
</simpara>
</entry>
</row>
<row>
Expand Down