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

From: Date: Sat, 12 Jun 2004 11:42:56 +0000
Subject: Re: [ANNOUNCEMENT] PHP_Compat-1.0.0 (stable) Released.
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30556@lists.php.net to get a copy of this message
Perhaps another package, PHP_Utilities? "Klaus Guenther" <klaus@capitalfocus.org> wrote in message news:40C9A233.5030506@capitalfocus.org... > 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 (#30556) next »