compatible with php5.1