Hello everyone.In this video we will learn installation of php in ubuntu Initially check the version of php by typing the mentioned command in your terminal.In case if you are not aware of opening terminal than press alt and type terminal in your search box. The command will give either of the two results:1. Current version of php or 2.it specifes the package which we have to install for php parser As php is not present already,i am going to install it and that too from terminal using the following command (sudo apt install php7.0-cli), where sudo stands for super user do and apt stands for advanced packaging tool.

The above command prompts for super user password which has to be entered, with a confirmation that installation is to be continued or not? After installation, check the version of php using (php -v) command.

Open an editor of your choice and type php script, after saving it with (.php) extension.Execute your code using the command (php filename.php) php is an interpreted language which means it executes instructions directly without the need for compilation. Php also supports interactive mode where we can directly execute the instructions without even saving them to a file. As u can see i got one error it’s because of an extra double quote at the end of echo statement open your code and remove that double quote save it and execute. now it will give the desired output Thanks for watching

php installation
Tagged on:                         

Leave a Reply

Your email address will not be published. Required fields are marked *