Home >Backend Development >PHP Tutorial >Pear's PHP_Compat package_PHP tutorial
Pear's PHP_Compat is an interesting package. It provides some php5-specific functions that can also be used under php4, such as file_put_contents, array_combine, str_split... so that even in On a php4 host, you can also enjoy the convenience of php5 functions in advance. Usage Package Information: PHP_Compat Author: volcano Published on November 23, 2006 at 7:42 am Copyright information: You can reprint at will. When reprinting, please be sure to indicate the original source and author information of the article and this statement in the form of a hyperlink Permanent link - http://www.ooso.net/index.php/archives/267
PLAIN TEXT
PHP:
require_oncePHP/Compat.php;
// load file_put_contents
PHP_Compat::loadFunction(file_put_contents) ;
// load str_split, array_chunk and file_get_contents
PHP_Compat::loadFunction(array(str_split,array_chunk,file_get_contents));
?>
The above example shows that it can be loaded at once Enter n php5-specific functions
http://pear.php.net/package/PHP_Compat