In this tutorial, you shall learn how to create a PHP file in XAMPP folder, and run it on the server, to print a “Hello World” message in the browser window.
PHP Hello World
1. Start XAMPP and click on Open Application Folder.
![Open XAMPP](https://www.tutorialkart.com/wp-content/uploads/2022/12/php-hello-world-1.png)
There will be a directory named htdocs.
![Go to htdocs directory](https://www.tutorialkart.com/wp-content/uploads/2022/12/php-hello-world-2.png)
2. Open the directory, and create a file with .php
extension, say helloworld.php.
![Create a file named helloworld.php](https://www.tutorialkart.com/wp-content/uploads/2022/12/php-hello-world-3.png)
3. Open helloworld.php with a text editor and write the following code in it.
![Code in helloworld.php](https://www.tutorialkart.com/wp-content/uploads/2022/12/php-hello-world-4.png)
4. Go to XAMPP application, and under Manage Servers, make sure the servers are running.
![Start the servers](https://www.tutorialkart.com/wp-content/uploads/2022/12/php-hello-world-5.png)
5. If all the servers are stopped, then click on the Start All button present on the bottom of the application.
6. Open a browser and hit the url http://localhost/helloworld.php
![Print Hello World using PHP](https://www.tutorialkart.com/wp-content/uploads/2022/12/php-hello-world-6.png)
We have run our first PHP program in the server, and print Hello World.
Conclusion
In this PHP Tutorial, we learned how to write a PHP program, and run it using XAMPP, with the help of an example.