Bug #72839 [Opn->Nab]: is_numeric returns false for hex strings

From: Date: Mon, 15 Aug 2016 08:46:59 +0000
Subject: Bug #72839 [Opn->Nab]: is_numeric returns false for hex strings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203290@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72839&edit=1 ID: 72839 Updated by: requinix@php.net Reported by: Alexander dot Blum at gmail dot com Summary: is_numeric returns false for hex strings -Status: Open +Status: Not a bug Type: Bug Package: Unknown/Other Function Operating System: Ubuntu 16.04 PHP Version: 7.1Git-2016-08-15 (Git) Block user comment: N Private report: N New Comment: That's right. http://php.net/manual/en/migration70.incompatible.php#migration70.incompatible.strings.hex https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings Previous Comments: ------------------------------------------------------------------------ [2016-08-15 08:32:54] Alexander dot Blum at gmail dot com Description: ------------ With PHP7 is_numeric reports false when passing hexadecimal strings, it worked fine in PHP5 Test script: --------------- var_dump (is_numeric ("0x111")) Expected result: ---------------- bool(true) Actual result: -------------- bool(false) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72839&edit=1

« previous php.bugs (#203290) next »