php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69836 is_numeric and binary number
Submitted: 2015-06-15 12:37 UTC Modified: 2015-06-15 13:39 UTC
From: david at grudl dot com Assigned: cmb (profile)
Status: Duplicate Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
41 + 6 = ?
Subscribe to this entry?

 
 [2015-06-15 12:37 UTC] david at grudl dot com
Description:
------------
Documentation states that (http://php.net/manual/en/function.is-numeric.php)

> Hexadecimal (e.g. 0xf4c3b00c), Binary (e.g. 0b10100111001), Octal (e.g. 0777) notation is allowed too but only without sign, decimal and exponential part.

But it is not true for binary and octal numbers, is_numeric('0b10100111001') returns FALSE.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-15 13:39 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2015-06-15 13:39 UTC] cmb@php.net
This is a duplicate of bug #64877. Nonetheless, thanks for the
reminder.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC