PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PHP » PHP_CompatInfo » Bug #6581

Functions missing in func_array.php

Details

Submitted2006-01-25 17:15 UTC
From0x33 at free dot fr
Assignedfarell
StatusClosed
PackagePHP_CompatInfo
PHP Version5.1.2
OSDebian Sarge
Roadmaps(Not assigned)

Comments

[2006-01-25 17:15 UTC] 0x33 at free dot fr

Description:
------------
When doing a PHP_CompatInfo_Cli->run() on the file below, the package does not report any extensions required for this piece of code to run, whereas it should report that the script is using BCMath and PCRE extensions. And, also, the minimum version reported is not truly exact.

The source of the problem is that in data/func_array.php, all the functions with version number 3 are removed (in scripts/updateVersionInfo.php). But this is bad, because, for example, you can compile PHP with --disable-bcmath or --without-pcre-regex (even the latest PHP 5.1 !)

IMHO, PHP_CompatInfo should report that the following piece of code requires extentions BCMath & PCRE to run, and at least PHP 3.0.9 (for preg_match).

Test script:
---------------
<?php

$nb = bcsub(1.234, 5, 4);

if (preg_match('/^-/', $nb)) {
echo 'minus';
}

?>

Expected result:
----------------
+----------+---------+------------+------------------+
| File | Version | Extensions | Constants/Tokens |
+----------+---------+------------+------------------+
| test.php | 3.0.9 | bcmath | |
| | | pcre | |
+----------+---------+------------+------------------+

Actual result:
--------------
+----------+---------+------------+------------------+
| File | Version | Extensions | Constants/Tokens |
+----------+---------+------------+------------------+
| test.php | 4.0.0 | | |
+----------+---------+------------+------------------+