How to write your first hello world program in PHP
In this example, you will learn about how to write your first hello world program in PHP.
- Create a new file called
hello-world.php. - Add the following code.
hello-world.php
<?php
echo "Hello World!";
?>- Now run the above code by typing
php hello-world.phpin your terminal, which prints theHello World!.


