<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <refentry xml:id="function.override-function" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>override_function</refname> <refpurpose>Overrides built-in functions</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>override_function</methodname> <methodparam><type>string</type><parameter>function_name</parameter></methodparam> <methodparam><type>string</type><parameter>function_args</parameter></methodparam> <methodparam><type>string</type><parameter>function_code</parameter></methodparam> </methodsynopsis> <para> Overrides built-in functions by replacing them in the symbol table. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>function_name</parameter></term> <listitem> <para> The function to override. </para> </listitem> </varlistentry> <varlistentry> <term><parameter>function_args</parameter></term> <listitem> <para> The function arguments, as a comma separated string. </para> <para> Usually you will want to pass this parameter, as well as the <parameter>function_code</parameter> parameter, as a single quote delimited string. The reason for using single quoted strings, is to protect the variable names from parsing, otherwise, if you use double quotes there will be a need to escape the variable names, e.g. \<varname>$your_var</varname>. </para> </listitem> </varlistentry> <varlistentry> <term><parameter>function_code</parameter></term> <listitem> <para> The new code for 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><function>override_function</function> example</title> <programlisting role="php"> <![CDATA[ <?php override_function('test', '$a,$b', 'echo "DOING TEST"; return $a * $b;'); ?> ]]> </programlisting> </example> </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:"~/.phpdoc/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 -->