PMWCompat
Questions answered by this recipe
This addon is obsolete.
I am using PHP 4 and cannot upgrade on my server but I want to use some PHP5 commands. What can I do?
Someone created a recipe with PHP 5 commands, but I cannot upgrade my server.
Description
Emulates PHP 5 commands in PHP4.
Installation
Copy PMWCompat.zipΔ to your cookbook directory and unzip it.
In your config.php enter:
or in your farmconfig.php enter:
$FarmD
/cookbook/PMWCompat/PMWCompat.php");
Notes
You must edit the file PMWCompat/PMWCompat.php and enter the commands that you want to include. By default it includes only file_get_contents() and file_put_contents().
require_once "$PMWCDir/file_get_contents.php";
require_once "$PMWCDir/file_put_contents.php";
All the functions are in directory
Here is a list of all functions available:
- array_change_key_case.php
- array_chunk.php
- array_combine.php
- array_diff_assoc.php
- array_diff_key.php
- array_diff_uassoc.php
- array_diff_ukey.php
- array_intersect_assoc.php
- array_intersect_key.php
- array_intersect_uassoc.php
- array_intersect_ukey.php
- array_key_exists.php
- array_product.php
- array_search.php
- array_udiff.php
- array_udiff_assoc.php
- array_udiff_uassoc.php
- array_uintersect.php
- array_uintersect_assoc.php
- array_uintersect_uassoc.php
- array_walk_recursive.php
- bcinvert.php
- bcpowmod.php
- call_user_func_array.php
- clone.php
- constant.php
- convert_uudecode.php
- convert_uuencode.php
- debug_print_backtrace.php
- file_get_contents.php
- file_put_contents.php
- floatval.php
- fprintf.php
- fputcsv.php
- get_headers.php
- get_include_path.php
- html_entity_decode.php
- htmlspecialchars_decode.php
- http_build_query.php
- ibase_timefmt.php
- idate.php
- image_type_to_mime_type.php
- inet_ntop.php
- inet_pton.php
- ini_get_all.php
- is_a.php
- md5_file.php
- mhash.php
- mime_content_type.php
- ob_clean.php
- ob_flush.php
- ob_get_clean.php
- ob_get_flush.php
- pg_affected_rows.php
- pg_escape_bytea.php
- pg_unescape_bytea.php
- php_strip_whitespace.php
- restore_include_path.php
- scandir.php
- set_include_path.php
- str_ireplace.php
- str_rot13.php
- str_shuffle.php
- str_split.php
- str_word_count.php
- stripos.php
- strpbrk.php
- strripos.php
- substr_compare.php
- time_sleep_until.php
- var_export.php
- version_compare.php
- vprintf.php
- vsprintf.php
Release Notes
- Version 1 - Initial release.
Comments
The real author of the functions is Aidan Lister of http://php.net, and the real license is the PHP license. --Petko May 03, 2007, at 10:48 AM
See Also
Contributors
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.