# Request for RFC Karma: "use-from syntax for namespace use declarations"

- Thread: https://externals.io/message/129724
- Original archive: https://news-web.php.net/php.internals/129724
- Started by str@maphpia.com on 2025-12-30T16:25:24+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #129724 — str@maphpia.com — 2025-12-30T16:25:24+00:00

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

Hello internals,

My name is Stuardo Rodríguez, and I would like to request RFC karma to
publish an RFC on the PHP wiki.

I am a professional PHP developer with over 15 years of experience building
web applications. You can find more about my background here:
- LinkedIn: https://www.linkedin.com/in/stuardo

I have prepared an RFC titled "use-from syntax for namespace use
declarations" which proposes an alternative `use` syntax that improves
readability by placing imported symbols first, followed by a namespace
prefix introduced by `from`.

Example:
```php
use ClassA from Vendor\Package;
use {ClassB, ClassC as C} from Vendor\Package;
```

This is syntax sugar equivalent to existing imports:
```php
use Vendor\Package\ClassA;
use Vendor\Package\{ClassB, ClassC as C};
```

I have already implemented the necessary changes to the Zend Engine (lexer,
parser, tokenizer exposure) along with comprehensive test coverage. The
implementation:
- Introduces T_FROM token
- Supports single imports, grouped imports, and function/const imports
- Treats `from` as a soft keyword to preserve backward compatibility
(function from() remains valid)
- Includes 7 new test cases in Zend/tests/ plus tokenizer test

I would appreciate receiving wiki karma to create and publish this RFC for
community discussion. My wiki account username is: "str"\

Thank you for your consideration.

Best regards,
Stuardo Rodriguez

--
Stuardo Rodríguez Mercenary Web Developer La Maphpia
🌎 maphpia.com ✉ str@maphpia.com 📞 +502 3462-7169

---

## #129736 — str@maphpia.com — 2026-01-05T23:18:23+00:00

URL: https://externals.io/message/129724#129736 · In reply to: #129724

Just a friendly reminder about my karma to post an RF in the PHP wiki.

Again, my user is "str".

Thank you very much

--
Stuardo Rodríguez Mercenary Web Developer La Maphpia
🌎 maphpia.com ✉ str@maphpia.com 📞 +502 3462-7169


On Tue, Dec 30, 2025 at 10:25 AM Stuardo -StR- Rodríguez <str@maphpia.com>
wrote:

> Hello internals,
>
> My name is Stuardo Rodríguez, and I would like to request RFC karma to
> publish an RFC on the PHP wiki.
>
> I am a professional PHP developer with over 15 years of experience
> building web applications. You can find more about my background here:
> - LinkedIn: https://www.linkedin.com/in/stuardo
>
> I have prepared an RFC titled "use-from syntax for namespace use
> declarations" which proposes an alternative `use` syntax that improves
> readability by placing imported symbols first, followed by a namespace
> prefix introduced by `from`.
>
> Example:
> ```php
> use ClassA from Vendor\Package;
> use {ClassB, ClassC as C} from Vendor\Package;
> ```
>
> This is syntax sugar equivalent to existing imports:
> ```php
> use Vendor\Package\ClassA;
> use Vendor\Package\{ClassB, ClassC as C};
> ```
>
> I have already implemented the necessary changes to the Zend Engine
> (lexer, parser, tokenizer exposure) along with comprehensive test coverage.
> The implementation:
> - Introduces T_FROM token
> - Supports single imports, grouped imports, and function/const imports
> - Treats `from` as a soft keyword to preserve backward compatibility
> (function from() remains valid)
> - Includes 7 new test cases in Zend/tests/ plus tokenizer test
>
> I would appreciate receiving wiki karma to create and publish this RFC for
> community discussion. My wiki account username is: "str"\
>
> Thank you for your consideration.
>
> Best regards,
> Stuardo Rodriguez
>
> --
> Stuardo Rodríguez Mercenary Web Developer La Maphpia
> 🌎 maphpia.com ✉ str@maphpia.com 📞 +502 3462-7169

---

## #129737 — Ilija Tovilo — 2026-01-05T23:26:23+00:00

URL: https://externals.io/message/129724#129737 · In reply to: #129724

Hi Stuardo

Sorry for the late reply.


>
> My name is Stuardo Rodríguez, and I would like to request RFC karma to publish an RFC on the PHP wiki.

RFC karma was granted. Good luck!

> I have prepared an RFC titled "use-from syntax for namespace use declarations" which proposes an alternative `use` syntax that improves readability by placing imported symbols first, followed by a namespace prefix introduced by `from`.
>
> Example:
> ```php
> use ClassA from Vendor\Package;
> use {ClassB, ClassC as C} from Vendor\Package;
> ```
>
> This is syntax sugar equivalent to existing imports:
> ```php
> use Vendor\Package\ClassA;
> use Vendor\Package\{ClassB, ClassC as C};
> ```

I think such a proposal will have a very hard time passing. The
existing syntax is obviously well established as it has existed for
almost two decades. The alternative syntax doesn't immediately seem
better, other than being different (and probably closer to JS).

You'd need to make a strong case about why this new syntax is
necessary (though I don't personally believe there is one).

Regards,
Ilija

---

## #129739 — Ben Ramsey — 2026-01-06T04:20:40+00:00

URL: https://externals.io/message/129724#129739 · In reply to: #129737

> Hi Stuardo
>
> Sorry for the late reply.
>
> On Tue, Dec 30, 2025 at 5:25 PM Stuardo -StR- Rodríguez <str@maphpia.com>
> wrote:
> > […]
> publish an RFC on the PHP wiki.
>
> RFC karma was granted. Good luck!
>
> > […]
> declarations" which proposes an alternative `use` syntax that improves
> readability by placing imported symbols first, followed by a namespace
> prefix introduced by `from`.
> > […]
>
> I think such a proposal will have a very hard time passing. The
> existing syntax is obviously well established as it has existed for
> almost two decades. The alternative syntax doesn't immediately seem
> better, other than being different (and probably closer to JS).
>
> You'd need to make a strong case about why this new syntax is
> necessary (though I don't personally believe there is one).
>
> Regards,
> Ilija



Another thing to think about is that PHP doesn’t have the concept of
modules, and the `use` statements aren’t importing anything. They are
essentially declaring aliases.

In working with other programmers new to PHP, this has been a major point
of confusion, since `use` doesn’t behave like importing in JavaScript or
Python, for example. I think this new syntax will  lead to further
confusion because it makes namespaces seem even more like modules.

Cheers,
Ben
