Updated PHP compatibility