PHP is a general-purpose open-source server-side scripting language that is suited to web development. Much of its syntax is borrowed from C, Java, and Perl. The goal of the language is to allow web developers to write dynamically generated pages quickly. It is fast and flexible. PHP powers everything from your blog to the most popular websites in the world.
You can download PHP from the below URL:
Detailed steps can be found here:
Note that if you have installed XAMPP you already get PHP. XAMPP is the most popular PHP development environment. XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP. The XAMPP package has been set up to be incredibly easy to install and to use.
Sample PHP Code
PHP is a server-side programming language used to enhance web pages. PHP is a recursive acronym. It stands for PHP: Hypertext Preprocessor. The first word of the acronym is the acronym.
Hello World in PHP
<!DOCTYPE HTML> <html> <head> <title>PHP Example</title> </head> <body> <?php echo "Hello World!"; ?> </body> </html>
Steps for running the Program
Create a folder named FirstProgram inside the htdocs folder under the XAMPP install directory.
Create a text file inside the above folder and give a name. Example HelloWorld.php
Add the above code to the file and save it.
Open your favorite browser and visit the URL:
Make sure you start the Apache server from the XAMPP control panel.
Hooray..! you have written and run your first PHP program.
PHP dependency management tool is called Composer. Composer will automatically manage the dependencies in the project. It takes care of the versioning and other things. Instructions to download and install Composer on Windows can be found here : https://www.testingdocs.com/composer-download-on-windows/