PHP is a programing language primarily used in web development. But if you are a bug hunter, you must know about PHP and sometimes we use it. Today we will share how you can install PHP in Termux or Android. Termux is an android emulator that provides us Linux look and feels.
PHP installation in Termux
Here are a few steps you need to follow to download PHP in Termux.
STEP-1: Download the Termux apk file from a trusted source like F-Droid and GitHub. Some of you download Termux from PlayStore but I confirm that Termux on PlayStore is in the old version and does not work properly.
STEP-2: Update and Upgrade Termux. After downloading you need to update and upgrade Termux because it will upgrade all your old packages and install recommended packages.
$ apt update and apt upgrade
STEP-3: Install PHP using apt or pkg command as given below.
$ apt install php
$ pkg install php
Now you can run PHP programs in Termux easily. If you are facing some issues in installation then you can comment or message on telegram.
Let’s have a file.php file in which a PHP code is written so you can run this file using the given command.
$ php file.php
I hope you all understood how you can install PHP in Termux. If you enjoying Termux then take a look at these awesome topics: