Php stands for Hypertext Preprocessor. Php is a server-side programming language that is only processed on the server machine or in an easy language you can say that it is used to replies to users’ requests and can interact with the server or database.
While programming any web application you have to choose between the server-side programming language such as asp.net, PHP, python, or java.
Php allows programmers to create dynamic web applications or database-driven applications.
Why use PHP?
There are many reasons to use PHP, some are given below.
- High Performance
- Built-in Libraries
- Relatively low cost to other languages
- Low-cost online hosting
- Large Developer Community
- Ease to learn
Setup PHP Development Environment
The PHP code needs to run on a web server it does not run on a simple browser engine. You need to install a web server as well as an IDE.
- Download and Install XAMP
- Download and Install Dreamweaver/Sublime
- After installing XAMP, search XAMP Control start Apache and MySQL
- Go to ‘C:\xampp\htdocs\’
- Delete all files inside htdocs folder
- Create a new folder by any name
- Open that file in Sublime or any IDE (PHP editor)
- Create a new file name it <anyname>.php
- Start Coding
- Compile your code by typing ‘localhost/<name of the folder>’ in your browser
- Press Enter
PHP Example Code
As PHP codes are embedded we should use <?php for the start of the php code and ?> for the end of the php code.
<?php echo"Welcome To PHP Online Free Tutorial"; ?>
Support us by sharing this post