Re: [PATCH] array_combine is not binary-key safe
| From: | Andrei Zmievski | Date: | Fri, 21 Jul 2006 23:40:17 +0000 |
| Subject: | Re: [PATCH] array_combine is not binary-key safe | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-24865@lists.php.net to get a copy of this message | ||
Yeah, that's probably a good idea. You can submit a patch if you want. :)
-Andrei
On Jul 21, 2006, at 6:04 AM, Matt W wrote:
Hi Richard, I think I've seen those instances that you're referring to. By fixed length string I assume you mean hard-coded "string_key". Yeah, I would think those should use add_assoc_*_ex() since the length is known (sizeof("string_key") etc.) to save unnecessary strlen() calls. Unless compilers optimize the strlen("string_key") + 1 to a constant from the add_assoc_*() macro. But I wouldn't think that's the case...? :-/ Matt