Create a file with following content and name it as hello_world.php
echo 'Hello World!!!'.PHP_EOL;
To run it, in the command line
$ php hellow_world.php
Hello World!!!
Perfect you have made you first php hello world application. As part of the example you have noticed that you didn't complied your application to create a executable file. This is because php is not a compiler but its an Interpreter.
No comments:
Post a Comment