[FX.php List] Which is faster?

Leo R. Lundgren leo at finalresort.org
Mon Sep 13 08:50:08 MDT 2010


13 sep 2010 kl. 16.45 skrev Chris Hansen:

> 1) Try using var_dump() rather than print_r().  This is something that I first heard advocated by Lance Hallberg and it's a nice function.  It gives you not only the structure, but the number of elements and the type (so it's nice for troubleshooting === and !== as well...)  Also, var_dump() can be used for any expression so it's a good all-around tool.

The only downside to var_dump() (in my opinion) is that it is less readable for just a quick variable dump. So I prefer to use it as the default, and var_dump() when I need to look at the data in a more detailed manner (like you describe).

-|



More information about the FX.php_List mailing list