php5.1 compatibility