PHP userland backwards compatibility layer that emulates PHP 5.5+ core functions.

⌈⌋ ⎇ branch:  upgrade.php


Artifact [7eee65cee4]

Artifact 7eee65cee4dfc64d496c0173a499f40a0bb54a3e:

  • File ext/xmlentities.php — part of check-in [02e65f8aad] at 2010-06-22 17:03:43 on branch trunk — upgradephp-16 (user: mario size: 537)

<?php
/**
 * api: php
 * title: future PHP functions
 * descriptions: functions, that are not yet in php.net releases
 *
 *
 *  
 */



/**
 * @nonstandard
 *
 * Encodes required named XML entities. It's like htmlentities().
 * Doesn't re-encode or fix numeric entities.
 *
 * @param string
 * @return string
 */
if (!function_exists("xmlentities")) {
   function xmlentities($str) {
      return strtr($str, array(
        "&#"=>"&#", "&"=>"&amp;", "'"=>"&apos;",
        "<"=>"&lt;", ">"=>"&gt;", "\""=>"&quot;", 
      ));
   }
}


?>