php server
snippet in php

simple localhost php

user7957

1) cd ~/public_html
2) php -S localhost:8000

run php server

user5761

cd path/to/your/app
php -S localhost:8000

serve php file

user6442

Open Terminal
php -S localhost:8000

php server

user4321

cd path/to/your/app
php -S 127.0.0.1:8000

php server

user4973


 <?php 
echo $_SERVER['PHP_SELF'];
echo "<br>";

 echo $_SERVER['SERVER_NAME'];
echo "<br>";
echo $_SERVER['HTTP_HOST'];

 echo "<br>";
echo $_SERVER['HTTP_REFERER'];
echo "<br>";
echo $_SERVER['HTTP_USER_AGENT'];
echo "<br>";
echo $_SERVER['SCRIPT_NAME'];
?>  

php server

user7500

php -S localhost:8000 -t ./