Fix php5.3 error with passing function