What is difference between print_r and var_dump in PHP?
I am curious and wanna know what is the difference between these functions: print_r and var_dump? I can view content of an array with both function and content of a class as well.
Similar entries
- What is the difference between Mysql inner and outer join?
- What is difference between POP, IMAP and Webmail
- Simple Hello World Module for Drupal 6
- Random tip / info-box with javascript array
- Comparison of Mozilla Firefox 4 and Microsoft Internet Explorer 9
- Include both php/ html files, catch & assign output to a string variable
- Drupal LDAP to copy Win.Server.AD groups to roles
- How to make website popular
- Drupal warning: array_filter()
- Between operator in PHP
- This content has been modified by another user, changes cannot be saved.
- Delete all spam node entries of a spesific user on a Drupal site with PHP
- Joomla structure confusing
- Mysql auto_increment lower than highest ID
- Fatal error: Call to undefined function taxonomy_field_insert() in i18n_taxonomy.module on line 362
- Websites offering Alexa Toolbar and manipulation
- How to override php mail function to catch abuse / spammer
- Do I need suexec, suphp, php-suhosin, mod_security same time?
- Change background color onmouseover with Javascript
- Web2 style secure & flexible free php contact form with easy setup

print_r , var_dump used for debugging purpose.
The var_export returns the php code. We could load this content in variable and later can be used.
var_dumps same as print_r except it shows the structure with types.
var_exports same as var_dump except it returns the php code as string format.
These helps to gothru the contents of the variables recursively in readable format.
more about this read from http://www.itechp2pexchange.com/node/5860
Post new comment