解析php中var_dump,var_export,print_r三个函数的区别
下面的示例看看这三个函数的具体的区别,其中var_dump和var_export比较少用,但他们两者又很相似。所以可以看看: 输出:<div class="codetitle"><a style="CURSOR: pointer" data="33861" class="copybut" id="copybut33861" onclick="doCopy('code33861')"> 代码如下:<div class="codebody" id="code33861">Warning: fopen(slsl.txt) [function.fopen]: failed to open stream: No such file or directory in E:mywwwyangtestbase1.php on line 6 array(6) { [0]=> int(1) [1]=> int(1) [2]=> int(32) [3]=> int(322) [4]=> int(3433) [5]=> array(3) { [0]=> int(32) [1]=> int(232) [2]=> int(23232) } } int(1234) string(11) "alsdfl;asdf" string(1) "a" bool(false) array ( 0 => 1,1 => 1,2 => 32,3 => 322,4 => 3433,5 => array ( 0 => 32,1 => 232,2 => 23232,),) 1234 'alsdfl;asdf' 'a' false Array ( [0] => 1 [1] => 1 [2] => 32 [3] => 322 [4] => 3433 [5] => Array ( [0] => 32 [1] => 232 [2] => 23232 ) ) 1234 alsdfl;asdf a 现在可以看到效果了,注意,最后一个不是我没有粘贴过来,而是他本来就没有显示什么东西。 (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |