06-01-2014, 06:09 PM
|
|
Making PHP work
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,620
|
Quote:
Originally Posted by edgeprod
This is not a good solution for business use. strstr() is more memory-intensive than strpos(), and thus slower and less scalable. Here's some benchmarking:
http://net-beta.net/ubench/index.php?t=strpos1
From the PHP manual: "If you only want to determine if a particular needle occurs within haystack, use the faster and less memory intensive function strpos() instead."
You may want to research functions you use more carefully, if you're creating anything but the smallest programs for personal use. I wouldn't accept this choice from a contractor, personally. 
|

|
|
|