---
title: "base_convert should throw a ValueError on characters not valid in number base"
url: https://daily.dev/posts/base-convert-should-throw-a-valueerror-on-characters-not-valid-in-number-base-lkwzegaeg
source_url: https://externals.io/message/131448
type: article
source: "externals.io"
published: 2026-06-22T09:30:11.301Z
updated: 2026-06-22T09:30:26.305Z
tags: ["php"]
reading_time: 1
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# base_convert should throw a ValueError on characters not valid in number base

**[externals.io](https://daily.dev/sources/externals)** · 1 min read · 0 upvotes · 0 comments

## Summary

A proposal to the PHP internals mailing list suggests that base conversion functions (bindec, octdec, hexdec, base_convert) should throw a ValueError when given characters invalid for the specified number base. Previously these were silently ignored; PHP 7.4 added deprecation notices. The proposal targets PHP 8.6 and is part of the Grouped ValueError Conversions RFC.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://externals.io/message/131448>

## Similar posts on daily.dev

- [Should base\_convert raise a notice/warning on precision loss?](https://daily.dev/posts/should-base-convert-raise-a-notice-warning-on-precision-loss--jppfg85li) · externals.io · 0 upvotes · 0 comments
- [Should base\_convert raise a notice/warning on precision loss?](https://daily.dev/posts/should-base-convert-raise-a-notice-warning-on-precision-loss--syso6jhkg) · externals.io · 0 upvotes · 0 comments
- [Should base\_convert raise a notice/warning on precision loss?](https://daily.dev/posts/should-base-convert-raise-a-notice-warning-on-precision-loss--uaacfkfhr) · externals.io · 0 upvotes · 0 comments

---

Tags: [#php](https://daily.dev/tags/php)

[View this post on daily.dev](https://daily.dev/posts/base-convert-should-throw-a-valueerror-on-characters-not-valid-in-number-base-lkwzegaeg)
