mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
documentation for is_null, is_scalar, is_writeable, call_user_func_array
and call_user_func_method git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@42917 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
51e297e4e1
commit
d021c22d28
4 changed files with 245 additions and 2 deletions
|
@ -161,7 +161,51 @@ Object leafy belongs to class spinach a subclass of Vegetable
|
|||
</sect2>
|
||||
</sect1>
|
||||
</partintro>
|
||||
|
||||
|
||||
<refentry id="function.call-user-method-array">
|
||||
<refnamediv>
|
||||
<refname>call_user_method_array</refname>
|
||||
<refpurpose>
|
||||
Call a user method given with an array of parameters
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>mixed
|
||||
<function>call_user_method_array</function>
|
||||
</funcdef>
|
||||
<paramdef>string
|
||||
<parameter>method_name</parameter>
|
||||
</paramdef>
|
||||
<paramdef>object
|
||||
<parameter>obj</parameter>
|
||||
</paramdef>
|
||||
<paramdef>array
|
||||
<parameter><optional>paramarr</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Calls a the method referred by <parameter>method_name</parameter> from
|
||||
the user defined <parameter>obj</parameter> object, using the paramaters
|
||||
in <parameter>paramarr</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>call_user_func_array</function>,
|
||||
<function>call_user_func</function>,
|
||||
<function>call_user_method</function>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
This function was added to the CVS code after release of PHP 4.0.4pl1
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.call-user-method">
|
||||
<refnamediv>
|
||||
<refname>call_user_method</refname>
|
||||
|
@ -226,7 +270,9 @@ call_user_method ("print_info", $cntry, "\t");
|
|||
</informalexample>
|
||||
</para>
|
||||
<simpara>
|
||||
See also <function>call_user_func</function>.
|
||||
See also <function>call_user_func_array</function>.
|
||||
<function>call_user_func</function>,
|
||||
<function>call_user_method_array</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -1808,6 +1808,25 @@ if($fp){
|
|||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.is-writeable">
|
||||
<refnamediv>
|
||||
<refname>is_writeable</refname>
|
||||
<refpurpose>Tells whether the filename is writable</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>bool <function>is_writeable</function></funcdef>
|
||||
<paramdef>string <parameter>filename</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This is an alias for <function>is_writable</function>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.is-uploaded-file">
|
||||
<refnamediv>
|
||||
<refname>is_uploaded_file</refname>
|
||||
|
|
|
@ -8,6 +8,67 @@
|
|||
with functions.
|
||||
</para>
|
||||
</partintro>
|
||||
|
||||
<refentry id="function.call-user-func-array">
|
||||
<refnamediv>
|
||||
<refname>call_user_func_array</refname>
|
||||
<refpurpose>
|
||||
Call a user function given with an array of parameters
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>mixed
|
||||
<function>call_user_func_array</function>
|
||||
</funcdef>
|
||||
<paramdef>string
|
||||
<parameter>function_name</parameter>
|
||||
</paramdef>
|
||||
<paramdef>array
|
||||
<parameter><optional>paramarr</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Call a user defined function given by
|
||||
<parameter>function_name</parameter>, with
|
||||
the paramaters in <parameter>paramarr</parameter>.
|
||||
For example:
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
function debug($var, $val)
|
||||
echo "***DEBUGGING\nVARIABLE: $var\nVALUE:";
|
||||
if (is_array($val) || is_object($val) || is_resource($val))
|
||||
print_r($val);
|
||||
else
|
||||
echo "\n$val\n";
|
||||
echo "***\n";
|
||||
}
|
||||
|
||||
$c = mysql_connect();
|
||||
$host = $HTTP_SERVER_VARS["SERVER_NAME"];
|
||||
|
||||
call_user_func_array ('debug', array("host", $host));
|
||||
call_user_func_array ('debug', array("c", $c));
|
||||
call_user_func_array ('debug', array("HTTP_POST_VARS", $HTTP_POST_VARS));
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>call_user_func</function>,
|
||||
<function>call_user_method</function>,
|
||||
<function>call_user_method_array</function>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
This function was added to the CVS code after release of PHP 4.0.4pl1
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.call-user-func">
|
||||
<refnamediv>
|
||||
|
@ -48,6 +109,12 @@ call_user_func ('barber', "shave");
|
|||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>call_user_func_array</function>,
|
||||
<function>call_user_method</function>,
|
||||
<function>call_user_method_array</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
|
@ -483,6 +483,40 @@ echo get_resource_type($doc->doc)."\n";
|
|||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.is-null">
|
||||
<refnamediv>
|
||||
<refname>is_null</refname>
|
||||
<refpurpose>
|
||||
Finds whether a variable is null
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>bool <function>is_null</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Returns true if <parameter>var</parameter> is null, false otherwise.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>is_bool</function>,
|
||||
<function>is_double</function>,
|
||||
<function>is_numeric</function>,
|
||||
<function>is_float</function>,
|
||||
<function>is_int</function>,
|
||||
<function>is_real</function>,
|
||||
<function>is_string</function>,
|
||||
<function>is_object</function>,
|
||||
<function>is_array</function>, and
|
||||
<function>is_integer</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.is-numeric">
|
||||
<refnamediv>
|
||||
<refname>is_numeric</refname>
|
||||
|
@ -609,6 +643,83 @@ echo get_resource_type($doc->doc)."\n";
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.is-scalar">
|
||||
<refnamediv>
|
||||
<refname>is_scalar</refname>
|
||||
<refpurpose>
|
||||
Finds whether a variable is a scalar
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>bool
|
||||
<function>is_scalar</function>
|
||||
</funcdef>
|
||||
<paramdef>mixed
|
||||
<parameter>var</parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>is_scalar</function> returns true if the variable
|
||||
given by the <parameter>var</parameter> parameter is a scalar,
|
||||
otherwise it returns false.
|
||||
</para>
|
||||
<para>
|
||||
Scalar variables are those containing an integer, float, string
|
||||
or boolean. For example:
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
function show_var($var) {
|
||||
if (is_scalar($var))
|
||||
echo $var;
|
||||
else
|
||||
var_dump($var);
|
||||
}
|
||||
|
||||
$pi = 3.1416;
|
||||
$proteins = array("hemoglobin", "cytochrome c oxidase", "ferredoxin");
|
||||
|
||||
show_var($pi);
|
||||
// prints: 3.1416
|
||||
|
||||
show_var($proteins)
|
||||
// prints:
|
||||
// array(3) {
|
||||
// [0]=>
|
||||
// string(10) "hemoglobin"
|
||||
// [1]=>
|
||||
// string(20) "cytochrome c oxidase"
|
||||
// [2]=>
|
||||
// string(10) "ferredoxin"
|
||||
// }
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
This function was added to the CVS code after the release of PHP
|
||||
4.0.4pl1
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
See also <function>is_bool</function>,
|
||||
<function>is_double</function>,
|
||||
<function>is_numeric</function>,
|
||||
<function>is_float</function>,
|
||||
<function>is_int</function>,
|
||||
<function>is_real</function>,
|
||||
<function>is_string</function>,
|
||||
<function>is_object</function>,
|
||||
<function>is_array</function>, and
|
||||
<function>is_integer</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.is-string">
|
||||
<refnamediv>
|
||||
|
|
Loading…
Reference in a new issue