Read/Load all php files with a certain ending? |
[eluser]xwero[/eluser]
I'm so used to strrchr when i need a string part but strrpos can be used too. Code: $files[$key] = str_replace('_helper.php','',substr($file,strrpos($file,'/')+1)); I found a benchmark here. Because your not going to have much files, i think, i'm not sure if the performance hit with strrchr will matter. As you see in the blog post the iteration is 10000. I would like to see the benchmark for shorter strings and fewer iterations. |
Welcome Guest, Not a member yet? Register Sign In |