Re: [ANNOUNCEMENT] PHP_Compat-1.0.0 (stable) Released.

From: Date: Fri, 11 Jun 2004 12:14:43 +0000
Subject: Re: [ANNOUNCEMENT] PHP_Compat-1.0.0 (stable) Released.
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30492@lists.php.net to get a copy of this message
PEAR Announce wrote:
The new PEAR package PHP_Compat-1.0.0 (stable) has been released at http://pear.php.net/. Release notes ------------- Added more components: * array_change_key_case * array_chunk * array_diff_assoc * vprintf * vsprintf * var_export Fixed behaviour of stripos/strripos. Searches for whole needle. Package Info ------------- PHP_Compat provides missing functionality in the form of Constants and Functions for older versions of PHP. Constants: * E_STRICT * PATH_SEPERATOR
Ouch... that should be "PATH_SEPARATOR"...
* STDIN, STDOUT, STDERR * FILE_USE_INCLUDE_PATH, FILE_IGNORE_NEW_LINES, FILE_SKIP_EMPTY_LINES, FILE_APPEND, FILE_NO_DEFAULT_CONTEXT Functions: * array_change_key_case * array_chunk * array_combine * array_diff_assoc * array_udiff * array_udiff_assoc * file_get_contents * file_put_contents * fprintf * http_build_query * is_a * scandir * str_ireplace * str_split * stripos * strripos * var_export * vprintf * vsprintf Schmidt <schst@php.net> (developer)
One thing I'd love to see in here is a non-existant PHP function... function in_array_nocase($string, $array, $separator = '@#@') { $arr_str = $separator . strtolower(implode($separator, $array)) . $separator; $string = $separator . strtolower($string) . $separator; if(strpos($arr_str, $string) !== false) {
       return true;
} return false; } It's something that's badly needed since get_class* returns a case sensitive array. This is the fastest implementation (see http://pixelated-dreams.com/blog/archive/000053.html for details). Klaus

« previous php.pear.dev (#30492) next »