PHP Labware internal utilities / htmLawed
htmLawed class / OOP code

htmLawed is also available in object-oriented programming (OOP) code for PHP 5 or higher. It is ~2% slower and uses ~2% more memory than the non-OOP version of htmLawed. Right-/command-click to save/download the latest htmLawed.php OOP PHP file and the htmLawedTest.php test script file for the latest version of htmLawed (tested in PHP 5.6.10, 7.0.0, and 7.2 RC1).

Usage of the htmLawed class is very simple as shown in the example below.
// Autoload the class in PHP 5. No need to instantiate.
$out = htmLawed::hl($in, array('safe'=>1, 'elements'=>'a, b, strong, i, em, li, ol, ul'));

To learn more about htmLawed, visit the htmLawed web-site:

htmLawed | PHP Labware home | visitors since Sept 2017