WHOW .. that bool parameter never found it's way to me .. untill now ..
appears to be a new one in PHP4.3.
So, now let's summarize the var dumping and export functions:
print_r($mixed, [bool return])
- Produces quite readable output
var_export($mixed, [bool return])
- Produces valid php code
var_dump($mixed, $mixed1, ..)
- Produces quite unreadable and invalid php code
- tells you exactly what the type of your variable is
Think I got it quite right and complete, didn't I?
Wouter
-> -----Oorspronkelijk bericht-----
-> Van: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
-> Verzonden: vrijdag 12 september 2003 19:06
-> Aan: Wouter van Vliet; Chris Boget; Thomas Panzarella;
-> [EMAIL PROTECTED]
-> Onderwerp: Re: [PHP] Simple (?) var_dump question
->
->
-> From: "Wouter van Vliet" <[EMAIL PROTECTED]>
->
->
-> > aiaiaia ... you are all pretty right, for another function was forged.
-> > var_export has a "return" flag as second argument where print_r and
-> var_dump
-> > both have other variables as second (and third, and fourth,
-> and sixth) ..
-> >
-> > So you can do: $logger->debug(var_export($Var), true)); which
-> will log the
-> > var to your log.
->
-> print_r() is also a BOOL for the second argument that controls whether a
-> value is returned or displayed.
->
-> The only difference between print_r() and var_export() produces
-> valid PHP
-> code.
->
-> The output from var_export() can only be captured with output buffering.
->
-> ---John Holmes...
->
-> --
-> PHP General Mailing List (http://www.php.net/)
-> To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php