Home  >  Article  >  Backend Development  >  Pear's PHP_Compat package_PHP tutorial

Pear's PHP_Compat package_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:36:39875browse

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
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

Package Information: PHP_Compat
http://pear.php.net/package/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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486641.htmlTechArticlePear's PHP_Compat is a more interesting package. It provides some php5 proprietary functions that can also be used under php4. For example, file_put_contents, array_combine, str_split.......... Even in the main page of php4...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn