PHP performs system functions, i.e. from files on a system and it can create, open, read, write, and close them. It can handle forms, i.e. gather data from files, save data to a file, email you can send data, return data to the user. Using PHP allows you to restrict users to access some pages of your website.