Consider the following code
if ( stripos($a,'something1')===0 || stripos($a,'something2')===0 ) {
return '';
}
Is there a performance benefit for using in_array
or does php stops testing if first condition evaluate to true ?
Consider the following code
if ( stripos($a,'something1')===0 || stripos($a,'something2')===0 ) {
return '';
}
Is there a performance benefit for using in_array
or does php stops testing if first condition evaluate to true ?
Relative to your question about performance.
As they say here, strpos is better. https://stackoverflow.com/a/21070786/4627253