Re: RFC: Anonymous Classes
| From: | Nicolas Grekas | Date: | Tue, 24 Sep 2013 12:51:36 +0000 |
| Subject: | Re: RFC: Anonymous Classes | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-69315@lists.php.net to get a copy of this message | ||
What about allowing a "use" statement on these methods?
$someFoo = "bar";
$object = new class{
function method() use ($someFoo) { return $someFoo;}
}
$object->method(); // "bar";