mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
A nicer version.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@19844 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
0036f4c3ee
commit
51ff04df1b
1 changed files with 110 additions and 130 deletions
|
@ -1,4 +1,4 @@
|
|||
<reference id="ref.var">
|
||||
<reference id="ref.var">
|
||||
<title>Variable functions</title>
|
||||
<titleabbrev>Variables</titleabbrev>
|
||||
|
||||
|
@ -13,23 +13,23 @@
|
|||
<funcdef>double <function>doubleval</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<simpara>
|
||||
Returns the double (floating point) value of <parameter>var</parameter>.</simpara>
|
||||
|
||||
Returns the double (floating point) value of
|
||||
<parameter>var</parameter>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
<parameter>var</parameter> may be any scalar type. You cannot use
|
||||
<function>doubleval</function> on arrays or objects.</simpara>
|
||||
|
||||
<function>doubleval</function> on arrays or objects.
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also <function>intval</function>,
|
||||
<function>strval</function>,
|
||||
<function>settype</function> and <link linkend="language.types.type-juggling">Type juggling</link>.</simpara>
|
||||
|
||||
<function>strval</function>, <function>settype</function> and
|
||||
<link linkend="language.types.type-juggling">Type
|
||||
juggling</link>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.empty">
|
||||
<refnamediv>
|
||||
<refname>empty</refname>
|
||||
|
@ -41,27 +41,23 @@
|
|||
<funcdef>int <function>empty</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<simpara>
|
||||
Returns false if <parameter>var</parameter> is set and has a
|
||||
non-empty or non-zero value; true otherwise.
|
||||
</simpara>
|
||||
|
||||
<simpara>
|
||||
Note that this is meaningless when used on anything which isn't a
|
||||
variable; i.e. <command>empty( addslashes( $name ) )</command>
|
||||
has no meaning since it would be checking whether something which
|
||||
variable; i.e. <command>empty (addslashes ($name))</command> has
|
||||
no meaning since it would be checking whether something which
|
||||
isn't a variable is a variable with a false value.
|
||||
</simpara>
|
||||
|
||||
<simpara>
|
||||
See also <function>isset</function> and <function>unset</function>.
|
||||
See also <function>isset</function> and
|
||||
<function>unset</function>.
|
||||
</simpara>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.gettype">
|
||||
<refnamediv>
|
||||
<refname>gettype</refname>
|
||||
|
@ -73,10 +69,10 @@
|
|||
<funcdef>string <function>gettype</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<para>
|
||||
Returns the type of the PHP variable <parameter>var</parameter>.</para>
|
||||
|
||||
Returns the type of the PHP variable
|
||||
<parameter>var</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
Possibles values for the returned string are:
|
||||
<itemizedlist>
|
||||
|
@ -86,15 +82,14 @@
|
|||
<listitem><simpara>"array"</simpara></listitem>
|
||||
<listitem><simpara>"object"</simpara></listitem>
|
||||
<listitem><simpara>"unknown type"</simpara></listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>settype</function>.</para>
|
||||
|
||||
See also <function>settype</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.intval">
|
||||
<refnamediv>
|
||||
<refname>intval</refname>
|
||||
|
@ -105,23 +100,25 @@
|
|||
<funcsynopsis>
|
||||
<funcdef>int <function>intval</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
<paramdef>int <parameter><optional>base</optional></parameter></paramdef>
|
||||
<paramdef>int
|
||||
<parameter><optional>base</optional></parameter>
|
||||
</paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<simpara>
|
||||
Returns the integer value of <parameter>var</parameter>,
|
||||
using the specified base for the conversion (the default is
|
||||
base 10).</simpara>
|
||||
|
||||
base 10).
|
||||
</simpara>
|
||||
<simpara>
|
||||
<parameter>var</parameter> may be any scalar type. You cannot use
|
||||
<function>intval</function> on arrays or objects.</simpara>
|
||||
|
||||
<function>intval</function> on arrays or objects.
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also <function>doubleval</function>,
|
||||
<function>strval</function>,
|
||||
<function>settype</function> and <link linkend="language.types.type-juggling">Type juggling</link>.</simpara>
|
||||
|
||||
<function>strval</function>, <function>settype</function> and
|
||||
<link linkend="language.types.type-juggling">Type
|
||||
juggling</link>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
@ -136,11 +133,10 @@
|
|||
<funcdef>int <function>is_array</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<para>
|
||||
Returns true if <parameter>var</parameter> is an array, false
|
||||
otherwise.</para>
|
||||
|
||||
otherwise.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>is_double</function>,
|
||||
<function>is_float</function>,
|
||||
|
@ -149,12 +145,11 @@
|
|||
<function>is_real</function>,
|
||||
<function>is_string</function>,
|
||||
<function>is_long</function>, and
|
||||
<function>is_object</function>.</para>
|
||||
|
||||
<function>is_object</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.is-double">
|
||||
<refnamediv>
|
||||
<refname>is_double</refname>
|
||||
|
@ -166,11 +161,10 @@
|
|||
<funcdef>int <function>is_double</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<para>
|
||||
Returns true if <parameter>var</parameter> is a double,
|
||||
false otherwise.</para>
|
||||
|
||||
false otherwise.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>is_array</function>,
|
||||
<function>is_float</function>,
|
||||
|
@ -179,12 +173,11 @@
|
|||
<function>is_real</function>,
|
||||
<function>is_string</function>,
|
||||
<function>is_long</function>, and
|
||||
<function>is_object</function>.</para>
|
||||
|
||||
<function>is_object</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.is-float">
|
||||
<refnamediv>
|
||||
<refname>is_float</refname>
|
||||
|
@ -196,10 +189,9 @@
|
|||
<funcdef>int <function>is_float</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<simpara>
|
||||
This function is an alias for <function>is_double</function>.</simpara>
|
||||
|
||||
This function is an alias for <function>is_double</function>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also <function>is_double</function>,
|
||||
<function>is_real</function>,
|
||||
|
@ -208,12 +200,11 @@
|
|||
<function>is_string</function>,
|
||||
<function>is_object</function>,
|
||||
<function>is_array</function>, and
|
||||
<function>is_long</function>.</simpara>
|
||||
|
||||
<function>is_long</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.is-int">
|
||||
<refnamediv>
|
||||
<refname>is_int</refname>
|
||||
|
@ -225,10 +216,9 @@
|
|||
<funcdef>int <function>is_int</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<simpara>
|
||||
This function is an alias for <function>is_long</function>.</simpara>
|
||||
|
||||
This function is an alias for <function>is_long</function>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also <function>is_double</function>,
|
||||
<function>is_float</function>,
|
||||
|
@ -237,12 +227,11 @@
|
|||
<function>is_real</function>,
|
||||
<function>is_object</function>,
|
||||
<function>is_array</function>, and
|
||||
<function>is_long</function>.</simpara>
|
||||
|
||||
<function>is_long</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.is-integer">
|
||||
<refnamediv>
|
||||
<refname>is_integer</refname>
|
||||
|
@ -254,10 +243,10 @@
|
|||
<funcdef>int <function>is_integer</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<simpara>
|
||||
This function is an alias for <function>is_long</function>.</simpara>
|
||||
|
||||
This function is an alias for
|
||||
<function>is_long</function>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also <function>is_double</function>,
|
||||
<function>is_float</function>,
|
||||
|
@ -266,12 +255,11 @@
|
|||
<function>is_real</function>,
|
||||
<function>is_object</function>,
|
||||
<function>is_array</function>, and
|
||||
<function>is_long</function>.</simpara>
|
||||
|
||||
<function>is_long</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.is-long">
|
||||
<refnamediv>
|
||||
<refname>is_long</refname>
|
||||
|
@ -283,11 +271,10 @@
|
|||
<funcdef>int <function>is_long</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<para>
|
||||
Returns true if <parameter>var</parameter> is an integer (long),
|
||||
false otherwise.</para>
|
||||
|
||||
false otherwise.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>is_double</function>,
|
||||
<function>is_float</function>,
|
||||
|
@ -296,12 +283,11 @@
|
|||
<function>is_string</function>,
|
||||
<function>is_object</function>,
|
||||
<function>is_array</function>, and
|
||||
<function>is_integer</function>.</para>
|
||||
|
||||
<function>is_integer</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.is-object">
|
||||
<refnamediv>
|
||||
<refname>is_object</refname>
|
||||
|
@ -313,11 +299,10 @@
|
|||
<funcdef>int <function>is_object</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<para>
|
||||
Returns true if <parameter>var</parameter> is an object, false
|
||||
otherwise.</para>
|
||||
|
||||
otherwise.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>is_long</function>,
|
||||
<function>is_int</function>,
|
||||
|
@ -326,12 +311,11 @@
|
|||
<function>is_double</function>,
|
||||
<function>is_real</function>,
|
||||
<function>is_string</function>, and
|
||||
<function>is_array</function>.</para>
|
||||
|
||||
<function>is_array</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.is-real">
|
||||
<refnamediv>
|
||||
<refname>is_real</refname>
|
||||
|
@ -343,10 +327,10 @@
|
|||
<funcdef>int <function>is_real</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<simpara>
|
||||
This function is an alias for <function>is_double</function>.</simpara>
|
||||
|
||||
This function is an alias for
|
||||
<function>is_double</function>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also <function>is_long</function>,
|
||||
<function>is_int</function>,
|
||||
|
@ -355,12 +339,11 @@
|
|||
<function>is_double</function>,
|
||||
<function>is_object</function>,
|
||||
<function>is_string</function>, and
|
||||
<function>is_array</function>.</simpara>
|
||||
|
||||
<function>is_array</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.is-string">
|
||||
<refnamediv>
|
||||
<refname>is_string</refname>
|
||||
|
@ -372,11 +355,10 @@
|
|||
<funcdef>int <function>is_string</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<para>
|
||||
Returns true if <parameter>var</parameter> is a string,
|
||||
false otherwise.</para>
|
||||
|
||||
false otherwise.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>is_long</function>,
|
||||
<function>is_int</function>,
|
||||
|
@ -385,12 +367,11 @@
|
|||
<function>is_double</function>,
|
||||
<function>is_real</function>,
|
||||
<function>is_object</function>, and
|
||||
<function>is_array</function>.</para>
|
||||
|
||||
<function>is_array</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.isset">
|
||||
<refnamediv>
|
||||
<refname>isset</refname>
|
||||
|
@ -402,24 +383,26 @@
|
|||
<funcdef>int <function>isset</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<simpara>
|
||||
Returns true if <parameter>var</parameter> exists;
|
||||
false otherwise.</simpara>
|
||||
|
||||
false otherwise.
|
||||
</simpara>
|
||||
<para>
|
||||
If a variable has been unset with <function>unset</function>,
|
||||
it will no longer be <function>isset</function>.
|
||||
<informalexample><programlisting>
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
$a = "test";
|
||||
echo isset($a); // true
|
||||
unset($a);
|
||||
echo isset($a); // false
|
||||
</programlisting></informalexample></para>
|
||||
|
||||
echo isset ($a); // true
|
||||
unset ($a);
|
||||
echo isset ($a); // false
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<simpara>
|
||||
See also <function>empty</function> and <function>unset</function>.</simpara>
|
||||
|
||||
See also <function>empty</function> and
|
||||
<function>unset</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
@ -472,11 +455,10 @@ print_r ($a);
|
|||
<paramdef>string <parameter>var</parameter></paramdef>
|
||||
<paramdef>string <parameter>type</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<para>
|
||||
Set the type of variable <parameter>var</parameter> to
|
||||
<parameter>type</parameter>.</para>
|
||||
|
||||
<parameter>type</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
Possibles values of <parameter>type</parameter> are:
|
||||
<itemizedlist>
|
||||
|
@ -485,18 +467,17 @@ print_r ($a);
|
|||
<listitem><simpara>"string"</simpara></listitem>
|
||||
<listitem><simpara>"array"</simpara></listitem>
|
||||
<listitem><simpara>"object"</simpara></listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Returns true if successful; otherwise returns false.</para>
|
||||
|
||||
Returns true if successful; otherwise returns false.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>gettype</function>.</para>
|
||||
|
||||
See also <function>gettype</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.strval">
|
||||
<refnamediv>
|
||||
<refname>strval</refname>
|
||||
|
@ -508,23 +489,22 @@ print_r ($a);
|
|||
<funcdef>string <function>strval</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<simpara>
|
||||
Returns the string value of <parameter>var</parameter>.</simpara>
|
||||
|
||||
Returns the string value of <parameter>var</parameter>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
<parameter>var</parameter> may be any scalar type. You cannot use
|
||||
<function>strval</function> on arrays or objects.</simpara>
|
||||
|
||||
<function>strval</function> on arrays or objects.
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also <function>doubleval</function>,
|
||||
<function>intval</function>,
|
||||
<function>settype</function> and <link linkend="language.types.type-juggling">Type juggling</link>.</simpara>
|
||||
|
||||
<function>intval</function>, <function>settype</function> and
|
||||
<link linkend="language.types.type-juggling">Type
|
||||
juggling</link>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.unset">
|
||||
<refnamediv>
|
||||
<refname>unset</refname>
|
||||
|
@ -536,26 +516,26 @@ print_r ($a);
|
|||
<funcdef>int <function>unset</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcsynopsis>
|
||||
|
||||
<para>
|
||||
<function>unset</function> destroys the specified variable and
|
||||
returns true.</para>
|
||||
|
||||
returns true.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>unset</function> example</title>
|
||||
<programlisting>
|
||||
unset( $foo );
|
||||
unset( $bar['quux'] );
|
||||
<programlisting role="php">
|
||||
unset ($foo);
|
||||
unset ($bar['quux']);
|
||||
</programlisting>
|
||||
</example></para>
|
||||
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>isset</function> and <function>empty</function>.</para>
|
||||
|
||||
See also <function>isset</function> and
|
||||
<function>empty</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.var-dump">
|
||||
<refnamediv>
|
||||
<refname>var_dump</refname>
|
||||
|
|
Loading…
Reference in a new issue