# missing documentation for use-clause in closures?

- Thread: https://externals.io/message/62007
- Original archive: https://news-web.php.net/php.internals/62007
- Started by Rasmus Schultz on 2012-08-03T15:09:41+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #62007 — Rasmus Schultz — 2012-08-03T15:09:41+00:00

URL: https://externals.io/message/62007#62007

Is this all the documentation there is for the use-clause for
anonymous closures?

http://us2.php.net/manual/en/functions.anonymous.php

For one, it would be nice to have documentation that explains whether
the variables listed in the use-clause are copied/referenced at
declaration-time or at call-time?

---

## #62008 — Peter Cowburn — 2012-08-03T15:21:52+00:00

URL: https://externals.io/message/62007#62008 · In reply to: #62007

> Is this all the documentation there is for the use-clause for
> anonymous closures?
>
> http://us2.php.net/manual/en/functions.anonymous.php
>
> For one, it would be nice to have documentation that explains whether
> the variables listed in the use-clause are copied/referenced at
> declaration-time or at call-time?
>

https://edit.php.net/  -- Go wild. :-)

---

## #62011 — Ferenc Kovacs — 2012-08-03T15:53:23+00:00

URL: https://externals.io/message/62007#62011 · In reply to: #62007

> Is this all the documentation there is for the use-clause for
> anonymous closures?
>
> http://us2.php.net/manual/en/functions.anonymous.php
>
> For one, it would be nice to have documentation that explains whether
> the variables listed in the use-clause are copied/referenced at
> declaration-time or at call-time?
>
> --
> 
> 
>
>
would be nice having more docs on that.
there are the two rfc's:  https://wiki.php.net/rfc/closures  and
https://wiki.php.net/rfc/closures/object-extension  but make sure to test
because AFAIR the rfc is a little bit behind the current implementation.


-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

---

## #62013 — Ferenc Kovacs — 2012-08-03T16:04:58+00:00

URL: https://externals.io/message/62007#62013 · In reply to: #62011

>
>
> 
>
> > […]
> would be nice having more docs on that.
> there are the two rfc's:  https://wiki.php.net/rfc/closures  and
> https://wiki.php.net/rfc/closures/object-extension  but make sure to test
> because AFAIR the rfc is a little bit behind the current implementation.
>
>
>
See also the discussion at
http://www.mail-archive.com/internals@lists.php.net/msg53817.html

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu
