Add tip about investigating types of expressions to first page of types

section.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@61022 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jeroen van Wolffelaar 2001-10-28 18:47:39 +00:00
parent de06c85cfb
commit c565fb8405

View file

@ -1,5 +1,5 @@
<?xml encoding="iso-8859-1"?>
<!-- $Revision: 1.54 $ -->
<!-- $Revision: 1.55 $ -->
<chapter id="language.types">
<title>Types</title>
@ -104,6 +104,20 @@
rather, it is decided at runtime by PHP depending on the context in
which that variable is used.
</simpara>
<tip>
<simpara>
If you want to check out the type and value of a certain <link
linkend="language.expressions">expression</link>, use
<function>var_dump</function>.
</simpara>
<simpara>
If you simply want a human-readable representation of the type for
debugging, use <function>gettype</function>. To check for a certain type,
do <emphasis>not</emphasis> use <function>gettype</function>, but use the
<literal>is_<replaceable>type</replaceable></literal> functions.
</simpara>
<!-- TODO: example(s) would be great -->
</tip>
<simpara>
If you would like to force a variable to be converted to a certain
type, you may either <link