How to create php file – Hello world php code file

PHP stands for Hypertext Preprocessor. PHP is a server side scripting language, it is being used for web development and creating dynamic web pages. PHP is an open source language, its one of the first server side scripting language which can be embedded into HTML documents, it means there is no need to call an external file to process data. The language was found in the year 1995 by Rasmus Lerdorf along with Andi Gutmans and Zeev Suraski. Today many famous scripts uses php like Joomla, WordPress, Drupal, MyBB and many more. PHP can be deployed as a standalone shell on most of the platform and operating system for free. PHP is competitor to Microsoft’s ASP .net. The extension of PHP document is “.php”, so whenever you create a PHP document you’ll need to save the document with this extension.


Below is Hello world php code and steps to create a php file:

echo ‘Hello World!’;                    // Hello World in PHP

STEP 1: You just need to copy this code, paste it into text editor like notepad.
STEP 2:save as” with the name you want like “hello_world.php” to your desired location in your system.
STEP 3: Now just upload this sample php document to you php supported server, if you have one or you can install a server into you system to execute this php code and see the output.
STEP 4: Once you are done with it you’ll see the output “Hello World!”.