php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73464 Casting string "INF" to float broken
Submitted: 2016-11-05 12:40 UTC Modified: 2016-11-05 17:07 UTC
From: sjon at hortensius dot net Assigned: cmb
Status: Not a bug Package: Strings related
PHP Version: 7.1.0RC5 OS:
Private report: No CVE-ID:
 [2016-11-05 12:40 UTC] sjon at hortensius dot net
Description:
------------
RC5 breaks casting of string "INF" to float, see https://3v4l.org/04YG9

Test script:
---------------
var_dump((float)"INF");

Expected result:
----------------
float(INF)


Actual result:
--------------
float(0)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-05 17:07 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2016-11-05 17:07 UTC] cmb@php.net
That is intended behavior caused by fixing bug #73329.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Thu Mar 23 22:01:36 2017 UTC