Comments for "HTML_Entities"

» Submit Your Comment
Comments are only accepted during the "Proposal" phase. This proposal is currently in the "Finished" phase.
» Comments
  • Helgi Þormar Þorbjörnsson  [2008-04-01 20:28 UTC]

    I just wanted to give you heads up and let you know we only accept new packages that utilize PHP 5+ functionality since PHP 4 is dead anyhoo.

    Hope you can update your package to match that requirement.
  • Charles Brunet  [2008-04-02 00:09 UTC]

    I'm not sure to understand... My package works in PHP 5 too. In fact, I developed and tested it in a PHP 5 environment. I just kept the code compatible with PHP 4. It doesn't need anything that is specific to PHP 5. The only thing I saw I could do would be to add the static keyword to my static functions, and to use const instead of define, but why to do so, when it's so simple to keep compatibility?
  • Michael Gauthier  [2008-04-02 02:57 UTC]

    Regarding PHP5 compatibility, your code will raise E_STRICT errors for calling non-static methods statically.

    I'd make the preg_replace_callback() callback functions private static methods rather than using create_function().

    Also, you may want to optionally validate the UTF-8 parsed from numeric character references. Certain code points such as #xFFFF, #128 and #12 are not allowed in XML though they may be allowed in other SGML dialects.

    Your code could use more inline comments for the UTF-8 conversion blocks to make future maintenance in PEAR easier.