koriym/php-server

1.0.0 2023-07-26 03:11 UTC

This package is auto-updated.

Last update: 2024-06-07 08:59:49 UTC


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');