theplankmeister/balanced-html-tags

Checks whether or not the HTML tags in the passed HTML fragment are balanced.

dev-master 2015-12-07 13:47 UTC

This package is auto-updated.

Last update: 2024-04-06 08:07:54 UTC


README

A simple HTML validator that checks that tags are balanced. Use the two available static methods:

$isBalanced = BalancedHtmlTags::tagsBalanced('<div>one<p></div>'); //false
$balanced = BalancedHtmlTags::balanceTags('<div>one<p></div>'); //<div>one<p></p></div>

Version

1.0.0

License

MIT