Re: [RFC][Discussion] use construct (Block Scoping)
| From: | Bruce Weirdan | Date: | Tue, 04 Nov 2025 06:08:49 +0000 |
| Subject: | Re: [RFC][Discussion] use construct (Block Scoping) | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-129062@lists.php.net to get a copy of this message | ||
What would happen to the variables introduced in the statements
block, rather than in
use()? Will they still be available outside of the
block?
```php
use () {
$number = 42;
}
var_dump($number); // what happens here?
```
Also, is an empty list of vars in use (as in the example above) allowed?
--
Best regards,
Bruce Weirdan mailto:
weirdan@gmail.com