Difference between revisions of "PRINT R()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
|||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Display object information in a readable format | Display object information in a readable format | ||
− | |||
==Syntax== | ==Syntax== | ||
PRINT_R(<object-ref>) | PRINT_R(<object-ref>) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[ACLASS()]], [[ADDPROPERTY()]], [[AMEMBERS()]], [[ | + | [[ACLASS()]], [[ADDPROPERTY()]], [[AMEMBERS()]], [[COMPOBJ()]], [[CREATEOBJECT()]], [[DEFINE CLASS]], [[DISPLAY CLASSES]], [[DODEFAULT()]], [[FOREACH]], [[JSON_DECODE()]], [[JSON_DECODE_FILE()]], [[JSON_ENCODE()]], [[LIST CLASSES]], [[LOADOBJECT()]], [[NEWOBJECT()]], [[OBJECT()]], [[PRINT_HTML()]], [[PRINT_JSON()]], [[PRINT_XML()]], [[REMOVEPROPERTY()]], [[REQUIRE_ONCE()]], [[SAVEOBJECT()]], [[SQL SELECT]], [[WITH]], [[XML_DECODE_FILE()]] |
− | + | ||
==Description== | ==Description== | ||
Line 66: | Line 63: | ||
</pre> | </pre> | ||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | |||
− |
Revision as of 06:33, 23 November 2012
Contents
Purpose
Display object information in a readable format
Syntax
PRINT_R(<object-ref>)
See Also
ACLASS(), ADDPROPERTY(), AMEMBERS(), COMPOBJ(), CREATEOBJECT(), DEFINE CLASS, DISPLAY CLASSES, DODEFAULT(), FOREACH, JSON_DECODE(), JSON_DECODE_FILE(), JSON_ENCODE(), LIST CLASSES, LOADOBJECT(), NEWOBJECT(), OBJECT(), PRINT_HTML(), PRINT_JSON(), PRINT_XML(), REMOVEPROPERTY(), REQUIRE_ONCE(), SAVEOBJECT(), SQL SELECT, WITH, XML_DECODE_FILE()
Description
The PRINT_R() function is used to display information about the specified object, <object-ref>, in a human readable format.
Tip: You can display the same information just by using the "echo objname" command.
Example
open database southwind select * from shippers into object shipobj print_r(shipobj)
Dynarray (refcnt=1) ( [row1] => Dynarray (refcnt=1) ( [shipperid] => 1 [companyname] => Speedy Express [phone] => (503) 555-9831 ) [row2] => Dynarray (refcnt=1) ( [shipperid] => 2 [companyname] => United Package [phone] => (503) 555-3199 ) [row3] => Dynarray (refcnt=1) ( [shipperid] => 3 [companyname] => Federal Shipping [phone] => (503) 555-9931 ) )
class NullData dynamic property mCHARACTER property mNUMERIC endclass oNULLDATA = new NullData() oNULLDATA.mCHARACTER = "" oNULLDATA.mNUMERIC = 0 oNULLDATA.mLOGICAL = .F. print_r(oNULLDATA) // or alternatively just echo oNULLDATA
Object (refcnt=1) ( [mcharacter] => [mnumeric] => 0 [mlogical] => False )