devtrope / sphp
There is no license information available for the latest version (v0.1.0-beta) of this package.
v0.1.0-beta
2026-09-29 13:25 UTC
Requires
- php: >=8.3
Requires (Dev)
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^12.0 || ^13.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-30 13:07:17 UTC
README
SPHP (Simplified PHP) is a tiny configuration file format for PHP.
Requirements
- PHP >= 8.3
Documentation
The documentation is not ready yet (not even started, if I'm being honest) but I'll update this README when it is. In the meantime, you can find examples in the examples directory.
Usage
Here's a simple use case with the SPHP parser.
use Sphp\Parser; public function __construct(private Parser $parser) {} public function something() { // Parse a SPHP string $configuration = $this->parser->parse("name: 'My Application'"); // Parse a SPHP file $configuration = $this->parser->parseFile('../path/to/the/file'); }
Installation
composer require devtrope/sphp
Development
If you want to help build SPHP, run the tests to make sure everything still works. Feel free to add tests as well.
composer install vendor/bin/phpunit tests