Attaching a patch for aforementioned file to reflect change in behaviour as of PHP5. Not sure what the rule is for commingled version docs, so I tried to follow what appeared to be the correct pattern.
Index: method-exists.xml =================================================================== RCS file: /repository/phpdoc/en/reference/classobj/functions/method-exists.xml,v retrieving revision 1.7 diff -p -u -r1.7 method-exists.xml --- method-exists.xml 14 Jan 2007 15:10:19 -0000 1.7 +++ method-exists.xml 3 Apr 2007 06:52:19 -0000 @@ -9,12 +9,19 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>method_exists</methodname> - <methodparam><type>object</type><parameter>object</parameter></methodparam> + <methodparam><type>mixed</type><parameter>var</parameter></methodparam> <methodparam><type>string</type><parameter>method_name</parameter></methodparam> </methodsynopsis> <para> - Checks if the class method exists in the given - <parameter>object</parameter>. + Checks if the class method exists in the given class or object + <parameter>var</parameter>. + </para> + <para> + <note> + <para> + In PHP4, this function only accepts instances, not class names. + </para> + </note> </para> </refsect1> <refsect1 role="parameters"> @@ -22,10 +29,10 @@ <para> <variablelist> <varlistentry> - <term><parameter>object</parameter></term> + <term><parameter>var</parameter></term> <listitem> <para> - An object instance + An object instance or class name </para> </listitem> </varlistentry> @@ -44,7 +51,7 @@ &reftitle.returnvalues; <para> Returns &true; if the method given by <parameter>method_name</parameter> - has been defined for the given <parameter>object</parameter>, &false; + has been defined for the given object or class <parameter>var</parameter>, &false; otherwise. </para> </refsect1> @@ -52,7 +59,7 @@ &reftitle.examples; <para> <example> - <title><function>method_exists</function> example</title> + <title><function>method_exists</function> object example</title> <programlisting role="php"> <![CDATA[ <?php @@ -68,6 +75,22 @@ bool(true) ]]> </screen> </example> + <example> + <title><function>method_exists</function> class example</title> + <programlisting role="php"> +<![CDATA[ +<?php +var_dump(method_exists('Directory', 'read')); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +bool(true) +]]> + </screen> + </example> </para> </refsect1> <refsect1 role="seealso">