Created
April 8, 2015 17:43
-
-
Save gyopiazza/82fd1a17a323914563df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
*------------------------------------------------------------------------------------------------ | |
* Determine if string is serialized | |
*------------------------------------------------------------------------------------------------ | |
* | |
*/ | |
function string_is_serialized($str) | |
{ | |
return (is_string($str)) ? preg_match( "/^(O:|a:)/", $str) : false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment