radmen / custom-tag-parser
Simple parser for custom tags
Installs: 55
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 3
Open Issues: 0
pkg:composer/radmen/custom-tag-parser
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2025-10-14 06:26:36 UTC
README
-
Install Composer
-
Add
radmen/custom-tag-parserto your project's `composer.json:
{
"require": {
"radmen/custom-tag-parser": "dev-master"
}
}
- Install/update your dependencies
Example
<?php $parser = new CustomTagParser\Parser('<fizz i="3"> <fizz i="5" /> <fizz i="15">'); foreach($parser->tags('fizz') as $tag) { if(0 == $tag->i % 15) { $tag->replaceWith('FooBar'); } else if(0 == $tag->i % 5) { $tag->replaceWith('Bar'); } else if(0 == $tag->i % 3) { $tag->replaceWith('Foo'); } } $parser->toString(); // Foo Bar FooBar