From:             php at pk dot freesurf dot fr
Operating system: 
PHP version:      5.2.6
PHP Bug Type:     Feature/Change Request
Bug description:  strpos extensions with array type parameters

Description:
------------
a) strpos($haystack, $t_needle, $offset) will return position of the first
$t_needle element found ...

b) strpos($t_haystack, $t_needle, $t_offset) will return an array of
corresponding position...

the a) will be very usefull for me ( very cpu time consuming when
$t_haystack is about 1 MB and sizeof($t_needle) is great, the haystack is
to be scan as many times as the sizeof($t_needle) when I do this within a
loop with the current strpos implementation).
Then proposal will need only 1 time scanning ... and it could be possible
to optimize the search by pre-scanning the $t_needle array and generate an
"automate" that will search for 1 character and then the 2nd one to be just
after, and so on...

the b) suggestion is only for the code "beauty"...

(forgive my poor english, I'm french...)


-- 
Edit bug report at http://bugs.php.net/?id=46725&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=46725&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=46725&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=46725&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=46725&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46725&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=46725&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=46725&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=46725&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=46725&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=46725&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=46725&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=46725&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=46725&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=46725&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46725&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46725&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=46725&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=46725&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=46725&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=46725&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=46725&r=mysqlcfg

Reply via email to