Adjusted php snippet.