[php-src] Issue #21521: Namespace function to make variables inside a namespace defenition.
| From: | remco-pc | Date: | Wed, 25 Mar 2026 12:57:19 +0000 |
| Subject: | [php-src] Issue #21521: Namespace function to make variables inside a namespace defenition. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-251844@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/21521
Author: remco-pc
### Description
Well i have a framework which can handle multiple domains/subdomains inside a directory like
/mnt/Domain/<subdomain>.<domain>.<extension>/Controller/Controller.php and inside
that Controller there is a namespace like
namespace Domain/Www_example_com/Controller
Which can be handled by the autoloader.
But here it comes, my framework now has composer packages which can be installed inside a domain.
For example:
app install raxon/issue -frontend.host=... -backend.host=api...
```php
<?php
namespace
Domain\{{php.namespace.host(options('frontend.host'))}}\Application\Issue\Controller;
```
But the installation files then have no IDE support and this is currently done with my own scripting
language.
Is there any reason why a namespace cannot contain a variable part like domain?