Do you ever need to test using a http server? This utility will fast launch a built-in PHP server just when you need it.
composer require koriym/php-server
$server = new PhpServer('127.0.0.1:8080', 'path/to/index.php');
$server->start();
// your http test here
$server->stop();
You can also specify a public web directory.
$server = new PhpServer('127.0.0.1:8080', 'path/to/public');