nggit / php-xmlentities
Convert all Unicode characters and character references to numeric character references
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/nggit/php-xmlentities
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2025-10-05 21:31:00 UTC
README
PHP xmlentities
Tip: Rename this md
file to php
to test it on your web server.
<?php
require 'src/NCR.php';
$str = '<p> © © with ❤ </p>';
$encoded = Nggit\PHPXMLEntities\NCR::encode($str);
These are portable ASCII characters
echo $encoded;
// Source view:
// <p> © © with ❤ </p>
exit;
?>
That's it! This library doesn't use the mbstring
or iconv
extension for better compatibility.