[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    Re: [DOC-CVS] svn: /phpdoc/en/trunk/ language/types/pseudo-types.xml
From:       Richard Quadling <rquadling () googlemail ! com>
Date:       2009-07-30 12:02:48
Message-ID: 10845a340907300502q22a9ca50m67fb42d006caabd9 () mail ! gmail ! com
[Download RAW message or body]

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

-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic