From: drew at folta dot net Operating system: PHP version: 5.2.0 PHP Bug Type: Unknown/Other Function Bug description: would like to make a direct call to html_entity_decode() from C/C++
Description: ------------ (Sorry, I didn't know which type of bug to file this as.) I'm writing a php extension in C++. I would like to call html_entity_decode() right from C++. Looking in the source, I see that html_entity_decode() is just a wrapper around php_unescape_html_entities(). Alas, this function is not mentioned in the ext/standard/html.h header file. This feature request is that the declaration of the php_unescape_html_entities() function be put in the ext/standard/html.h header file. I *do* have a work-around for this. If I declare the function myself, than I can use it. This works well, but is probably bad practice. Reproduce code: --------------- #include "ext/standard/html.h" char *old, *new; int new_len; old = estrdup("a&b"); new = php_unescape_html_entities( (unsigned char *) old, strlen(old), &new_len, 1, ENT_COMPAT, NULL TSRMLS_CC ); printf("old[%s] new[%.*s]", old, new_len, new); Expected result: ---------------- old[a&b] new[a&b] Actual result: -------------- won't compile: implicit declaration of function `int php_unescape_html_entities(...)' -- Edit bug report at http://bugs.php.net/?id=39665&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39665&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39665&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39665&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39665&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39665&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39665&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39665&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39665&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39665&r=support Expected behavior: http://bugs.php.net/fix.php?id=39665&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39665&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39665&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39665&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39665&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39665&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39665&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39665&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39665&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39665&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39665&r=mysqlcfg