PHP4

kenorb - April 24, 2009 - 11:56

PHP4 module contain PHP5 functions which have been rewritten to make it compatible with PHP4.
Of course this module can't provide full support for PHP5, it's only define compatible functions.

*You don't need to install this module, you can install PEAR PHP_Compat instead.*
Try:

pear install PHP_Compat-1.6.0a2

PHP_Compat Page: http://pear.php.net/package/PHP_Compat
If you can't do that, then install it.

Supported Functions

acosh() array_change_key_case() array_chunk() array_combine() array_diff_assoc() array_diff_key() array_diff_uassoc() array_diff_ukey() array_fill() array_intersect_assoc() array_intersect_key() array_intersect_uassoc() array_intersect_ukey() array_key_exists() array_product() array_search() array_slice() array_udiff() array_udiff_assoc() array_udiff_uassoc() array_uintersect() array_uintersect_assoc() array_uintersect_uassoc() array_walk_recursive() asinh() atanh() bcinvert() bcpowmod() call_user_func_array() constant() convert_uudecode() convert_uuencode() cosh() debug_print_backtrace() file_get_contents() file_put_contents() floatval() fprintf() fputcsv() getopt() get_headers() get_include_path() glob() htmlspecialchars() htmlspecialchars_decode() html_entity_decode() http_build_query() ibase_timefmt() idate() image_type_to_mime_type() inet_ntop() inet_pton() ini_get_all() is_a() is_callable() is_scalar() list.txt md5_file() mhash() microtime() mime_content_type() mkdir() ob_clean() ob_flush() ob_get_clean() ob_get_flush() pg_affected_rows() pg_escape_bytea() pg_unescape_bytea() php_ini_loaded_file() php_strip_whitespace() property_exists() range() restore_include_path() scandir() setcookie() setrawcookie() set_include_path() sinh() stripos() strpbrk() strripos() str_ireplace() str_rot13() str_shuffle() str_split() str_word_count() substr_compare() sys_get_temp_dir() tanh() time_sleep_until() var_export() version_compare() vprintf() vsprintf()

Can be used with following modules:
popups_reference #380932: setrawcookie is incompatible with PHP4

Not fully supported

Those function are defined (to prevent WSOD), but they can't be fully rewritten:

function error_get_last()

Compatible functions

Those function are defined using different function names, so you should update your code:

function parse_url_compat($url, $component=NULL) should be used instead of parse_url()

Could help with following modules:
path_redirect #448334: warning: parse_url() expects exactly 1 parameter, 2 given in path_redirect.module on line 341

Note

If you using PHP_Compat, it's including many files per each page refreshment. So please note that you should have some filesystem cache (like APC, etc.) to improve website performance.

Releases

Official releasesDateSizeLinksStatus
6.x-1.02009-Jul-297.32 KBRecommended for 6.xThis is currently the recommended release for 6.x.
Development snapshotsDateSizeLinksStatus
6.x-1.x-dev2009-Jul-307.33 KBDevelopment snapshotDevelopment snapshots are automatically regenerated and their contents can frequently change, so they are not recommended for production use.


 
 

Drupal is a registered trademark of Dries Buytaert.