Hello, World
Here is a simple "Hello World" program in PHP:
<?php
echo "Hello, World!";
Steps to Run
Save the code: Save the above code in a file named
hello.php
.Open a terminal: Navigate to the directory where
hello.php
is saved.Run the script: Use the
php
command to run the script. Run the following command:php hello.php
This will output:
Hello, World!
Last modified: 01 January 2025