Re: PHP 6.0 Wishlist

From: Date: Sun, 14 Aug 2005 05:01:27 +0000
Subject: Re: PHP 6.0 Wishlist
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-18038@lists.php.net to get a copy of this message
On Sun, 2005-08-14 at 00:28, Sara Golemon wrote: > >> PHP_FUNCTION(strpos) > >> { > >> ... > >> /* Swap needle and haystack if they appear to be backwards */ > >> if (needle_len > haystack_len) { > >> char *t; int t_len; > >> t = needle; needle = haystack; haystack = t; > >> t_len = needle_len; needle_len = haystack_len; haystack_len = > >> t_len; > >> } > >> ... > >> } > > > > That's not valid since it may be the case that both the needle and the > > haystack were generated from user input over which you have no idea > > about the values and can make no assumptions. it would be a complete > > mess to get false positives because the reversal just happened to match. > > > Sure... which is what my opening line was partially about: > > >> At the risk of someone taking this as a worthwhile idea: Oh yeah :) I didn't mean that to sound like I was slamming you. Just pointing out what you might not have realized at the time. *note to self... use more smilies ;) Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------'

« previous php.internals (#18038) next »