Re: [PATCH] array_combine is not binary-key safe

From: Date: Fri, 21 Jul 2006 12:43:08 +0000
Subject: Re: [PATCH] array_combine is not binary-key safe
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-24836@lists.php.net to get a copy of this message
Hi, There are 46 uses of add_assoc_zval() in the CVS. Many are with fixed length strings for the key. Should the others all be using add_assoc_zval_ex() ? On 21/07/06, Matt W <php_lists@realplain.com> wrote:
Hi, I don't know if array_combine() was intentionally made binary-key unsafe, but it seems wrong and inconsistent since binary keys work everywhere else I can think of -- including array_flip() and the new array_fill_keys(). And updating it is a bit of an optimization by eliminating strlen() calls. :-) I also changed the error message to be more grammatically-correct and fixed some typos in the description. http://www.realplain.com/php/array_combine_binkey.diff http://www.realplain.com/php/array_combine_binkey_5_2.diff Thanks, Matt -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
-- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&amp;r=213474731 "Standing on the shoulders of some very clever giants!"

« previous php.internals (#24836) next »