2010-03-28 22:10:10 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 07:07:53 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xml:id="function.get-defined-functions" xmlns="http://docbook.org/ns/docbook">
|
2007-02-17 20:02:43 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>get_defined_functions</refname>
|
|
|
|
<refpurpose>Returns an array of all defined functions</refpurpose>
|
|
|
|
</refnamediv>
|
2007-02-17 20:03:06 +00:00
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2007-02-17 20:02:43 +00:00
|
|
|
<methodsynopsis>
|
|
|
|
<type>array</type><methodname>get_defined_functions</methodname>
|
|
|
|
<void/>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2007-02-17 20:03:06 +00:00
|
|
|
Gets an array of all defined functions.
|
2007-02-17 20:02:43 +00:00
|
|
|
</para>
|
2007-02-17 20:03:06 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
2007-02-17 20:02:43 +00:00
|
|
|
<para>
|
2007-02-17 20:03:06 +00:00
|
|
|
Returns an multidimensional array containing a list of all defined
|
|
|
|
functions, both built-in (internal) and user-defined. The internal
|
|
|
|
functions will be accessible via <varname>$arr["internal"]</varname>, and
|
|
|
|
the user defined ones using <varname>$arr["user"]</varname> (see example
|
|
|
|
below).
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title><function>get_defined_functions</function> example</title>
|
2007-02-17 20:02:43 +00:00
|
|
|
<programlisting role="php">
|
2002-04-15 00:12:54 +00:00
|
|
|
<![CDATA[
|
2003-06-16 14:37:37 +00:00
|
|
|
<?php
|
2007-02-17 20:02:43 +00:00
|
|
|
function myrow($id, $data)
|
2004-01-15 12:43:50 +00:00
|
|
|
{
|
2002-04-15 00:12:54 +00:00
|
|
|
return "<tr><th>$id</th><td>$data</td></tr>\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
$arr = get_defined_functions();
|
|
|
|
|
|
|
|
print_r($arr);
|
2003-06-16 14:37:37 +00:00
|
|
|
?>
|
2002-04-15 00:12:54 +00:00
|
|
|
]]>
|
2007-02-17 20:02:43 +00:00
|
|
|
</programlisting>
|
2007-02-17 20:03:06 +00:00
|
|
|
&example.outputs.similar;
|
2007-02-17 20:02:43 +00:00
|
|
|
<screen>
|
2002-04-15 00:12:54 +00:00
|
|
|
<![CDATA[
|
|
|
|
Array
|
|
|
|
(
|
|
|
|
[internal] => Array
|
|
|
|
(
|
|
|
|
[0] => zend_version
|
|
|
|
[1] => func_num_args
|
|
|
|
[2] => func_get_arg
|
|
|
|
[3] => func_get_args
|
|
|
|
[4] => strlen
|
|
|
|
[5] => strcmp
|
|
|
|
[6] => strncmp
|
|
|
|
...
|
|
|
|
[750] => bcscale
|
|
|
|
[751] => bccomp
|
|
|
|
)
|
|
|
|
|
|
|
|
[user] => Array
|
|
|
|
(
|
|
|
|
[0] => myrow
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
]]>
|
2007-02-17 20:02:43 +00:00
|
|
|
</screen>
|
2007-02-17 20:03:06 +00:00
|
|
|
</example>
|
2007-02-17 20:02:43 +00:00
|
|
|
</para>
|
2007-02-17 20:03:06 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
2007-02-17 20:02:43 +00:00
|
|
|
<para>
|
2007-02-17 20:03:06 +00:00
|
|
|
<simplelist>
|
|
|
|
<member><function>function_exists</function></member>
|
|
|
|
<member><function>get_defined_vars</function></member>
|
|
|
|
<member><function>get_defined_constants</function></member>
|
2008-04-13 11:37:33 +00:00
|
|
|
<member><function>get_declared_classes</function></member>
|
2007-02-17 20:03:06 +00:00
|
|
|
</simplelist>
|
2007-02-17 20:02:43 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-02-17 20:03:06 +00:00
|
|
|
|
2007-02-17 20:02:43 +00:00
|
|
|
</refentry>
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
<!-- 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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2002-04-15 00:12:54 +00:00
|
|
|
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
|
|
|
|
-->
|