Optimized code for reverse address Php app (reviewed by Bidesh).