Updated PHP functionality