mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 18:38:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78496 c90b9560-bf6c-de11-be94-00142212c4b1
51 lines
1.8 KiB
XML
51 lines
1.8 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.2 $ -->
|
|
<!-- splitted from ./en/functions/pcre.xml, last change in rev 1.47 -->
|
|
<refentry id="function.preg-replace-callback">
|
|
<refnamediv>
|
|
<refname>preg_replace_callback</refname>
|
|
<refpurpose>Perform a regular expression search and replace using a callback</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>mixed</type><methodname>preg_replace_callback</methodname>
|
|
<methodparam><type>mixed</type><parameter>pattern</parameter></methodparam>
|
|
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
|
|
<methodparam><type>mixed</type><parameter>subject</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>limit</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
The behavior of this function is almost identical to
|
|
<function>preg_replace</function>, except for the fact that instead of
|
|
<parameter>replacement</parameter> parameter, one should specify a
|
|
<parameter>callback</parameter> that will be called and passed an array of
|
|
matched elements in the subject string. The callback should return the
|
|
replacement string. This function was added in PHP 4.0.5.
|
|
</para>
|
|
<para>
|
|
See also <function>preg_replace</function>.
|
|
</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
|
|
-->
|