<?php
$a = array (1, 2, array ("a", "b", "c"));
var_export($a);
?>
运行结果:
array ( 0 => 1, 1 => 2, 2 => array ( 0 => 'a', 1 => 'b', 2 => 'c', ), )
另外一个例子:
<?php $b = 3.1; $v = var_export($b, true); echo $v; ?>
结果:3.1
2、http_build_query
()--- Generate URL-encoded query stringexample:
<?php $data = array('foo'=>'bar', 'baz'=>'boom', 'cow'=>'milk', 'php'=>'hypertext processor'); echo http_build_query($data) . "\n"; echo http_build_query($data, '', '&'); ?>
result:
foo=bar&baz=boom&cow=milk&php=hypertext+processor
foo=bar&baz=boom&cow=milk&php=hypertext+processor
3、md5()---返回一个字符串的md5散列
MD5(string,raw)
string要处理的字符串
raw,可选,TRUE代表16字符的二进制格式,FALSE代表32字符的十六进制格式
example:
<?php$str = "Hello";echo
md5($str)
;?>result:
8b1a9953c4611296a827abf8c47804d7
4、
stream_context_create()----Creates a stream context