A fat-free PHP8 implementation of PSR-7 and PSR-17
Open Issues: 0
- php: >=8.0
- php-http/message-factory: ^1.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.0
- http-interop/http-factory-tests: ^0.9.0
- php-http/psr7-integration-tests: dev-master
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2023-05-29 00:23:15 UTC
This is a lightweight PSR-7 implementation for PHP 8.0+.
composer require f3-factory/fatfree-psr7
The package includes a PSR-17 factory and also supports HTTPlug.
Use these factories according to specs to create Request, Response, Uri, Stream objects.
Run the test suite:
NB: Custom tests were mostly taken from Nyholm/psr7.
Benchmarks done with
devanych/psr-http-benchmark on php 8.0+.
Test results (Intel Xeon Gold 6140 CPU @ 2.30GHz, 4 cores):
|Runs per second||18599||31938||22601||27999||18789||35200|
|Average time per run||0.0538 ms||0.0313 ms||0.0442 ms||0.0357 ms||0.0532 ms||0.0284 ms|
|Total time||2.6882 s||1.5655 s||2.2122 s||1.7858 s||2.6611 s||1.4204 s|