svn: /phpdoc/en/trunk/internals2/opcodes/ add-interface.xml

From: Date: Sun, 16 Aug 2015 00:42:19 +0000
Subject: svn: /phpdoc/en/trunk/internals2/opcodes/ add-interface.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-13603@lists.php.net to get a copy of this message
cmb Sun, 16 Aug 2015 00:42:19 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=337494 Log: Add real example code for the ADD_INTERFACE opcode -- Provided by anonymous 56715 (gennady@kovshenin.com) Changed paths: U phpdoc/en/trunk/internals2/opcodes/add-interface.xml Modified: phpdoc/en/trunk/internals2/opcodes/add-interface.xml =================================================================== --- phpdoc/en/trunk/internals2/opcodes/add-interface.xml 2015-08-16 00:32:48 UTC (rev 337493) +++ phpdoc/en/trunk/internals2/opcodes/add-interface.xml 2015-08-16 00:42:19 UTC (rev 337494) @@ -8,11 +8,64 @@ <![CDATA[ <?php /* - * + * adds an implemented interface to a class declaration * opcode number: 144 - * No sample PHP yet */ + */ +interface iA { +} + +class A implements iA { +} ?> ]]> </programlisting> </section> + <section xml:id="internals2.opcodes.add-interface.listing"> + <title>PHP opcodes</title> + <simpara>Function name: (null)</simpara> + <simpara>Compiled variables: none</simpara> + <informaltable> + <tgroup cols="7"> + <thead> + <row> + <entry>line</entry><entry>#</entry><entry>op</entry> + <entry>fetch</entry><entry>ext</entry><entry>return</entry> + <entry>operands</entry> + </row> + </thead> + <tbody> + <row> + <entry>6</entry><entry>0</entry> + <entry>NOP</entry><entry></entry> + <entry></entry><entry></entry> + <entry></entry> + </row> + <row> + <entry></entry><entry>1</entry> + <entry>DECLARE_CLASS</entry><entry></entry> + <entry></entry><entry></entry> + <entry>'a'</entry> + </row> + <row> + <entry></entry><entry>2</entry> + <entry>ADD_INTERFACE</entry><entry></entry> + <entry></entry><entry></entry> + <entry>'iA'</entry> + </row> + <row> + <entry></entry><entry>3</entry> + <entry>VERIFY_ABSTRACT_CLASS</entry><entry></entry> + <entry></entry><entry></entry> + <entry></entry> + </row> + <row> + <entry></entry><entry>3</entry> + <entry>RETURN</entry><entry></entry> + <entry></entry><entry></entry> + <entry>1</entry> + </row> + </tbody> + </tgroup> + </informaltable> + </section> </section> \ No newline at end of file

« previous php.doc.cvs (#13603) next »