php-doc-en/reference/runkit/functions/runkit-function-add.xml
2006-05-03 19:14:23 +00:00

119 lines
2.9 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
<refentry id="function.runkit-function-add">
<refnamediv>
<refname>runkit_function_add</refname>
<refpurpose>
Add a new function, similar to <function>create_function</function>
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>runkit_function_add</methodname>
<methodparam><type>string</type><parameter>funcname</parameter></methodparam>
<methodparam><type>string</type><parameter>arglist</parameter></methodparam>
<methodparam><type>string</type><parameter>code</parameter></methodparam>
</methodsynopsis>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>funcname</parameter></term>
<listitem>
<para>
Name of function to be created
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>arglist</parameter></term>
<listitem>
<para>
Comma separated argument list
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>code</parameter></term>
<listitem>
<para>
Code making up the function
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>runkit_function_add</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
runkit_function_add('testme','$a,$b','echo "The value of a is $a\n"; echo "The value of b is $b\n";');
testme(1,2);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
The value of a is 1
The value of b is 2
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>create_function</function></member>
<member><function>runkit_function_redefine</function></member>
<member><function>runkit_function_copy</function></member>
<member><function>runkit_function_rename</function></member>
<member><function>runkit_function_remove</function></member>
<member><function>runkit_method_add</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->