php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #17855 version_compare() to force to string, input params
Submitted: 2002-06-19 19:28 UTC Modified: 2002-06-19 19:40 UTC
From: cox at idecnet dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.2.1 OS: Linux RH
Private report: No CVE-ID: None
 [2002-06-19 19:28 UTC] cox at idecnet dot com
# phpcli -r "var_dump(version_compare(0.9, 0.90, 'eq'));"
bool(true)
# phpcli -r "var_dump(version_compare('0.9', '0.90', 'eq'));"
bool(false)

Would be nice if version_compare could force the input params to be strings instead of doing the comparation with int's. Sorry if I dream too much.

-- Tomas V.V.Cox

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-19 19:40 UTC] sniper@php.net
0.9 != 0.90

And the function does require strings..

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 22:01:30 2024 UTC