koriym / php-server
1.0.0
2023-07-26 03:11 UTC
Requires
- php: ^8.0
- symfony/process: ^5.4
Requires (Dev)
- ext-curl: *
- bamarni/composer-bin-plugin: ^1.8
- phpunit/phpunit: ^9.5
- psalm/plugin-phpunit: ^0.18.4
README
Simple PHP built-in server utility for testing
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.
Installation
composer require koriym/php-server
Usage
$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');