Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129574 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 0FD171A00BC for ; Tue, 9 Dec 2025 13:59:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1765288763; bh=nOQ1mhzKUmgxUdAea4mZZXcUiox1VK8jO4H//zoAtf0=; h=From:Date:Subject:To:From; b=cg7oF55Dzwvmp9d1taoro0KyLVoSlMOmnZHhReSymfYxYn0FtOOFViL33S0XK2Snn eI4asr0933iVkRfPK3X4nzimaaWKg6esqauzHSiONLHH9Sp1GhpivmLo+EcEIDCZ6r V7WfL7gHLD/9PBqwvy0GvL0YNXx+rn5YvifHkbKAc24NrhANlY+cmEnkzfwka4/a1D MBrrm+ty4xHrChCcvax1yRnybh10tEbwgDNxDlSbV6DxsjR3iTiWbIBpxX2rYuUv0C oqS2sa6E6RlyryQypYBRZ/o9z4z3hnAAbaED4CBTzmDjj4Gka98vGXy+bQrjjKj4MR E4YruRjVoZZQA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id ABD06180050 for ; Tue, 9 Dec 2025 13:59: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=0.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,HK_RANDOM_ENVFROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f194.google.com (mail-yw1-f194.google.com [209.85.128.194]) (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, 9 Dec 2025 13:59:22 +0000 (UTC) Received: by mail-yw1-f194.google.com with SMTP id 00721157ae682-78c5b5c1eccso13360047b3.1 for ; Tue, 09 Dec 2025 05:59:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hichemtab-tech-me.20230601.gappssmtp.com; s=20230601; t=1765288756; x=1765893556; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=nOQ1mhzKUmgxUdAea4mZZXcUiox1VK8jO4H//zoAtf0=; b=J3MustMWDE45fTuDQG4cCjr4H+bean31SbKIhpi5kSUMU0RQI73Rbzl0bbmAQOLhAF gLiqw/x8ZcRe/8Vm/EnRklyMp2tpc2JPr0DJTYcl+jFSW/SFOwu6mKjoT4JAL0dHCW3/ MP7H4jpkIcsXoEyCo4r/mPSQhtemCbvDgy2eidmubOPL+7SC31SKZa0D7X9l1yVcQOCz obNE2osvIAy8ZgHjdoRla6Qpc2Lj0Imev7LCJlRsI5ruFu+Vdguks0WETtz71aiiE6Lw UEXGK4XKLo24ie8l/rjRwzhzC8HelVo9lQNQNzpwr2rVlDpTCXI0CJz2iTNaY6GSmmIy yzuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765288756; x=1765893556; 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=nOQ1mhzKUmgxUdAea4mZZXcUiox1VK8jO4H//zoAtf0=; b=CD5gg6/xmXi7L1xA3PJUD/mgxxgaJJ1v4Amur/uCnkybgr5862lV55JU/O3QCIGCUf ukDBQMmH2sXx+41VJzcyLZiKc2ZcNhM23z1tWA/WXmCoxRfNEMGRvubduviJjhHX4jmV FdQaAgG4pWcBMhmrpShW91/7THvduFNDNhYRzAR//HnQZFm5Q+zOiu/LvTl1wxnI521c PHrLsEyDdtWJxT+e4SX5o0MXIflueux3edkAmhDkc8TznlBveNdLEq3/Oi2Wr2/ZIZyt n5CyzUFzZ9s/a/idgsFw5BgQ8DvW5Em+MBN7FqvaE9lKzoQOIuRQCWGwIg+wbggyegJ5 3Oxg== X-Gm-Message-State: AOJu0YwutzR7mly9lBgwl8p0osObj76ms3MSRSdviEu21+IkDRSYsdD+ j1SFdKUQwvto8z0+teDGSqqpF8WUKx4aj20h5atX66Ytd5w2xtRY57DTLA804DmHemRuQ2VXYSx 6DAxqrtDs9SoOAFdVLw+XU8lrPoBJ0m14u6juMuFSxzu86F2RoYWpRVwugQfyfjYAvGrj11SeZa CJM6a7a9IqCMgGIAagcSl6JLcdpZVX/Qi/L3dbg8TYAgr8Xfyfr4Q= X-Gm-Gg: AY/fxX4kcyS0BT9bySliVSQS85atNzvT+WEr4QiTOEi6xjj6WRm0vR/Ztmi727Q/A0R SAh+O8xDyo8TDmftcwOirSEOWzJn8TE9HFsul2rvlzHR59RtW20Zimz3kdtFyF0+BK8PhDpOnmv Gf6EPGXcC0RY2iomSZZXg3CqgDK41qrLC1i6ZO148RfjAFOZcZoljAeZLTGcjK7GIqfi+bWso5y Lp1CC/wZLm1Sn+1mlFhth5/YivqrzrrPQTaS970mQxSecnvZeWMswSXuqIJeFmW0ifsYrUYRX6G bQ== X-Google-Smtp-Source: AGHT+IFxKNL09GEUL8pNdZS3M0WCZxDSj09I0JOrrIMKcxcNwb2VlKuhucn6954+cOy3N9BUoptBxFzapHsAXTmMMfw= X-Received: by 2002:a05:690e:b8b:b0:640:db57:8d93 with SMTP id 956f58d0204a3-644678f0257mr1191050d50.15.1765288756364; Tue, 09 Dec 2025 05:59:16 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Tue, 9 Dec 2025 14:59:03 +0100 X-Gm-Features: AQt7F2qmlQphUo25c4ilkz7ue5FPh4WiIZcTS6LVNGAD2p_HIpRWiKrYTPGcMys Message-ID: Subject: [PHP-DEV] Proposal discussion: distinguishing "never assigned" vs "assigned null" To: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000003fd65106458551f3" From: subs@hichemtab-tech.me (Hichem Taboukouyout) --0000000000003fd65106458551f3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Internals of PHP, I=E2=80=99d like to get feedback on a potential language feature before con= sidering whether it deserves an RFC. Currently, PHP does not provide a general way to distinguish between: - a variable or property that has never been assigned, and - one that was explicitly assigned the value null. isset() treats both cases identically, property_exists() only reflects declarations, and ReflectionProperty::isInitialized() works only for typed properties and does not help differentiate explicit null from absence in the broader sense. There are workarounds involving reflection and string-based variable/property names, but these approaches rely on dynamic access, which is not ideal for developer experience, particularly regarding static analysis, IDE autocompletion, and refactoring safety. I=E2=80=99m interested in hearing whether there is openness to exploring a = built-in mechanism that can reliably distinguish these states at the language level. At this point I=E2=80=99m only seeking initial feedback to understand wheth= er this aligns with PHP=E2=80=99s direction, and whether it would be worth developi= ng into a formal RFC. related issue: https://github.com/php/php-src/issues/20663 Thank you for your time. -- Hichem Taboukouyout. ------------------------------ Hichem Taboukouyout Full-stack Developer & Engineer in Industrial and Tertiary Systems (GSIT) =F0=9F=8C=90 hichemtab-tech.me =F0=9F=92=BB github.com/HichemTab-tech =E2=9C=89=EF=B8=8F hichem.taboukouyout@hichemtab-tech.me --=20 =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80 Hichem Taboukouyout Full-stack Developer &=20 Engineer in Industrial and Tertiary Systems (GSIT) =F0=9F=93=A7=20 hichem.taboukouyout@hichemtab-tech.me=20 =F0=9F=8C=90 hichemtab-tech.me=20 LinkedIn:=20 https://dz.linkedin.com/in/hichem-taboukouyout=20 GitHub:=20 github.com/HichemTab-tech --0000000000003fd65106458551f3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Internals of PHP,

