mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
de06c85cfb
commit
c565fb8405
1 changed files with 15 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue