function is_serialized( $data ) {<br>
$data = trim( $data );<br>
if ( 'N;' == $data )<br>
return true;<br>
if ( !preg_match( '/^([adObis]):/', $data, $badions ) )<br>
return false;<br>
switch ( $badions[1] ) {<br>
case 'a' :<br>
case 'O' :<br>
case 's' :<br>
if ( preg_match( "/^{$badions[1]}:[0-9]+:.*[;}]\$/s", $data ) )<br>
return true;<br>
break;<br>
case 'b' :<br>
case 'i' :<br>
case 'd' :<br>
if ( preg_match( "/^{$badions[1]}:[0-9.E-]+;\$/", $data ) )<br>
return true;<br>
break;<br>
}<br>
return false;<br>
}
AD:真正免费,域名+虚机+企业邮箱=0元