normalize php codes to work correct on host php5.3