jmcastagnetto           Wed Mar  7 15:15:13 2001 EDT

  Modified files:              
    /phpdoc/en/functions        funchand.xml var.xml classobj.xml 
                                filesystem.xml 
  Log:
  documentation for is_null, is_scalar, is_writeable, call_user_func_array
  and call_user_func_method
  
  
Index: phpdoc/en/functions/funchand.xml
diff -u phpdoc/en/functions/funchand.xml:1.9 phpdoc/en/functions/funchand.xml:1.10
--- phpdoc/en/functions/funchand.xml:1.9        Wed Mar  7 04:18:14 2001
+++ phpdoc/en/functions/funchand.xml    Wed Mar  7 15:15:13 2001
@@ -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>
@@ -47,6 +108,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>
Index: phpdoc/en/functions/var.xml
diff -u phpdoc/en/functions/var.xml:1.34 phpdoc/en/functions/var.xml:1.35
--- phpdoc/en/functions/var.xml:1.34    Wed Mar  7 02:40:02 2001
+++ phpdoc/en/functions/var.xml Wed Mar  7 15:15:13 2001
@@ -483,6 +483,40 @@
    </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 @@
     </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>
Index: phpdoc/en/functions/classobj.xml
diff -u phpdoc/en/functions/classobj.xml:1.12 phpdoc/en/functions/classobj.xml:1.13
--- phpdoc/en/functions/classobj.xml:1.12       Sat Oct 14 06:26:28 2000
+++ phpdoc/en/functions/classobj.xml    Wed Mar  7 15:15:13 2001
@@ -161,7 +161,51 @@
     </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 @@
      </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>
Index: phpdoc/en/functions/filesystem.xml
diff -u phpdoc/en/functions/filesystem.xml:1.54 phpdoc/en/functions/filesystem.xml:1.55
--- phpdoc/en/functions/filesystem.xml:1.54     Tue Mar  6 19:45:30 2001
+++ phpdoc/en/functions/filesystem.xml  Wed Mar  7 15:15:13 2001
@@ -1808,6 +1808,25 @@
    </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>

Reply via email to