tequilarapido / php-serialized
Deals with php serialized data. (ie. search & replace)
1.0.2
2014-02-18 17:28 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-10-24 05:13:37 UTC
README
Can be used to replace strings in PHP serialized strings. (take a look at the tests)
Example
// Serialized stuff
$user = new stdClass();
$user->email = 'email@example.com';
$serialized = serialize($user);
// Replace mail
$sr = new SearchReplace();
$result = $sr->run('email@example.com', 'email@anotherdomain.com', $serialized);
Credits
Most of the code is from googling around. If you think it's your code that I'm using, let me know and I'll be happy to mention it.