当前位置:Gxlcms > PHP教程 > php函数var_dump,var_export,print_r的用法区别

php函数var_dump,var_export,print_r的用法区别

时间:2021-07-01 10:21:17 帮助过:27人阅读

  1. Warning: fopen(slsl.txt) [function.fopen]: failed to open stream: No such file or directory in E:\mywww\yangtest\base1.php on line 6

  2. 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) } }
  3. int(1234)
  4. string(11) "alsdfl;asdf"
  5. string(1) "a"
  6. bool(false)

  7. array ( 0 => 1, 1 => 1, 2 => 32, 3 => 322, 4 => 3433, 5 => array ( 0 => 32, 1 => 232, 2 => 23232, ), )

  8. 1234
  9. 'alsdfl;asdf'
  10. 'a'
  11. false
  12. Array ( [0] => 1 [1] => 1 [2] => 32 [3] => 322 [4] => 3433 [5] => Array ( [0] => 32 [1] => 232 [2] => 23232 ) )
  13. 1234
  14. alsdfl;asdf
  15. a

注意以上的输出,相信大家可以理解函数var_dump,var_export,print_r的区别了。 注意,最后一个不是贴出来,而是它本来就没有显示什么。 希望对大家有所帮助。

人气教程排行