Differences in usage of php functions var_dump, var_export, and print_r

WBOY
Release: 2016-07-25 08:58:26
Original
927 people have browsed it
  1. Warning: fopen(slsl.txt) [function.fopen]: failed to open stream: No such file or directory in E:mywwwyangtestbase1.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

Copy code

Pay attention to the above output, believe it Everyone can understand the difference between the functions var_dump, var_export, and print_r. Note that the last one is not posted, but it does not display anything. I hope to be helpful.



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!