Recently in office a mail was circulated saying that some methods in php are faster than their equivalent, for example isset/array_key_exists is much faster than in_array and array_search. I distilled this into a script, which parses all out going svn changes and checks whether some(in_array, array_search, array_merge) methods are present in the out going changes and if it finds them, prints the file names where these methods are present. The best place to run this script is from the root of your repo as it will check you entire repo for out going changes and warn you about the suspect methods. You can check out the script here.

Advertisements