php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #73681 Incorrect description for PHP 7 and higher
Submitted: 2016-12-08 03:03 UTC Modified: 2016-12-08 13:10 UTC
From: danielklein at airpost dot net Assigned: cmb (profile)
Status: Closed Package: PHP options/info functions
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: danielklein at airpost dot net
New email:
PHP Version: OS:

 

 [2016-12-08 03:03 UTC] danielklein at airpost dot net
Description:
------------
---
From manual page: http://www.php.net/function.version-compare
---

The following code example is incorrect if running on PHP greater than 5:

if (version_compare(PHP_VERSION, '5.0.0', '>=')) {
    echo 'I am using PHP 5, my version: ' . PHP_VERSION . "\n";
}


It should say 'I am using *at least* PHP 5, ...'


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-08 11:43 UTC] cmb@php.net
-Status: Open +Status: Verified -Package: Documentation problem +Package: PHP options/info functions -Assigned To: +Assigned To: cmb
 [2016-12-08 13:09 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=341341
Log: Fix #73681: Incorrect description for PHP 7 and higher
 [2016-12-08 13:10 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2016-12-08 13:10 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=08e998b97b921eff4c35b003203204067b727a0f
Log: Fix #73681: Incorrect description for PHP 7 and higher
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 11:01:35 2025 UTC