Updated PHP sample code