From: Jeff D. <da...@da...> - 2002-02-27 02:16:42
|
Carsten Klapp said: > The INSTALL docs I can change back to: > PhpWiki requires a web server with PHP version 4.0.? or greater and a > database application. I think 4.0.4pl1 was the unspoken standard, and would be fine. As Reini says, it's in quite common use. IIRC, it's the first version of PHP 4 which didn't have big bugs. (BTW, 4.0.4pl1 came after 4.0.4. "pl" stands for "patch level", I think. It's a ("doh!") stupid bug-fix release, I think.) > Whenever this situation arises in the future, should we put the > workaround functions somewhere globally accessible like stdlib? > or start a new library file only containing these functions? (and then > call them if !function_exists('funcname') ?) I think stdlib. As long as it's not too painful to implement a full replacement for a particular function, I think we can just do: if (!function_exists('func_x')) { function func_x () { ... our replacement ... } } Though when the need for such a replacement arises, one should first consider if one can do the job adequately without using the function in question at all. Mostly, I would say, don't sweat it too much. When you use a new function, check the PHP docs (which you probably need to do anyway, since it's a new function); if it says, e.g., "(PHP4 >= 4.0.5)", then consider whether you can do the job some other way (in PHP, as in Perl there are often about a zillion ways to do any particular task), or provide a replacement. If some newer functions slip in unoticed, someone will complain eventually, and we can address the problem then. Also note that (just to keep you on your toes) function semantics often change from PHP release to PHP release. (E.g. "In PHP 4.0.5 and later, every parameter to str_replace() can be an array.") My main point is that we need to decide what version we will support, and stick by it... |