This package is abandoned and no longer maintained. The author suggests using the https://github.com/parsica-php/parsica package instead.

The easiest way to build robust parsers in PHP.

Fund package maintenance!
turanct

0.6.1 2020-12-01 11:25 UTC

README

The easiest way to build robust parsers in PHP.

composer require mathiasverraes/parsica

Documentation & API: parsica.verraes.net

<?php
$parser = between(char('{'), char('}'), atLeastOne(alphaChar()));
$result = $parser->tryString("{Hello}");
echo $result->output(); // Hello

Twitter Follow

Development

After running composer install, run these to validate if everything is in working order:

composer run phpunit
composer run psalm
composer run uptodocs

# or all of them:

composer run test