Home » PHP » PHP_Compat
Provides components to achieve PHP version independence
This package is unmaintained.
Download latest release 1.6.0a3 (archived versions might be outdated)
License: PHP License
Description
PHP_Compat provides drop-in functions and constants for compatibility with newer versions of PHP, environment emulation, and an API to allow for version independent authoring.
Documentation
Maintainers
- Aidan Lister (aidan) — lead, active
- Arpad Ray (arpad) — lead, active
Dependencies
Required
- PHP (>= 4.0.0)
- PEAR Installer (>= 1.4.0b1)
Releases
- 1.6.0a3 (alpha, 2010-10-05)
Release notes
License: PHP License
QA Release
Bug #7402 Missing unit tests hm2k
Bug #15409 Broken unit tests arpad
Bug #15531 getmxrr() support for windows hm2k
Bug #15532 ini_set('register_globals', 'off'); not required hm2k
Bug #15537 IIS REQUEST_URI compatibility hm2k
Bug #15539 PHP_EOL link is incorrect. hm2k
Bug #15540 htmlspecialchars has incorrect "since" arpad
Bug #15684 Add str_getcsv support for 5.1.0 + arpad
Bug #15688 PATHINFO_FILENAME hm2k
Bug #15698 Typo in str_ireplace.php hm2k
Bug #15707 file_get_contents has incomplete support arpad
Bug #16157 Missing argument 5 for setrawcookie() hm2k
Bug #16158 Win Seven Fatal error: Cannot call __clone() method on objects arpad
Bug #16191 fprintf parameters lost arpad
Bug #16462 add json_decode-function that behaves like in PHP5.2 hm2k
Bug #16921 PHP_Compat includes functions that no version of PHP does hm2k
Bug #16922 bad minimum reqirements - getopt hm2k
Bug #16945 Spelling error in long desc saltybeagle - 1.6.0a2 (alpha, 2008-11-24)
- 1.6.0a1 (alpha, 2007-05-08)
Release notes
License: PHP License
Added more components:
* array_fill
* Hyperbolic and inverse hyperbolic math functions
* glob
* is_callable
Added more components with changed parameters:
* array_splice
* microtime
* mkdir
* range
* setcookie
* setrawcookieAdded new Environment module
* register_globals
* magic_quotes_gpc
* magic_quotes_sybase
* register_argc_argv
* register_long_arrays
Changed the way PHP_Compat stores functions.
* Function declaration is prefixed with php_compat_
* Dummy declaration calls php_compat_ function
This allows for redefinition of functions with changed parameters.
Added support for packages which modify the function tables at runtime
* PHP_Compat::loadFunction now tries to rename the old function on load
This further supports redefinition of functions with changed parameters.
* Fix Bug #1956: stripos - not returning false [aidan]
* Fix Bug #3190: [PATCH] md5_file() depends on possibly nonexistent file_get_contents() [aidan]
* Fix Bug #3572: Use of addslashes() adds too much backslashes [aidan]
* Fix Bug #3586: bug in str_word_count.php code [aidan]
* Fix Bug #4605: debug_print_backtrace - Object to string conversion [aidan]
* Fix Bug #4851: var_export severely broken! (new implementation attached) [aidan]
* Fix Bug #6293: array_intersect_key produces incorrect results with more than 2 arguments [arpad]
* Fix Bug #6560: missing 'Function/property_exists.php' when installed with pear [aidan]
* Fix Bug #6687: array_intersect_key() fails due to func_get_args() [arpad]
* Fix Bug #6758: notice errors with debug_print_backtrace and call_user_func_array usage [arpad]
* Fix Bug #6922: Space after php close markup in Function/mime_content_type.php [arpad]
* Fix Bug #7520: cyclic reference cloning causes timeout [aidan]
* Fix Bug #8338: convert_uudecode removes spaces from line ends, causing corruption [aidan]
* Fix Bug #8864: magic quotes gpc emulation missing server vars [arpad]
* Fix Bug #9042: Various uninitialized variables [aidan]
* Fix Bug #9043: Various issues in str_shuffle [aidan]
* Fix Bug #9687: array_*_key function(s) slow [aidan]
* Fix Bug #9983: Function [array_udiff_uassoc()] is incorrectly implemented [arpad]
* Implement Feature #4372: addition of glob() function for php < 4.3.0 [arpad]
* Implement Feature #7139: PHP 5.1.1 Datetime Constants [arpad]
* Implement Feature #7403: str_ireplace too slow [arpad]
* Implement Feature #7414: making var_export() generating correct PHP code with nested objects [arpad]
* Implement Feature #8208: is_callable missing in php 4.0.4, 4.0.5 [arpad]
* Implement Feature #9187: Adding httponly to setcookie/setrawcookie (new in php 5.2) [aidan]
* Implement Feature #9659: The userdata parameter isn't correctly send to the recursive call [arpad]
* Implement Feature #10177: add most recent UPLOAD ERR constants [arpad] - 1.5.0 (stable, 2005-12-14)
Release notes
License: PHP License
Added more components:
* is_scalar
* property_exists
* inet_pton
* inet_ntop
* bcinvert
* bcpowmod
* mime_content_type
* time_sleep_until
* array_product
* idate
Bug fixes:
* Fixed #4783 (PATH_SEPARATOR)
* Fixed #4788 (version_compare)
* Fixed #4851 (var_export)
* Fixed #5049 (strripos)
* Fixed #5078 (str_shuffle)
* Fixed #5691 (fputcsv)
* Fixed #5469 (md5_file)
* Fixed #6082 (file_put_contents)
RC bug fixes:
* Fixed #6184 (idate) - 1.5.0RC1 (beta, 2005-12-05)
- 1.4.0 (stable, 2005-05-10)
- 1.3.1 (stable, 2004-11-23)
- 1.3.0 (stable, 2004-11-22)
- 1.2.0 (stable, 2004-09-12)
- 1.1.0 (stable, 2004-06-25)
- 1.0.0 (stable, 2004-06-12)
- 1.0.0RC2 (beta, 2004-06-01)
- 1.0.0RC1 (beta, 2004-05-29)
- 0.2 (beta, 2004-05-27)
- 0.1 (beta, 2004-05-19)
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #1647 | Bogus | Bug | 2004-06-15 | var_export leaves comma at end of array | |
| #1956 | Closed | Bug | 2004-07-22 | stripos - not returning false | |
| #2266 | Closed | Bug | 2004-09-01 | image_type_to_mime_type : bad redeclaration of constants | |
| #2769 | Closed | Req | 2004-11-16 | Object cloning | |
| #2793 | Closed | Bug | 2004-11-19 | str_split is too strict on arguments | |
| #2794 | Closed | Bug | 2004-11-19 | version_compare doesn't handle the 'p' suffix and behaves differently | |
| #2795 | Closed | Bug | 2004-11-19 | str_ireplace fails on arrays that don't have indexes from 0 to count(array)-1 | |
| #3103 | Closed | Req | 2005-01-05 | loadVersion show Failed opening required 'Compat/Components.php' in php 4.0.6 | |
| #3155 | Closed | Req | 2005-01-10 | [PATCH] pg_(un)escape_bytea() | |
| #3190 | Closed | Bug | 2005-01-13 | [PATCH] md5_file() depends on possibly nonexistent file_get_contents() | |
| #3497 | Closed | Req | 2005-02-16 | Need PHP5 function get_headers | |
| #3499 | Closed | Req | 2005-02-16 | the function ibase_timefmt was removed in PHP 5 | |
| #3572 | Closed | Bug | 2005-02-24 | Use of addslashes() adds too much backslashes | |
| #3586 | Closed | Bug | 2005-02-24 | bug in str_word_count.php code | |
| #3649 | Closed | Bug | 2005-02-28 | clone() fails | |
| #3711 | Closed | Req | 2005-03-05 | adds function debug_print_backtrace | |
| #3757 | Closed | Bug | 2005-03-09 | missing array_uintersect.php | |
| #4273 | Closed | Req | 2005-05-03 | [PATCH] pg_affected_rows() function | |
| #4372 | Closed | Req | 2005-05-17 | addition of glob() function for php < 4.3.0 | |
| #4385 | Closed | Bug | 2005-05-18 | spelling mistake, minor errors in file_put_contents.php | |
| #4444 | Closed | Req | 2005-05-26 | mkdir with recursive boolean | |
| #4466 | Closed | Bug | 2005-05-29 | str_split() dont work with big split_lenght parameter | |
| #4480 | Closed | Bug | 2005-05-30 | strripos doesn't return false | |
| #4605 | Closed | Bug | 2005-06-16 | debug_print_backtrace - Object to string conversion | |
| #4691 | Closed | Req | 2005-06-27 | [PATCH] mime_content_type() implementation | |
| #4783 | Closed | Bug | 2005-07-11 | PATH_SEPARATOR version wrong | |
| #4788 | Closed | Bug | 2005-07-11 | syntax error in version_compare + new: implementation of is_scalar!!! | |
| #4830 | Bogus | Req | 2005-07-13 | combine_array that you can use in php4.. | |
| #4851 | Closed | Bug | 2005-07-18 | var_export severely broken! (new implementation attached) | |
| #4857 | Closed | Req | 2005-07-19 | Add property_exists | |
| #5049 | Closed | Bug | 2005-08-09 | function strripos does not report (int)0 | |
| #5078 | Closed | Bug | 2005-08-12 | [patch] Current implementation of str_shuffle sux. | |
| #5104 | Closed | Bug | 2005-08-16 | debug_print_backtrace requires PHP 4.3.0 (and not 4.0.0) | |
| #5106 | Closed | Req | 2005-08-16 | inet_ntop function | |
| #5425 | Closed | Req | 2005-09-15 | array_slice missing | |
| #5469 | Closed | Bug | 2005-09-21 | md5_file just display the file contents :) | |
| #5691 | Closed | Bug | 2005-10-14 | fputcsv uses wrong variable in is_resource() | |
| #6082 | Closed | Req | 2005-11-26 | [patch] file_put_contents with locking support | |
| #6184 | Closed | Bug | 2005-12-07 | new line at the end on idate function causing trouble... | |
| #6293 | Closed | Bug | 2005-12-19 | array_intersect_key produces incorrect results with more than 2 arguments | |
| #6558 | No Feedback | Bug | 2006-01-23 | var_export | |
| #6560 | Closed | Bug | 2006-01-23 | missing 'Function/property_exists.php' when installed with $ pear install PHP_C | |
| #6687 | Closed | Bug | CVS | 2006-02-03 | array_intersect_key() fails due to func_get_args() |
| #6758 | Closed | Bug | 1.5.0 | 2006-02-12 | notice errors with debug_print_backtrace and call_user_func_array usage |
| #6922 | Closed | Bug | 1.5.0 | 2006-02-24 | Space after php close markup in Function/mime_content_type.php |
| #6923 | Bogus | Bug | 1.5.0 | 2006-02-24 | Space after php close markup in Function/mime_content_type.php |
| #7139 | Closed | Req | 1.5.0 | 2006-03-17 | PHP 5.1.1 Datetime Constants |
| #7402 | Closed | Req | 1.5.0 | 2006-04-15 | Missing unit tests |
| #7403 | Closed | Req | 1.5.0 | 2006-04-15 | str_ireplace too slow |
| #7414 | Closed | Req | 1.5.0 | 2006-04-17 | making var_export() generating correct PHP code with nested objects |
| #7519 | Wont fix | Bug | 1.5.0 | 2006-04-28 | clone does not return reference |
| #7520 | Closed | Bug | 1.5.0 | 2006-04-28 | cyclic reference cloning causes timeout |
| #8208 | Closed | Req | 1.5.0 | 2006-07-13 | is_callable missing in php 4.0.4, 4.0.5 |
| #8338 | Closed | Bug | 1.5.0 | 2006-08-01 | convert_uudecode removes spaces from line ends, causing corruption |
| #8864 | Closed | Bug | 1.5.0 | 2006-10-05 | magic quotes gpc emulation missing server vars |
| #9042 | Closed | Bug | 1.5.0 | 2006-10-15 | Various uninitialized variables |
| #9043 | Closed | Bug | 1.5.0 | 2006-10-15 | Various issues in str_shuffle |
| #9187 | Closed | Req | CVS | 2006-10-27 | Adding httponly to setcookie/setrawcookie (new in php 5.2) |
| #9659 | Closed | Req | 1.5.0 | 2006-12-19 | The userdata parameter isn't correctly send to the recursive call |
| #9687 | Closed | Bug | 1.5.0 | 2006-12-23 | array_*_key function(s) slow |
| #9983 | Closed | Bug | 1.5.0 | 2007-01-30 | Function [array_udiff_uassoc()] is incorrectly implemented |
| #10177 | Closed | Req | 1.5.0 | 2007-02-24 | add most recent UPLOAD ERR constants |
| #10734 | Closed | Bug | 1.5.0 | 2007-04-15 | Magic Quotes Compatability |
| #11205 | Closed | Req | 1.5.0 | 2007-06-01 | register globals SERVER not SESSION |
| #11206 | Closed | Bug | 1.6.0a1 | 2007-06-01 | clone() bug |
| #11631 | Closed | Bug | 1.6.0a1 | 2007-07-18 | Missing '}' in loadFunction() |
| #12158 | Closed | Bug | 1.6.0a1 | 2007-10-01 | wrong function name |
| #12227 | Closed | Req | CVS | 2007-10-11 | sys_get_temp_dir missing |
| #12301 | Closed | Bug | 1.6.0a1 | 2007-10-22 | Compat calls php 5 function |
| #13018 | Closed | Bug | 1.6.0a1 | 2008-01-31 | Curly bracket missing |
| #13165 | Closed | Bug | 1.6.0a1 | 2008-02-21 | array_fill() not matching output from V5.3.0-dev. |
| #13400 | Closed | Req | CVS | 2008-03-15 | php_ini_loaded_file() |
| #13802 | Wont fix | Req | 1.5.0 | 2008-04-29 | Add is_executable() for Windows |
| #14138 | Closed | Bug | 1.6.0a1 | 2008-06-13 | htmlspecialchars_decode() converts irreversibly |
| #14687 | Closed | Req | 1.6.0a1 | 2008-09-22 | htmlspecialchars missing 4th parameter |
| #14824 | Closed | Bug | CVS | 2008-10-18 | Invalid sections formats in test file(s) (unit tests) |
| #14891 | Closed | Bug | CVS | 2008-10-26 | Parse error: syntax error, unexpected '}' in /home/clockwerx/pear/PHP_Compat/Co |
| #15119 | Closed | Bug | 1.6.0a1 | 2008-11-21 | Patch and tests for getopt() |
| #15139 | Verified | Req | 1.6.0a2 | 2008-11-24 | PHP_Compat does not comform to PEAR CS |
| #15409 | Closed | Bug | CVS | 2008-12-27 | Broken unit tests |
| #15531 | Closed | Req | 1.6.0a2 | 2009-01-07 | getmxrr() support for windows |
| #15532 | Closed | Bug | 1.6.0a2 | 2009-01-07 | ini_set('register_globals', 'off'); not required |
| #15537 | Closed | Req | 1.6.0a2 | 2009-01-07 | IIS REQUEST_URI compatibility |
| #15539 | Closed | Doc | 1.6.0a2 | 2009-01-07 | PHP_EOL link is incorrect. |
| #15540 | Closed | Doc | 1.6.0a2 | 2009-01-07 | htmlspecialchars has incorrect "since" |
| #15684 | Closed | Req | 1.6.0a2 | 2009-01-19 | Add str_getcsv support for 5.1.0 + |
| #15688 | Closed | Req | 1.6.0a2 | 2009-01-20 | PATHINFO_FILENAME |
| #15698 | Closed | Bug | 1.6.0a2 | 2009-01-20 | Typo in str_ireplace.php |
| #15707 | Closed | Req | CVS | 2009-01-21 | file_get_contents has incomplete support |
| #16157 | Closed | Bug | 1.6.0a2 | 2009-04-29 | Missing argument 5 for setrawcookie() |
| #16158 | Closed | Bug | 1.6.0a2 | 2009-04-29 | Fatal error: Cannot call __clone() method on objects |
| #16190 | Bogus | Req | 1.6.0a2 | 2009-05-06 | Missing EndTags (or trailling spaces) |
| #16191 | Closed | Bug | 1.6.0a2 | 2009-05-06 | fprintf parameters lost |
| #16262 | Wont fix | Req | 1.6.0a2 | 2009-05-26 | Filenaming issues |
| #16462 | Closed | Req | 1.5.0 | 2009-07-22 | add json_decode-function that behaves like in PHP5.2 |
| #16521 | Open | Req | 1.6.0a2 | 2009-08-14 | Support for hash_hmac() function |
| #16769 | Bogus | Req | 1.6.0a2 | 2009-11-06 | Replacements for deprecated POSIX functions |
| #16921 | Closed | Bug | CVS | 2009-12-17 | PHP_Compat includes functions that no version of PHP does |
| #16922 | Closed | Bug | CVS | 2009-12-17 | bad minimum reqirements - getopt |
| #16945 | Closed | Doc | Unknown | 2009-12-26 | Spelling error in long desc |
| #17072 | Wont fix | Bug | CVS | 2010-02-06 | bc math warning's in bcpowmod not emulated |
| #18180 | Closed | Bug | 1.6.0a3 | 2011-01-07 | Typo in Conection |
| #18181 | Feedback | Bug | 1.6.0a3 | 2011-01-07 | HTTP recursion broken in file_get_contents |
| #19822 | Open | Bug | 1.6.0a3 | 2013-02-15 | Class file PHP_Compat missing from package |
| #20011 | Open | Req | 1.6.0a3 | 2013-07-17 | hex2bin missing |
| #20300 | Open | Req | 1.6.0a3 | 2014-06-17 | add stream_resolve_include_path |