PHP is scripting language. PHP script is executed on server so if you want run php script on local machine you need local server. XAMPP,WAMP,MAMP,LAMP provide you local server (Apache).
That you can install on you local machine and run php script.
Where XAMPP stands for :
X Stands for Cross platform (Means you can install xampp on any OS)
A: Apache server (To run PHP script on local machine you need a server)
M: Mysql (To store data in database and to perform database operation you need Mysql)
P: PHP (Well known Scripting language to create dynamic website )
P: Perl programming language.
First you need to open your browser then enter http://localhost/phpmyadmin this will bring you to the MySQL setup page.
Enter a name for the database, then click on the Create button. The name must be 64 characters or less and composed of letters, numbers and underscores. Avoid using numbers at the start of the name. A good name should indicate the purpose of the database. For example: test_database
Finally the database was successfully created