[PEPr] Comment on PHP::PHP_Compat_Func
| From: | PEPr | Date: | Tue, 27 Apr 2004 19:27:24 +0000 |
| Subject: | [PEPr] Comment on PHP::PHP_Compat_Func | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-28452@lists.php.net to get a copy of this message | ||
Stig Bakken (http://pear.php.net/user/ssb) has commented on the proposal for PHP::PHP_Compat_Func.
Comment:
Just make sure you wrap the function definitions in "if (!function_exists...)", because
some packages already provide file_get_contents() etc.
IMHO, compatibility functions should be one-function-per-file and installed in
$PHP_DIR/_compat/function/function_name.php. Usage would be:
require_once "_compat/function/file_get_contents.php";
or
if (!function_exists("file_get_contents")) {
include_once "_compat/function/file_get_contents.php";
}
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=61
--
Sent by PEPr, the automatic proposal system at http://pear.php.net