Changes between Version 1 and Version 2 of Ticket #46570, comment 4
- Timestamp:
- 07/31/2019 07:34:40 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #46570, comment 4
v1 v2 1 1 I have a question. Instead of using regex to check if a string is in 'serialized-format', why not use PHP's native `unserialize()` to actually unserialize the input string and check for its output. From the PHP docs, `unserialize()` would return either serialized value or `FALSE` if the passed data is not unserializeable. 2 2 3 Of course, what i'm thinking is still returning only either `TRUE` or `FALSE` for the `is_serialized()` and not the actual unserialized value, if it's the return value of the `unserialize()` function. 3 Of course, what i'm thinking is still returning only either `TRUE` or `FALSE` for the `is_serialized()` and not the actual unserialized value, if it's the return value of the `unserialize()` function. I'm guessing that returning the actual unserialized value might posed backward compat issues. 4 4 5 5 See https://www.php.net/manual/en/function.unserialize.php.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)