Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129738 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id DF39C1A00BC for ; Tue, 6 Jan 2026 02:14:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1767665663; bh=2yIvHPFrCkP9PhbkycGgYAtU9DvtaPqQQelt1VKHGbo=; h=From:Date:Subject:To:From; b=aETq6ELPiUoi/lCFdt0jWrf1OhVD18stlBZin3pIpWcT5+cZT0+rRvRnCyQlmpOmk AWSTEZiwP5fG5T2Mq554rRdKPd56JLo05WNtvi1/SjmNme0sD464Z+rw9cOMdV3B5r gzsLD7xEQW+bmghwhbWR2BNtbPQyXxosYcaVaU8iXGurs/roIdoqQOSgFTzo647Rb4 lEHMVrGYTZdos8S3fw99L7GAd2JeKwmviSWYQ4g17RTpQAkS5WdD+xuwdTk4sG67cr URpWtv/bzxoclVi2yJ89Rfma/+mX6myKYOvasfx/ro2oBdxf9WGoQZZSjszfbn60OS rEypM68ReoD0g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AD93F180003 for ; Tue, 6 Jan 2026 02:14:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,HTML_IMAGE_ONLY_24, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_REMOTE_IMAGE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 6 Jan 2026 02:14:22 +0000 (UTC) Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-3825ae23d95so4399851fa.0 for ; Mon, 05 Jan 2026 18:14:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maphpia.com; s=google; t=1767665655; x=1768270455; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=2yIvHPFrCkP9PhbkycGgYAtU9DvtaPqQQelt1VKHGbo=; b=Z133sLPPjUeoQdvaazbvOk7M4pXtHAjxdoGusLKAYl63jeAJZ8SQRbn5R+vOxjW7S3 0H2ysnYn5Tl9m96ex8T2QGTZJG40xGYy2a0oERwuDuGhl+ay4nw1qicMvZA0wCKhjbua pyydjZAOQ8YFRF9EzyZAnxOBF1nU7omiOxCmEmHrM3oSkjWvvF7tjoJ8VETyCN5Ck7Sv HkHlFHXBE6MIozuArMC8/NZt3liPWX+aI0iV425ptioEAC8hQuqvxzOTJnkgvcrWqyDt 4NgvkOLxaQK62s2bj1mKvWVxeh1A8zW57h/Fn9wtGxzcyM5koy14XsuJBUrswCGX9mq6 0u1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767665655; x=1768270455; h=to:subject:message-id:date:from:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2yIvHPFrCkP9PhbkycGgYAtU9DvtaPqQQelt1VKHGbo=; b=FsLqUknpKYFwFbfU/cqmR8Ryrt2g18aeDAeATF/iksz2xmElTBfGtqvuk3e4zG+DyM r6f7HRNFEiYKZ/kaleuFMV47bgefjaAiMO7rBExzZewOVAvmz9U/FRwOJfcHZ9SyVUIm 8ebwIZoZcboQJp4uBzqCX2wKrQdcfSHp/F43btc6O6Es1a3eP3ds3ZmuFNioGUCO78yw IiN3Z3/A3N2A8g3ikf+rmOv6PT3bnQ19Eu+5vNcVsCLPmLPR1XaGAMlPExnBKJ62hu75 gxHXAYsq8m2mSx9xBOquOEzaBvGHvT7P9y2A25CjQqFAdx9eNw4FJejUEZgfNFcUL5BM QG/Q== X-Gm-Message-State: AOJu0Yy1xzlN/k1GhDDnaPyGjjxxPgwdtMSYqBA3rHkMIOd4tHg9osU4 5MHrtOjvBz85FZxwISa/MF0ESZhug/It1vFGXauhafSVHUSFel6xi3Ab3737SkZSrqa5yUP0ugp tMFbRDGmY1Xy7PmJhx4sERcHG/vzPU51Pv803+awGisSGLHGwVwLswg== X-Gm-Gg: AY/fxX7OCLHnsJiOjEbdb1g/lsimQD05wma4DuUUw22fD7vbe8swWvVPAZvHTdJTXr4 GzqHmsDS0RI8d+mDFZ5lsYN8wbSUIvCz9eZwO1VDxpHn+58bT2ICR6q3MnDx5/N4TK7zVAg9vzC DW/fT2wznmUFIHutcq0LNMyNpy2YU7LBsjWSiUyS1cXsbFDXBVfbY3k4qKJViMJwFi8Eyz/KklE sI5Ct3dY6pRJ/ama+LgU+B6eoPTcF/kPRCedHW4BM9LCkkyxTzfUH0xXmGOuEwQj+BxjnN8AMwf xe4m2wx1xWjXmzei+lKPzui61w== X-Google-Smtp-Source: AGHT+IH13+iaTZpTkBskx/AnkmWU5Wr4999/c7xNJ/HJadsdGKegG0i6P7e94VRoVOFYclQT/jmwRvLgTdgqd4txGLU= X-Received: by 2002:a2e:a54d:0:b0:382:51cc:d26b with SMTP id 38308e7fff4ca-382eaab3965mr3608571fa.21.1767665654605; Mon, 05 Jan 2026 18:14:14 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Mon, 5 Jan 2026 20:14:03 -0600 X-Gm-Features: AQt7F2o-RNfzx5u0i_i_QQely0u4_JCT4HENraen_BHosDBDA1UGNwwTxQO1sXI Message-ID: Subject: [PHP-DEV] [RFC] use-from syntax for namespace use declarations To: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000006cb6e50647aebb55" From: str@maphpia.com (=?UTF-8?B?U3R1YXJkbyAtU3RSLSBSb2Ryw61ndWV6?=) --0000000000006cb6e50647aebb55 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello internals, I am writing to open the discussion for the RFC "use-from syntax for namespace use declarations": https://wiki.php.net/rfc/use-from This proposal introduces an alternative syntax for namespace imports: ```php use Name from Prefix; use {A, B} from Prefix; ``` This form is purely syntactic sugar for the traditional `use Prefix\Name;` syntax. The primary motivation is to improve readability and ergonomic sorting of imports by placing the imported symbol name first (e.g. `use User from App\Models`), similar to import styles in other languages like Python or JavaScript. The implementation introduces `from` as a contextual keyword in `use` declarations, ensuring backward compatibility for existing uses of `from` as method names or identifiers. You can find the proof-of-concept implementation here: https://github.com/php/php-src/pull/20844 I look forward to your thoughts and feedback. Best regards, Stuardo Rodr=C3=ADguez str@maphpia.com -- Stuardo Rodr=C3=ADguez Mercenary Web Developer La Maphpia =F0=9F=8C=8E maphpia.com =E2=9C=89 str@maphpia.com =F0=9F=93=9E +502 3462-7= 169 --0000000000006cb6e50647aebb55 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello internals,

I am writing to open the disc= ussion for the RFC "use-from syntax for namespace use declarations&quo= t;:
https://wiki.php.net/r= fc/use-from

This proposal introduces an alternative syntax for n= amespace imports:

```php
use Name from Prefix;
use {A, B} from= Prefix;
```

This form is purely syntactic sugar for the traditio= nal `use Prefix\Name;` syntax. The primary motivation is to improve readabi= lity and ergonomic sorting of imports by placing the imported symbol name f= irst (e.g. `use User from App\Models`), similar to import styles in other l= anguages like Python or JavaScript.

The implementation introduces `f= rom` as a contextual keyword in `use` declarations, ensuring backward compa= tibility for existing uses of `from` as method names or identifiers.
You can find the proof-of-concept implementation here:
https://github.com/php/php-src/pull/2= 0844

I look forward to your thoughts and feedback.

Best r= egards,
Stuardo Rodr=C3=ADguez
str= @maphpia.com

--
Stuardo Rodr=C3=ADguezMercenary Web DeveloperLa Maphpia=
=F0=9F=8C=8E=C2=A0ma= phpia.com=E2=9C=89=C2=A0str@ma= phpia.com=F0=9F=93=9E +502 3462-7169
--0000000000006cb6e50647aebb55--