- Update docs on the three var dumping functions

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@147762 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Derick Rethans 2004-01-03 14:00:52 +00:00
parent f542a3c6db
commit e2a2bcc1a2
3 changed files with 26 additions and 15 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/var.xml, last change in rev 1.5 -->
<refentry id="function.print-r">
<refnamediv>
@ -27,6 +27,9 @@
printed. If given an <type>array</type>,
values will be presented in a format that shows keys and
elements. Similar notation is used for <type>object</type>s.
<function>print_r</function> and <function>var_export</function> will
also show protected and private properties of objects with PHP 5, on the
contrary to <function>var_dump</function>.
</simpara>
<simpara>
Remember that <function>print_r</function> will move the array

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/var.xml, last change in rev 1.84 -->
<refentry id="function.var-dump">
<refnamediv>
@ -16,14 +16,16 @@
</methodsynopsis>
<simpara>
This function displays structured information about one or more
expressions that includes its type and value. Arrays are explored
recursively with values indented to show structure.
expressions that includes its type and value. Arrays and objects are
explored recursively with values indented to show structure.
</simpara>
<simpara>
In PHP only public properties of objects will be returned in the output.
<function>var_export</function> and <function>print_r</function> will
also return protected and private properties.
</simpara>
</simpara>
&tip.ob-capture;
<simpara>
Compare <function>var_dump</function> to
<function>print_r</function>.
</simpara>
<para>
<example>
<title><function>var_dump</function> example</title>
@ -79,6 +81,10 @@ bool(true)
</screen>
</example>
</para>
<simpara>
See also <function>var_export</function> and
<function>print_r</function>.
</simpara>
</refsect1>
</refentry>

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/var.xml, last change in rev 1.6 -->
<refentry id="function.var-export">
<refnamediv>
<refname>var_export</refname>
<refpurpose>Outputs or returns a string representation of a variable</refpurpose>
<refpurpose>Outputs or returns a parsable string representation of a variable</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -16,16 +16,14 @@
<simpara>
This function returns structured information about the variable that is
passed to this function. It is similar to <function>var_dump</function>
with the exception that the returned representation is valid PHP code.
with two exceptions. The first one is that the returned representation is
valid PHP code, the second that it will also return protected and private
properties of an object with PHP 5.
</simpara>
<simpara>
You can also return the variable representation by using &true; as
second parameter to this function.
</simpara>
<simpara>
Compare <function>var_export</function> to
<function>var_dump</function>.
</simpara>
<para>
<informalexample>
<programlisting role="php">
@ -74,6 +72,10 @@ echo $v;
</screen>
</informalexample>
</para>
<simpara>
See also <function>var_export</function> and
<function>print_r</function>.
</simpara>
</refsect1>
</refentry>