Bug #73864 [Opn->Fbk]: '3.' is considered as a numeric string

From: Date: Wed, 04 Jan 2017 21:48:38 +0000
Subject: Bug #73864 [Opn->Fbk]: '3.' is considered as a numeric string
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206308@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73864&edit=1 ID: 73864 Updated by: requinix@php.net Reported by: mumu at seznam dot cz Summary: '3.' is considered as a numeric string -Status: Open +Status: Feedback Type: Bug Package: Unknown/Other Function Operating System: Windows 10 PHP Version: 7.1.0 Block user comment: N Private report: N New Comment: It is a valid number. Why shouldn't it be? Previous Comments: ------------------------------------------------------------------------ [2017-01-04 21:44:17] mumu at seznam dot cz Description: ------------ '3.' is evaluated as a numeric string even it is not a valid number. Test script: --------------- <?php echo '3. ' . (is_numeric('3.') ? 'IS' : 'IS NOT') . ' numeric'; ?> Expected result: ---------------- is_numeric('3.') returns false. Actual result: -------------- is_numeric('3.') returns true. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73864&edit=1

« previous php.bugs (#206308) next »