RE: [PHP] Easy Object Reading

From: Date: Tue, 20 Mar 2001 14:07:59 +0000
Subject: RE: [PHP] Easy Object Reading
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-44749@lists.php.net to get a copy of this message
> -----Original Message----- > From: Thorsten Viel [mailto:tviel@hw-interactive.de] > Sent: Wednesday, 21 March 2001 00:59 > To: php-general@lists.php.net > Subject: [PHP] Easy Object Reading > > > Hi, > > does somebody know a function where I can read all variables of an object > independent of there name? > > I have to test with large classes, more than 30 vars per class, and dont > want to implement a function just for testing. > I want to echo all values of vars of a class without specifyieng > explicitly > every single varname. > var_dump(PHP3 >= 3.0.5, PHP4 ) Dumps information about a variable void var_dump (mixed expression) This function returns structured information about an expression that includes its type and value. Arrays are explored recursively with values indented to show structure. Compare var_dump() to print_r(). 1 2 <pre> 3 <?php 4 $a = array (1, 2, array ("a", "b", "c")); 5 var_dump ($a); 6 ?> 7 </pre> 8 Regards Grant Walters Brainbench 'Most Valuable Professional' for Unix Admin Walters & Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND Telephone: +64 4 4765175, CellPhone 025488265, ICQ# 23511989

« previous php.general (#44749) next »