adding php-lint
fix php 4.3
Extracting closures into methods to solve php 5.3 issue #546