Re: svn: /phpdoc/en/trunk/ language/types/pseudo-types.xml reference/pcre/functions/preg-replace-callback.xml

From: Date: Thu, 30 Jul 2009 12:02:48 +0000
Subject: Re: svn: /phpdoc/en/trunk/ language/types/pseudo-types.xml reference/pcre/functions/preg-replace-callback.xml
References: 1 2  Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-4565@lists.php.net to get a copy of this message
2009/7/30 Hannes Magnusson <hannes.magnusson@gmail.com>: > On Thu, Jul 30, 2009 at 11:20, Jakub Vrana<vrana@php.net> wrote: > [..] >> Modified: phpdoc/en/trunk/reference/pcre/functions/preg-replace-callback..xml >> =================================================================== >> --- phpdoc/en/trunk/reference/pcre/functions/preg-replace-callback.xml  2009-07-30 >> 08:08:37 UTC (rev 286542) >> +++ phpdoc/en/trunk/reference/pcre/functions/preg-replace-callback.xml  2009-07-30 >> 09:20:16 UTC (rev 286543) >> @@ -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 > > Do we really have to mention this for all functions taking callbacks? > > The examples are obviously good to have, but explicitly mentioning > what the callback type means and the fact you can pass anonymous > functions to it again and again and again..? > > -Hannes > > -- > PHP Documentation Commits Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > If there are any cases where a closure CANNOT be used as a callback, then that would warrant an important note. With the current lack of $this support for callbacks, maybe there is some use in having the link there. So at least when the user gets the error for callback/$this, then the manual will point/suggest the anonymous function documentation. Richard. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" ZOPA : http://uk.zopa.com/member/RQuadling

« previous php.doc.cvs (#4565) next »