Run PHP in Android on Termux.

What is PHP ?


PHP is a server-side scripting language designed for Web development, but also used as ageneral-purpose programming language.

Install PHP in Android :


Open termux app and type following commands to install php in android phone.
$ pkg install php
it will install the latest version of php in your phone.

How to run php in Termux :


Write a php script and run php code in termux.
<?php 
  echo "Hello, world!";
?>
To run php code type following command :

$ php hello.php
Hello, world!
$
Now you can run any php code in your android phone.

You can also compile and run php code at http://jitcompiler.com

Comments