I=E2=80=99= d like to get feedback on a potential language feature before considering w= hether it deserves an RFC.

Currently, PHP does not provide a general= way to distinguish between:
- a variable or property that has never bee= n assigned, and
- one that was explicitly assigned the value null.
isset() treats both cases identically, property_exists() only reflects de= clarations, and ReflectionProperty::isInitialized() works only for typed pr= operties and does not help differentiate explicit null from absence in the = broader sense.

There are workarounds involving reflection and string= -based variable/property names, but these approaches rely on dynamic access= , which is not ideal for developer experience, particularly regarding stati= c analysis, IDE autocompletion, and refactoring safety.

I=E2=80=99m = interested in hearing whether there is openness to exploring a built-in mec= hanism that can reliably distinguish these states at the language level.
At this point I=E2=80=99m only seeking initial feedback to understand = whether this aligns with PHP=E2=80=99s direction, and whether it would be w= orth developing into a formal RFC.

related issue:=C2=A0<= a href=3D"https://github.com/php/php-src/issues/20663" target=3D"_blank">ht= tps://github.com/php/php-src/issues/20663

Thank you for your tim= e.

-- Hichem= Taboukouyout.


Hichem = Taboukouyout

Full-stack Developer & Engineer in Industria= l and Tertiary Systems (GSIT)


=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80
Hichem Taboukouyout
Full-stack D= eveloper & Engineer in Industrial and Tertiary Systems (GSIT)

= =F0=9F=93=A7 hichem.taboukouyout@hichemtab-tech.me
=F0=9F=8C=90= hichemtab-tech.me
LinkedIn:
https://dz.linkedin.com/in/hichem-taboukouyoutGitHub: gi= thub.com/HichemTab-tech

--0000000000003fd65106458551f3--