[php-src] PR #22365: Throw error for invalid characters for number base
| From: | Sjord | Date: | Fri, 19 Jun 2026 08:58:24 +0000 |
| Subject: | [php-src] PR #22365: Throw error for invalid characters for number base | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36505@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22365
Author: Sjord
This is about the situation where a character is not within the specified number base. E.g. only
0-9, a-f are allowed for hexadecimal, so what should
hexdec('z') do?
In the past, such characters were silently ignored. Since PHP 7.4 a deprecation notice would be
generated. This commit changes that to a ValueError.
Earlier RFC:
https://wiki.php.net/rfc/base_convert_improvements