sean            Tue Feb 24 00:54:36 2004 EDT

  Modified files:              
    /phpdoc/en/reference/classobj/functions     is-a.xml 
  Log:
  added example
  
  
http://cvs.php.net/diff.php/phpdoc/en/reference/classobj/functions/is-a.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc/en/reference/classobj/functions/is-a.xml
diff -u phpdoc/en/reference/classobj/functions/is-a.xml:1.3 
phpdoc/en/reference/classobj/functions/is-a.xml:1.4
--- phpdoc/en/reference/classobj/functions/is-a.xml:1.3 Thu May 30 10:02:40 2002
+++ phpdoc/en/reference/classobj/functions/is-a.xml     Tue Feb 24 00:54:36 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
 <!-- splitted from ./en/functions/classobj.xml, last change in rev 1.33 -->
  <refentry id="function.is-a">
    <refnamediv>
@@ -20,6 +20,30 @@
      This function returns &true; if the object is of this class or 
      has this class as one of its parents, &false; otherwise.
     </para>
+    <para>
+      <example>
+        <title>An <function>exec</function> example</title>
+        <programlisting role="php">
+<![CDATA[
+<?php
+// define a class
+class WidgetFactory
+{
+  var $oink = 'moo';
+}
+
+// create a new object
+$WF = new WidgetFactory();
+
+if (is_a($WF, 'WidgetFactory'))
+{
+  echo 'yes, $WF is still a WidgetFactory';
+}
+?>
+]]>
+        </programlisting>
+      </example>
+    </para>
     <simpara>
      See also <function>get_class</function>, 
      <function>get_parent_class</function>, and 

Reply via email to