mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Link anonymous functions/preg-replace-callback.xml
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@286543 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6f9312e97b
commit
5367ec851c
2 changed files with 5 additions and 2 deletions
|
@ -64,7 +64,8 @@
|
|||
<para>
|
||||
Apart from common user-defined function, <function>create_function</function>
|
||||
can also be used to create an anonymous callback function. As of PHP 5.3.0
|
||||
its possible to also pass a closure to a callback parameter.
|
||||
it is possible to also pass a
|
||||
<link linkend="functions.anonymous">closure</link> to a callback parameter.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
|
|
@ -48,7 +48,9 @@
|
|||
<para>
|
||||
You'll often need the <parameter>callback</parameter> function
|
||||
for a <function>preg_replace_callback</function> in just one place.
|
||||
In this case you can use <function>create_function</function> to
|
||||
In this case you can use an
|
||||
<link linkend="functions.anonymous">anonymous function</link> (since
|
||||
PHP 5.3.0) or <function>create_function</function> to
|
||||
declare an anonymous function as callback within the call to
|
||||
<function>preg_replace_callback</function>. By doing it this way
|
||||
you have all information for the call in one place and do not
|
||||
|
|
Loading…
Reference in a new issue