Search by

devtrope / sphp

qschifferle

There is no license information available for the latest version (v0.1.0-beta) of this package.

Package info

github.com/devtrope/sphp

pkg:composer/devtrope/sphp

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0-beta 2026-09-29 13:25 UTC

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