[wp-trac] [WordPress Trac] #53299: [PHP 8.1] Update `is_serialized` function to accept Enums
WordPress Trac
noreply at wordpress.org
Thu Jun 2 13:53:25 UTC 2022
#53299: [PHP 8.1] Update `is_serialized` function to accept Enums
-------------------------------------------------+-------------------------
Reporter: ayeshrajans | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.1
Component: General | Version:
Severity: normal | Resolution:
Keywords: php81 has-patch early dev-feedback | Focuses:
needs-unit-tests |
-------------------------------------------------+-------------------------
Comment (by dennisatyoast):
Just to improve on the code block in above comment, the input and result
on PHP 8.1 when serializing an Enum looks like this:
{{{#!php
<?php
enum Foo
{
case bar;
}
echo serialize( Foo::bar );
// E:7:"Foo:bar";
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53299#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list