is_serialized_string [ WordPress Function ]
is_serialized_string ( $data )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: is_serialized, is_user_logged_in, set_user_setting, get_user_id_from_string, image_hwstring
Check whether serialized data is of string type.
Source
<?php
function is_serialized_string( $data ) {
// if it isn't a string, it isn't a serialized string
if ( !is_string( $data ) )
return false;
$data = trim( $data );
$length = strlen( $data );
if ( $length < 4 )
return false;
elseif ( ':' !== $data[1] )
return false;
elseif ( ';' !== $data[$length-1] )
return false;
elseif ( $data[0] !== 's' )
return false;
elseif ( '"' !== $data[$length-2] )
return false;
else
return true;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/is serialized string « WordPress Codex
Description. Check whether serialized data is of string type. Usage. <?php is_serialized_string( $data ) ?> Parameters. $data: (mixed) (required) Serialized data ...
codex.wordpress.org - #17445 (Give a speed kick to combined is_serialized() + ...
In #17129 is_serialized_string() has been speed up by 23%. ... If preconditions are already met, is_serialized_string() can be replaced with a simple check for ...
core.trac.wordpress.org - 常用函数-is_serialized_string() | WordPress啦!
说明. 查看序列化的数据是否为字符串类型. 用法. <?php is_serialized_string( $data ) ?> 参数. $data. (混合)(必需)被序列化的数据. 默认值:None. 返回的值. (混合) ...
www.wordpress.la - Docs for page functions.core.php
is_serialized_string (line 115). Check whether serialized data is of string type ... bool is_serialized_string (mixed $data). mixed $data: Serialized data. is_ssl (line ...
phpdoc.ftwr.co.uk