# [RFC] Grouped ValueError Conversions for PHP 8.6 (mkdir example)

- Thread: https://staging.externals.io/message/130090
- Original archive: https://news-web.php.net/php.internals/130090
- Started by Muhammed Arshid KV on 2026-02-18T19:32:15+00:00
- Messages: 3
- RFC: Grouped ValueError Conversions (Inactive) — https://staging.externals.io/rfc/php86_valueerror_conversions.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://staging.externals.io/search.md?q={query} · RFCs at https://staging.externals.io/rfc.md · JSON API at https://staging.externals.io/api · documentation at https://staging.externals.io/llms.txt

---

## #130090 — Muhammed Arshid KV — 2026-02-18T19:32:15+00:00

URL: https://staging.externals.io/message/130090#130090

Hello internals,

Following maintainer feedback, I’ve created an RFC to group multiple
warning → ValueError conversions for PHP 8.6 instead of proposing many
small RFCs.

The initial example includes `mkdir()` where invalid permission values
(outside 0..07777) would throw ValueError instead of emitting a warning and
returning false.

RFC draft:
https://wiki.php.net/rfc/php86_valueerror_conversions

Initial implementation PR:
https://github.com/php/php-src/pull/21152

Feedback is welcome.

Thanks,
Muhammed Arshid KV

---

## #130091 — Christian Schneider — 2026-02-18T21:21:48+00:00

URL: https://staging.externals.io/message/130090#130091 · In reply to: #130090

Am 18.02.2026 um 20:32 schrieb Muhammed Arshid KV <arshidkv12@gmail.com>:
> Following maintainer feedback, I’ve created an RFC to group multiple warning → ValueError conversions for PHP 8.6 instead of proposing many small RFCs.
> The initial example includes `mkdir()` where invalid permission values (outside 0..07777) would throw ValueError instead of emitting a warning and returning false.

When converting something which has currently silently ignored (part of its) parameters to a ValueError Exception, you should add an `E_WARNING` phase to give developers a time window to fix their code.

Example:
	mkdir("foo", 070555));	# Currently does the same thing as 0555

The `E_WARNING` phase enables developers to catch writing 555 instead of 0555, but it allows fixing the code without being a blocker for upgrading to PHP 8.6.

Regards,
- Chris

---

## #130093 — Jakub Zelenka — 2026-02-18T23:50:46+00:00

URL: https://staging.externals.io/message/130090#130093 · In reply to: #130090

Hi,

On Wed, Feb 18, 2026 at 8:39 PM Muhammed Arshid KV <arshidkv12@gmail.com>
wrote:

> Hello internals,
>
> Following maintainer feedback, I’ve created an RFC to group multiple
> warning → ValueError conversions for PHP 8.6 instead of proposing many
> small RFCs.
>
> The initial example includes `mkdir()` where invalid permission values
> (outside 0..07777) would throw ValueError instead of emitting a warning
> and returning false.
>
> RFC draft:
> https://wiki.php.net/rfc/php86_valueerror_conversions
>

Please check the deprecation RFC out:
https://wiki.php.net/rfc/deprecations_php_8_6 . It should be done in a
similar way with section for each different case. There should be then
multiple votes.

Cheers

Jakub
