cvs: php-src /ext/standard/tests/strings get_html_translation_table_basic1-win32.phpt get_html_translation_table_basic1.phpt
get_html_translation_table_basic2-win32.phpt get_html_translation_table_basic2.phpt get_html_translation_table_basic3-win32.phpt
get_html_translation_table_basic3.phpt get_html_translation_table_basic4-win32.phpt get_html_translation_table_basic4.phpt
get_html_translation_table_error.phpt get_html_translation_table_variation1-win32.phpt get_html_translation_table_variation1.phpt
get_html_translation_table_variation2-win32.phpt get_html_translation_table_variation2.phpt

From: Date: Mon, 08 Oct 2007 15:30:38 +0000
Subject: cvs: php-src /ext/standard/tests/strings get_html_translation_table_basic1-win32.phpt get_html_translation_table_basic1.phpt
get_html_translation_table_basic2-win32.phpt get_html_translation_table_basic2.phpt get_html_translation_table_basic3-win32.phpt
get_html_translation_table_basic3.phpt get_html_translation_table_basic4-win32.phpt get_html_translation_table_basic4.phpt
get_html_translation_table_error.phpt get_html_translation_table_variation1-win32.phpt get_html_translation_table_variation1.phpt
get_html_translation_table_variation2-win32.phpt get_html_translation_table_variation2.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-46538@lists.php.net to get a copy of this message
kraghuba Mon Oct 8 15:30:38 2007 UTC Added files: /php-src/ext/standard/tests/strings get_html_translation_table_basic4.phpt get_html_translation_table_basic4-win32.phpt Modified files: /php-src/ext/standard/tests/strings get_html_translation_table_basic1.phpt get_html_translation_table_basic2.phpt get_html_translation_table_basic3.phpt get_html_translation_table_variation1-win32.phpt get_html_translation_table_variation2-win32.phpt get_html_translation_table_basic1-win32.phpt get_html_translation_table_basic2-win32.phpt get_html_translation_table_error.phpt get_html_translation_table_basic3-win32.phpt get_html_translation_table_variation1.phpt get_html_translation_table_variation2.phpt Log: New testcases for get_html_translation_table() function

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/get_html_translation_table_basic1.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/strings/get_html_translation_table_basic1.phpt diff -u /dev/null php-src/ext/standard/tests/strings/get_html_translation_table_basic1.phpt:1.2 --- /dev/null Mon Oct 8 15:30:38 2007 +++ php-src/ext/standard/tests/strings/get_html_translation_table_basic1.phpt Mon Oct 8 15:30:37 2007 @@ -0,0 +1,922 @@ +--TEST-- +Test get_html_translation_table() function : basic functionality - with default args +--SKIPIF-- +<?php +if( substr(PHP_OS, 0, 3) == "WIN"){ + die('skip Not for Windows'); +} + +if( ini_get("unicode.semantics") == "1") + die('skip do not run when unicode on'); + +if( !setlocale(LC_ALL, "en_US.UTF-8") ) { + die('skip failed to set locale settings to "en-US.UTF-8"'); +} +?> +--FILE-- +<?php +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) + * Description: Returns the internal translation table used by htmlspecialchars and htmlentities + * Source code: ext/standard/html.c +*/ + +/* Test get_html_translation_table() when table is specified as HTML_ENTITIES */ + +//set locale to en_US.UTF-8 +setlocale(LC_ALL, "en_US.UTF-8"); + +echo "*** Testing get_html_translation_table() : basic functionality ***\n"; + +// Calling get_html_translation_table() with default arguments +echo "-- with default arguments --\n"; +var_dump( get_html_translation_table() ); + +// Calling get_html_translation_table() with all possible optional arguments +echo "-- with table = HTML_ENTITIES --\n"; +$table = HTML_ENTITIES; +var_dump( get_html_translation_table($table) ); + +echo "-- with table = HTML_SPECIALCHARS --\n"; +$table = HTML_SPECIALCHARS; +var_dump( get_html_translation_table($table) ); + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing get_html_translation_table() : basic functionality *** +-- with default arguments -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- with table = HTML_ENTITIES -- +array(100) { + [" "]=> + string(6) "&nbsp;" + ["¡"]=> + string(7) "&iexcl;" + ["¢"]=> + string(6) "&cent;" + ["£"]=> + string(7) "&pound;" + ["¤"]=> + string(8) "&curren;" + ["¥"]=> + string(5) "&yen;" + ["¦"]=> + string(8) "&brvbar;" + ["§"]=> + string(6) "&sect;" + ["¨"]=> + string(5) "&uml;" + ["©"]=> + string(6) "&copy;" + ["ª"]=> + string(6) "&ordf;" + ["«"]=> + string(7) "&laquo;" + ["¬"]=> + string(5) "&not;" + ["­"]=> + string(5) "&shy;" + ["®"]=> + string(5) "&reg;" + ["¯"]=> + string(6) "&macr;" + ["°"]=> + string(5) "&deg;" + ["±"]=> + string(8) "&plusmn;" + ["²"]=> + string(6) "&sup2;" + ["³"]=> + string(6) "&sup3;" + ["´"]=> + string(7) "&acute;" + ["µ"]=> + string(7) "&micro;" + ["¶"]=> + string(6) "&para;" + ["·"]=> + string(8) "&middot;" + ["¸"]=> + string(7) "&cedil;" + ["¹"]=> + string(6) "&sup1;" + ["º"]=> + string(6) "&ordm;" + ["»"]=> + string(7) "&raquo;" + ["¼"]=> + string(8) "&frac14;" + ["½"]=> + string(8) "&frac12;" + ["¾"]=> + string(8) "&frac34;" + ["¿"]=> + string(8) "&iquest;" + ["À"]=> + string(8) "&Agrave;" + ["Á"]=> + string(8) "&Aacute;" + ["Â"]=> + string(7) "&Acirc;" + ["Ã"]=> + string(8) "&Atilde;" + ["Ä"]=> + string(6) "&Auml;" + ["Å"]=> + string(7) "&Aring;" + ["Æ"]=> + string(7) "&AElig;" + ["Ç"]=> + string(8) "&Ccedil;" + ["È"]=> + string(8) "&Egrave;" + ["É"]=> + string(8) "&Eacute;" + ["Ê"]=> + string(7) "&Ecirc;" + ["Ë"]=> + string(6) "&Euml;" + ["Ì"]=> + string(8) "&Igrave;" + ["Í"]=> + string(8) "&Iacute;" + ["Î"]=> + string(7) "&Icirc;" + ["Ï"]=> + string(6) "&Iuml;" + ["Ð"]=> + string(5) "&ETH;" + ["Ñ"]=> + string(8) "&Ntilde;" + ["Ò"]=> + string(8) "&Ograve;" + ["Ó"]=> + string(8) "&Oacute;" + ["Ô"]=> + string(7) "&Ocirc;" + ["Õ"]=> + string(8) "&Otilde;" + ["Ö"]=> + string(6) "&Ouml;" + ["×"]=> + string(7) "&times;" + ["Ø"]=> + string(8) "&Oslash;" + ["Ù"]=> + string(8) "&Ugrave;" + ["Ú"]=> + string(8) "&Uacute;" + ["Û"]=> + string(7) "&Ucirc;" + ["Ü"]=> + string(6) "&Uuml;" + ["Ý"]=> + string(8) "&Yacute;" + ["Þ"]=> + string(7) "&THORN;" + ["ß"]=> + string(7) "&szlig;" + ["à"]=> + string(8) "&agrave;" + ["á"]=> + string(8) "&aacute;" + ["â"]=> + string(7) "&acirc;" + ["ã"]=> + string(8) "&atilde;" + ["ä"]=> + string(6) "&auml;" + ["å"]=> + string(7) "&aring;" + ["æ"]=> + string(7) "&aelig;" + ["ç"]=> + string(8) "&ccedil;" + ["è"]=> + string(8) "&egrave;" + ["é"]=> + string(8) "&eacute;" + ["ê"]=> + string(7) "&ecirc;" + ["ë"]=> + string(6) "&euml;" + ["ì"]=> + string(8) "&igrave;" + ["í"]=> + string(8) "&iacute;" + ["î"]=> + string(7) "&icirc;" + ["ï"]=> + string(6) "&iuml;" + ["ð"]=> + string(5) "&eth;" + ["ñ"]=> + string(8) "&ntilde;" + ["ò"]=> + string(8) "&ograve;" + ["ó"]=> + string(8) "&oacute;" + ["ô"]=> + string(7) "&ocirc;" + ["õ"]=> + string(8) "&otilde;" + ["ö"]=> + string(6) "&ouml;" + ["÷"]=> + string(8) "&divide;" + ["ø"]=> + string(8) "&oslash;" + ["ù"]=> + string(8) "&ugrave;" + ["ú"]=> + string(8) "&uacute;" + ["û"]=> + string(7) "&ucirc;" + ["ü"]=> + string(6) "&uuml;" + ["ý"]=> + string(8) "&yacute;" + ["þ"]=> + string(7) "&thorn;" + ["ÿ"]=> + string(6) "&yuml;" + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- with table = HTML_SPECIALCHARS -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +Done +--UEXPECTF-- +*** Testing get_html_translation_table() : basic functionality *** +-- with default arguments -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- with table = HTML_ENTITIES -- +array(311) { + [u" "]=> + unicode(6) "&nbsp;" + [u"¡"]=> + unicode(7) "&iexcl;" + [u"¢"]=> + unicode(6) "&cent;" + [u"£"]=> + unicode(7) "&pound;" + [u"¤"]=> + unicode(8) "&curren;" + [u"Â¥"]=> + unicode(5) "&yen;" + [u"¦"]=> + unicode(8) "&brvbar;" + [u"§"]=> + unicode(6) "&sect;" + [u"¨"]=> + unicode(5) "&uml;" + [u"©"]=> + unicode(6) "&copy;" + [u"ª"]=> + unicode(6) "&ordf;" + [u"«"]=> + unicode(7) "&laquo;" + [u"¬"]=> + unicode(5) "&not;" + [u"­"]=> + unicode(5) "&shy;" + [u"®"]=> + unicode(5) "&reg;" + [u"¯"]=> + unicode(6) "&macr;" + [u"°"]=> + unicode(5) "&deg;" + [u"±"]=> + unicode(8) "&plusmn;" + [u"²"]=> + unicode(6) "&sup2;" + [u"³"]=> + unicode(6) "&sup3;" + [u"´"]=> + unicode(7) "&acute;" + [u"µ"]=> + unicode(7) "&micro;" + [u"¶"]=> + unicode(6) "&para;" + [u"·"]=> + unicode(8) "&middot;" + [u"¸"]=> + unicode(7) "&cedil;" + [u"¹"]=> + unicode(6) "&sup1;" + [u"º"]=> + unicode(6) "&ordm;" + [u"»"]=> + unicode(7) "&raquo;" + [u"¼"]=> + unicode(8) "&frac14;" + [u"½"]=> + unicode(8) "&frac12;" + [u"¾"]=> + unicode(8) "&frac34;" + [u"¿"]=> + unicode(8) "&iquest;" + [u"À"]=> + unicode(8) "&Agrave;" + [u"Á"]=> + unicode(8) "&Aacute;" + [u"Â"]=> + unicode(7) "&Acirc;" + [u"Ã"]=> + unicode(8) "&Atilde;" + [u"Ä"]=> + unicode(6) "&Auml;" + [u"Å"]=> + unicode(7) "&Aring;" + [u"Æ"]=> + unicode(7) "&AElig;" + [u"Ç"]=> + unicode(8) "&Ccedil;" + [u"È"]=> + unicode(8) "&Egrave;" + [u"É"]=> + unicode(8) "&Eacute;" + [u"Ê"]=> + unicode(7) "&Ecirc;" + [u"Ë"]=> + unicode(6) "&Euml;" + [u"Ì"]=> + unicode(8) "&Igrave;" + [u"Í"]=> + unicode(8) "&Iacute;" + [u"Î"]=> + unicode(7) "&Icirc;" + [u"Ï"]=> + unicode(6) "&Iuml;" + [u"Ð"]=> + unicode(5) "&ETH;" + [u"Ñ"]=> + unicode(8) "&Ntilde;" + [u"Ò"]=> + unicode(8) "&Ograve;" + [u"Ó"]=> + unicode(8) "&Oacute;" + [u"Ô"]=> + unicode(7) "&Ocirc;" + [u"Õ"]=> + unicode(8) "&Otilde;" + [u"Ö"]=> + unicode(6) "&Ouml;" + [u"×"]=> + unicode(7) "&times;" + [u"Ø"]=> + unicode(8) "&Oslash;" + [u"Ù"]=> + unicode(8) "&Ugrave;" + [u"Ú"]=> + unicode(8) "&Uacute;" + [u"Û"]=> + unicode(7) "&Ucirc;" + [u"Ü"]=> + unicode(6) "&Uuml;" + [u"Ý"]=> + unicode(8) "&Yacute;" + [u"Þ"]=> + unicode(7) "&THORN;" + [u"ß"]=> + unicode(7) "&szlig;" + [u"à"]=> + unicode(8) "&agrave;" + [u"á"]=> + unicode(8) "&aacute;" + [u"â"]=> + unicode(7) "&acirc;" + [u"ã"]=> + unicode(8) "&atilde;" + [u"ä"]=> + unicode(6) "&auml;" + [u"Ã¥"]=> + unicode(7) "&aring;" + [u"æ"]=> + unicode(7) "&aelig;" + [u"ç"]=> + unicode(8) "&ccedil;" + [u"è"]=> + unicode(8) "&egrave;" + [u"é"]=> + unicode(8) "&eacute;" + [u"ê"]=> + unicode(7) "&ecirc;" + [u"ë"]=> + unicode(6) "&euml;" + [u"ì"]=> + unicode(8) "&igrave;" + [u"í"]=> + unicode(8) "&iacute;" + [u"î"]=> + unicode(7) "&icirc;" + [u"ï"]=> + unicode(6) "&iuml;" + [u"ð"]=> + unicode(5) "&eth;" + [u"ñ"]=> + unicode(8) "&ntilde;" + [u"ò"]=> + unicode(8) "&ograve;" + [u"ó"]=> + unicode(8) "&oacute;" + [u"ô"]=> + unicode(7) "&ocirc;" + [u"õ"]=> + unicode(8) "&otilde;" + [u"ö"]=> + unicode(6) "&ouml;" + [u"÷"]=> + unicode(8) "&divide;" + [u"ø"]=> + unicode(8) "&oslash;" + [u"ù"]=> + unicode(8) "&ugrave;" + [u"ú"]=> + unicode(8) "&uacute;" + [u"û"]=> + unicode(7) "&ucirc;" + [u"ü"]=> + unicode(6) "&uuml;" + [u"ý"]=> + unicode(8) "&yacute;" + [u"þ"]=> + unicode(7) "&thorn;" + [u"ÿ"]=> + unicode(6) "&yuml;" + [u"Œ"]=> + unicode(7) "&OElig;" + [u"œ"]=> + unicode(7) "&oelig;" + [u"Å "]=> + unicode(8) "&Scaron;" + [u"Å¡"]=> + unicode(8) "&scaron;" + [u"Ÿ"]=> + unicode(6) "&Yuml;" + [u"ƒ"]=> + unicode(6) "&fnof;" + [u"ˆ"]=> + unicode(6) "&circ;" + [u"˜"]=> + unicode(7) "&tilde;" + [u"Α"]=> + unicode(7) "&Alpha;" + [u"Β"]=> + unicode(6) "&Beta;" + [u"Γ"]=> + unicode(7) "&Gamma;" + [u"Δ"]=> + unicode(7) "&Delta;" + [u"Ε"]=> + unicode(9) "&Epsilon;" + [u"Ζ"]=> + unicode(6) "&Zeta;" + [u"Η"]=> + unicode(5) "&Eta;" + [u"Θ"]=> + unicode(7) "&Theta;" + [u"Ι"]=> + unicode(6) "&Iota;" + [u"Κ"]=> + unicode(7) "&Kappa;" + [u"Λ"]=> + unicode(8) "&Lambda;" + [u"Μ"]=> + unicode(4) "&Mu;" + [u"Ν"]=> + unicode(4) "&Nu;" + [u"Ξ"]=> + unicode(4) "&Xi;" + [u"Ο"]=> + unicode(9) "&Omicron;" + [u"Π"]=> + unicode(4) "&Pi;" + [u"Ρ"]=> + unicode(5) "&Rho;" + [u"Σ"]=> + unicode(7) "&Sigma;" + [u"Τ"]=> + unicode(5) "&Tau;" + [u"Î¥"]=> + unicode(9) "&Upsilon;" + [u"Φ"]=> + unicode(5) "&Phi;" + [u"Χ"]=> + unicode(5) "&Chi;" + [u"Ψ"]=> + unicode(5) "&Psi;" + [u"Ω"]=> + unicode(7) "&Omega;" + [u"α"]=> + unicode(7) "&alpha;" + [u"β"]=> + unicode(6) "&beta;" + [u"γ"]=> + unicode(7) "&gamma;" + [u"δ"]=> + unicode(7) "&delta;" + [u"ε"]=> + unicode(9) "&epsilon;" + [u"ζ"]=> + unicode(6) "&zeta;" + [u"η"]=> + unicode(5) "&eta;" + [u"θ"]=> + unicode(7) "&theta;" + [u"ι"]=> + unicode(6) "&iota;" + [u"κ"]=> + unicode(7) "&kappa;" + [u"λ"]=> + unicode(8) "&lambda;" + [u"μ"]=> + unicode(4) "&mu;" + [u"ν"]=> + unicode(4) "&nu;" + [u"ξ"]=> + unicode(4) "&xi;" + [u"ο"]=> + unicode(9) "&omicron;" + [u"π"]=> + unicode(4) "&pi;" + [u"ρ"]=> + unicode(5) "&rho;" + [u"ς"]=> + unicode(8) "&sigmaf;" + [u"σ"]=> + unicode(7) "&sigma;" + [u"τ"]=> + unicode(5) "&tau;" + [u"υ"]=> + unicode(9) "&upsilon;" + [u"φ"]=> + unicode(5) "&phi;" + [u"χ"]=> + unicode(5) "&chi;" + [u"ψ"]=> + unicode(5) "&psi;" + [u"ω"]=> + unicode(7) "&omega;" + [u"ϑ"]=> + unicode(10) "&thetasym;" + [u"ϒ"]=> + unicode(7) "&upsih;" + [u"ϖ"]=> + unicode(5) "&piv;" + [u" "]=> + unicode(6) "&ensp;" + [u" "]=> + unicode(6) "&emsp;" + [u" "]=> + unicode(8) "&thinsp;" + [u"‌"]=> + unicode(6) "&zwnj;" + [u"‍"]=> + unicode(5) "&zwj;" + [u"‎"]=> + unicode(5) "&lrm;" + [u"‏"]=> + unicode(5) "&rlm;" + [u"–"]=> + unicode(7) "&ndash;" + [u"—"]=> + unicode(7) "&mdash;" + [u"‘"]=> + unicode(7) "&lsquo;" + [u"’"]=> + unicode(7) "&rsquo;" + [u"‚"]=> + unicode(7) "&sbquo;" + [u"“"]=> + unicode(7) "&ldquo;" + [u"”"]=> + unicode(7) "&rdquo;" + [u"„"]=> + unicode(7) "&bdquo;" + [u"†"]=> + unicode(8) "&dagger;" + [u"‡"]=> + unicode(8) "&Dagger;" + [u"•"]=> + unicode(6) "&bull;" + [u"…"]=> + unicode(8) "&hellip;" + [u"‰"]=> + unicode(8) "&permil;" + [u"′"]=> + unicode(7) "&prime;" + [u"″"]=> + unicode(7) "&Prime;" + [u"‹"]=> + unicode(8) "&lsaquo;" + [u"›"]=> + unicode(8) "&rsaquo;" + [u"‾"]=> + unicode(7) "&oline;" + [u"⁄"]=> + unicode(7) "&frasl;" + [u"€"]=> + unicode(6) "&euro;" + [u"ℑ"]=> + unicode(7) "&image;" + [u"℘"]=> + unicode(8) "&weierp;" + [u"ℜ"]=> + unicode(6) "&real;" + [u"™"]=> + unicode(7) "&trade;" + [u"ℵ"]=> + unicode(9) "&alefsym;" + [u"←"]=> + unicode(6) "&larr;" + [u"↑"]=> + unicode(6) "&uarr;" + [u"→"]=> + unicode(6) "&rarr;" + [u"↓"]=> + unicode(6) "&darr;" + [u"↔"]=> + unicode(6) "&harr;" + [u"↵"]=> + unicode(7) "&crarr;" + [u"⇐"]=> + unicode(6) "&lArr;" + [u"⇑"]=> + unicode(6) "&uArr;" + [u"⇒"]=> + unicode(6) "&rArr;" + [u"⇓"]=> + unicode(6) "&dArr;" + [u"⇔"]=> + unicode(6) "&hArr;" + [u"⇕"]=> + unicode(6) "&vArr;" + [u"⇚"]=> + unicode(7) "&lAarr;" + [u"⇛"]=> + unicode(7) "&rAarr;" + [u"⇝"]=> + unicode(7) "&rarrw;" + [u"∀"]=> + unicode(8) "&forall;" + [u"∁"]=> + unicode(6) "&comp;" + [u"∂"]=> + unicode(6) "&part;" + [u"∃"]=> + unicode(7) "&exist;" + [u"∄"]=> + unicode(8) "&nexist;" + [u"∅"]=> + unicode(7) "&empty;" + [u"∇"]=> + unicode(7) "&nabla;" + [u"∈"]=> + unicode(6) "&isin;" + [u"∉"]=> + unicode(7) "&notin;" + [u"∊"]=> + unicode(7) "&epsis;" + [u"∋"]=> + unicode(4) "&ni;" + [u"∌"]=> + unicode(7) "&notni;" + [u"∍"]=> + unicode(7) "&bepsi;" + [u"∏"]=> + unicode(6) "&prod;" + [u"∐"]=> + unicode(8) "&coprod;" + [u"∑"]=> + unicode(5) "&sum;" + [u"−"]=> + unicode(7) "&minus;" + [u"∓"]=> + unicode(8) "&mnplus;" + [u"∔"]=> + unicode(8) "&plusdo;" + [u"∖"]=> + unicode(7) "&setmn;" + [u"∗"]=> + unicode(8) "&lowast;" + [u"∘"]=> + unicode(8) "&compfn;" + [u"√"]=> + unicode(7) "&radic;" + [u"∝"]=> + unicode(6) "&prop;" + [u"∞"]=> + unicode(7) "&infin;" + [u"∟"]=> + unicode(7) "&ang90;" + [u"∠"]=> + unicode(5) "&ang;" + [u"∡"]=> + unicode(8) "&angmsd;" + [u"∢"]=> + unicode(8) "&angsph;" + [u"∣"]=> + unicode(5) "&mid;" + [u"∤"]=> + unicode(6) "&nmid;" + [u"∥"]=> + unicode(5) "&par;" + [u"∦"]=> + unicode(6) "&npar;" + [u"∧"]=> + unicode(5) "&and;" + [u"∨"]=> + unicode(4) "&or;" + [u"∩"]=> + unicode(5) "&cap;" + [u"∪"]=> + unicode(5) "&cup;" + [u"∫"]=> + unicode(5) "&int;" + [u"∮"]=> + unicode(8) "&conint;" + [u"∴"]=> + unicode(8) "&there4;" + [u"∵"]=> + unicode(8) "&becaus;" + [u"∼"]=> + unicode(5) "&sim;" + [u"∽"]=> + unicode(6) "&bsim;" + [u"≀"]=> + unicode(8) "&wreath;" + [u"≁"]=> + unicode(6) "&nsim;" + [u"≃"]=> + unicode(6) "&sime;" + [u"≄"]=> + unicode(7) "&nsime;" + [u"≅"]=> + unicode(6) "&cong;" + [u"≇"]=> + unicode(7) "&ncong;" + [u"≈"]=> + unicode(7) "&asymp;" + [u"≉"]=> + unicode(5) "&nap;" + [u"≊"]=> + unicode(5) "&ape;" + [u"≌"]=> + unicode(7) "&bcong;" + [u"≍"]=> + unicode(7) "&asymp;" + [u"≎"]=> + unicode(6) "&bump;" + [u"≏"]=> + unicode(7) "&bumpe;" + [u"≠"]=> + unicode(4) "&ne;" + [u"≡"]=> + unicode(7) "&equiv;" + [u"≤"]=> + unicode(4) "&le;" + [u"≥"]=> + unicode(4) "&ge;" + [u"≦"]=> + unicode(4) "&lE;" + [u"≧"]=> + unicode(4) "&gE;" + [u"≨"]=> + unicode(5) "&lnE;" + [u"≩"]=> + unicode(5) "&gnE;" + [u"≪"]=> + unicode(4) "&Lt;" + [u"≫"]=> + unicode(4) "&Gt;" + [u"≬"]=> + unicode(7) "&twixt;" + [u"≮"]=> + unicode(5) "&nlt;" + [u"≯"]=> + unicode(5) "&ngt;" + [u"≰"]=> + unicode(6) "&nles;" + [u"≱"]=> + unicode(6) "&nges;" + [u"≲"]=> + unicode(6) "&lsim;" + [u"≳"]=> + unicode(6) "&gsim;" + [u"≶"]=> + unicode(4) "&lg;" + [u"≷"]=> + unicode(4) "&gl;" + [u"≺"]=> + unicode(4) "&pr;" + [u"≻"]=> + unicode(4) "&sc;" + [u"≼"]=> + unicode(7) "&cupre;" + [u"≽"]=> + unicode(7) "&sscue;" + [u"≾"]=> + unicode(7) "&prsim;" + [u"≿"]=> + unicode(7) "&scsim;" + [u"⊀"]=> + unicode(5) "&npr;" + [u"⊁"]=> + unicode(5) "&nsc;" + [u"⊂"]=> + unicode(5) "&sub;" + [u"⊃"]=> + unicode(5) "&sup;" + [u"⊄"]=> + unicode(6) "&nsub;" + [u"⊅"]=> + unicode(6) "&nsup;" + [u"⊆"]=> + unicode(6) "&sube;" + [u"⊇"]=> + unicode(6) "&supe;" + [u"⊕"]=> + unicode(7) "&oplus;" + [u"⊗"]=> + unicode(8) "&otimes;" + [u"⊥"]=> + unicode(6) "&perp;" + [u"⋅"]=> + unicode(6) "&sdot;" + [u"⌈"]=> + unicode(7) "&lceil;" + [u"⌉"]=> + unicode(7) "&rceil;" + [u"⌊"]=> + unicode(8) "&lfloor;" + [u"⌋"]=> + unicode(8) "&rfloor;" + [u"〈"]=> + unicode(6) "&lang;" + [u"〉"]=> + unicode(6) "&rang;" + [u"◊"]=> + unicode(5) "&loz;" + [u"♠"]=> + unicode(8) "&spades;" + [u"♣"]=> + unicode(7) "&clubs;" + [u"♥"]=> + unicode(8) "&hearts;" + [u"♦"]=> + unicode(7) "&diams;" + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- with table = HTML_SPECIALCHARS -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/get_html_translation_table_basic2.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/strings/get_html_translation_table_basic2.phpt diff -u /dev/null php-src/ext/standard/tests/strings/get_html_translation_table_basic2.phpt:1.2 --- /dev/null Mon Oct 8 15:30:38 2007 +++ php-src/ext/standard/tests/strings/get_html_translation_table_basic2.phpt Mon Oct 8 15:30:37 2007 @@ -0,0 +1,1734 @@ +--TEST-- +Test get_html_translation_table() function : basic functionality - table as HTML_ENTITIES & quote_style(ENT_COMPAT, ENT_QUOTES) +--SKIPIF-- +<?php +if( substr(PHP_OS, 0, 3) == "WIN"){ + die('skip Not for Windows'); +} + +if( ini_get("unicode.semantics") == "1") + die('skip do not run when unicode on'); + +if( !setlocale(LC_ALL, "en_US.UTF-8") ) { + die('skip failed to set locale settings to "en-US.UTF-8"'); +} +?> +--FILE-- +<?php +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) + * Description: Returns the internal translation table used by htmlspecialchars and htmlentities + * Source code: ext/standard/html.c +*/ + +/* Test get_html_translation_table() when table is specified as HTML_ENTITIES */ + +//set locale to en_US.UTF-8 +setlocale(LC_ALL, "en_US.UTF-8"); + +echo "*** Testing get_html_translation_table() : basic functionality ***\n"; + +// Calling get_html_translation_table() with default arguments +echo "-- with default arguments --\n"; +var_dump( get_html_translation_table() ); + +// Calling get_html_translation_table() with all arguments +// $table as HTML_ENTITIES and different quote style +echo "-- with table = HTML_ENTITIES & quote_style = ENT_COMPAT --\n"; +$table = HTML_ENTITIES; +$quote_style = ENT_COMPAT; +var_dump( get_html_translation_table($table, $quote_style) ); + +echo "-- with table = HTML_ENTITIES & quote_style = ENT_QUOTES --\n"; +$quote_style = ENT_QUOTES; +var_dump( get_html_translation_table($table, $quote_style) ); + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing get_html_translation_table() : basic functionality *** +-- with default arguments -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- with table = HTML_ENTITIES & quote_style = ENT_COMPAT -- +array(100) { + [" "]=> + string(6) "&nbsp;" + ["¡"]=> + string(7) "&iexcl;" + ["¢"]=> + string(6) "&cent;" + ["£"]=> + string(7) "&pound;" + ["¤"]=> + string(8) "&curren;" + ["¥"]=> + string(5) "&yen;" + ["¦"]=> + string(8) "&brvbar;" + ["§"]=> + string(6) "&sect;" + ["¨"]=> + string(5) "&uml;" + ["©"]=> + string(6) "&copy;" + ["ª"]=> + string(6) "&ordf;" + ["«"]=> + string(7) "&laquo;" + ["¬"]=> + string(5) "&not;" + ["­"]=> + string(5) "&shy;" + ["®"]=> + string(5) "&reg;" + ["¯"]=> + string(6) "&macr;" + ["°"]=> + string(5) "&deg;" + ["±"]=> + string(8) "&plusmn;" + ["²"]=> + string(6) "&sup2;" + ["³"]=> + string(6) "&sup3;" + ["´"]=> + string(7) "&acute;" + ["µ"]=> + string(7) "&micro;" + ["¶"]=> + string(6) "&para;" + ["·"]=> + string(8) "&middot;" + ["¸"]=> + string(7) "&cedil;" + ["¹"]=> + string(6) "&sup1;" + ["º"]=> + string(6) "&ordm;" + ["»"]=> + string(7) "&raquo;" + ["¼"]=> + string(8) "&frac14;" + ["½"]=> + string(8) "&frac12;" + ["¾"]=> + string(8) "&frac34;" + ["¿"]=> + string(8) "&iquest;" + ["À"]=> + string(8) "&Agrave;" + ["Á"]=> + string(8) "&Aacute;" + ["Â"]=> + string(7) "&Acirc;" + ["Ã"]=> + string(8) "&Atilde;" + ["Ä"]=> + string(6) "&Auml;" + ["Å"]=> + string(7) "&Aring;" + ["Æ"]=> + string(7) "&AElig;" + ["Ç"]=> + string(8) "&Ccedil;" + ["È"]=> + string(8) "&Egrave;" + ["É"]=> + string(8) "&Eacute;" + ["Ê"]=> + string(7) "&Ecirc;" + ["Ë"]=> + string(6) "&Euml;" + ["Ì"]=> + string(8) "&Igrave;" + ["Í"]=> + string(8) "&Iacute;" + ["Î"]=> + string(7) "&Icirc;" + ["Ï"]=> + string(6) "&Iuml;" + ["Ð"]=> + string(5) "&ETH;" + ["Ñ"]=> + string(8) "&Ntilde;" + ["Ò"]=> + string(8) "&Ograve;" + ["Ó"]=> + string(8) "&Oacute;" + ["Ô"]=> + string(7) "&Ocirc;" + ["Õ"]=> + string(8) "&Otilde;" + ["Ö"]=> + string(6) "&Ouml;" + ["×"]=> + string(7) "&times;" + ["Ø"]=> + string(8) "&Oslash;" + ["Ù"]=> + string(8) "&Ugrave;" + ["Ú"]=> + string(8) "&Uacute;" + ["Û"]=> + string(7) "&Ucirc;" + ["Ü"]=> + string(6) "&Uuml;" + ["Ý"]=> + string(8) "&Yacute;" + ["Þ"]=> + string(7) "&THORN;" + ["ß"]=> + string(7) "&szlig;" + ["à"]=> + string(8) "&agrave;" + ["á"]=> + string(8) "&aacute;" + ["â"]=> + string(7) "&acirc;" + ["ã"]=> + string(8) "&atilde;" + ["ä"]=> + string(6) "&auml;" + ["å"]=> + string(7) "&aring;" + ["æ"]=> + string(7) "&aelig;" + ["ç"]=> + string(8) "&ccedil;" + ["è"]=> + string(8) "&egrave;" + ["é"]=> + string(8) "&eacute;" + ["ê"]=> + string(7) "&ecirc;" + ["ë"]=> + string(6) "&euml;" + ["ì"]=> + string(8) "&igrave;" + ["í"]=> + string(8) "&iacute;" + ["î"]=> + string(7) "&icirc;" + ["ï"]=> + string(6) "&iuml;" + ["ð"]=> + string(5) "&eth;" + ["ñ"]=> + string(8) "&ntilde;" + ["ò"]=> + string(8) "&ograve;" + ["ó"]=> + string(8) "&oacute;" + ["ô"]=> + string(7) "&ocirc;" + ["õ"]=> + string(8) "&otilde;" + ["ö"]=> + string(6) "&ouml;" + ["÷"]=> + string(8) "&divide;" + ["ø"]=> + string(8) "&oslash;" + ["ù"]=> + string(8) "&ugrave;" + ["ú"]=> + string(8) "&uacute;" + ["û"]=> + string(7) "&ucirc;" + ["ü"]=> + string(6) "&uuml;" + ["ý"]=> + string(8) "&yacute;" + ["þ"]=> + string(7) "&thorn;" + ["ÿ"]=> + string(6) "&yuml;" + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- with table = HTML_ENTITIES & quote_style = ENT_QUOTES -- +array(101) { + [" "]=> + string(6) "&nbsp;" + ["¡"]=> + string(7) "&iexcl;" + ["¢"]=> + string(6) "&cent;" + ["£"]=> + string(7) "&pound;" + ["¤"]=> + string(8) "&curren;" + ["¥"]=> + string(5) "&yen;" + ["¦"]=> + string(8) "&brvbar;" + ["§"]=> + string(6) "&sect;" + ["¨"]=> + string(5) "&uml;" + ["©"]=> + string(6) "&copy;" + ["ª"]=> + string(6) "&ordf;" + ["«"]=> + string(7) "&laquo;" + ["¬"]=> + string(5) "&not;" + ["­"]=> + string(5) "&shy;" + ["®"]=> + string(5) "&reg;" + ["¯"]=> + string(6) "&macr;" + ["°"]=> + string(5) "&deg;" + ["±"]=> + string(8) "&plusmn;" + ["²"]=> + string(6) "&sup2;" + ["³"]=> + string(6) "&sup3;" + ["´"]=> + string(7) "&acute;" + ["µ"]=> + string(7) "&micro;" + ["¶"]=> + string(6) "&para;" + ["·"]=> + string(8) "&middot;" + ["¸"]=> + string(7) "&cedil;" + ["¹"]=> + string(6) "&sup1;" + ["º"]=> + string(6) "&ordm;" + ["»"]=> + string(7) "&raquo;" + ["¼"]=> + string(8) "&frac14;" + ["½"]=> + string(8) "&frac12;" + ["¾"]=> + string(8) "&frac34;" + ["¿"]=> + string(8) "&iquest;" + ["À"]=> + string(8) "&Agrave;" + ["Á"]=> + string(8) "&Aacute;" + ["Â"]=> + string(7) "&Acirc;" + ["Ã"]=> + string(8) "&Atilde;" + ["Ä"]=> + string(6) "&Auml;" + ["Å"]=> + string(7) "&Aring;" + ["Æ"]=> + string(7) "&AElig;" + ["Ç"]=> + string(8) "&Ccedil;" + ["È"]=> + string(8) "&Egrave;" + ["É"]=> + string(8) "&Eacute;" + ["Ê"]=> + string(7) "&Ecirc;" + ["Ë"]=> + string(6) "&Euml;" + ["Ì"]=> + string(8) "&Igrave;" + ["Í"]=> + string(8) "&Iacute;" + ["Î"]=> + string(7) "&Icirc;" + ["Ï"]=> + string(6) "&Iuml;" + ["Ð"]=> + string(5) "&ETH;" + ["Ñ"]=> + string(8) "&Ntilde;" + ["Ò"]=> + string(8) "&Ograve;" + ["Ó"]=> + string(8) "&Oacute;" + ["Ô"]=> + string(7) "&Ocirc;" + ["Õ"]=> + string(8) "&Otilde;" + ["Ö"]=> + string(6) "&Ouml;" + ["×"]=> + string(7) "&times;" + ["Ø"]=> + string(8) "&Oslash;" + ["Ù"]=> + string(8) "&Ugrave;" + ["Ú"]=> + string(8) "&Uacute;" + ["Û"]=> + string(7) "&Ucirc;" + ["Ü"]=> + string(6) "&Uuml;" + ["Ý"]=> + string(8) "&Yacute;" + ["Þ"]=> + string(7) "&THORN;" + ["ß"]=> + string(7) "&szlig;" + ["à"]=> + string(8) "&agrave;" + ["á"]=> + string(8) "&aacute;" + ["â"]=> + string(7) "&acirc;" + ["ã"]=> + string(8) "&atilde;" + ["ä"]=> + string(6) "&auml;" + ["å"]=> + string(7) "&aring;" + ["æ"]=> + string(7) "&aelig;" + ["ç"]=> + string(8) "&ccedil;" + ["è"]=> + string(8) "&egrave;" + ["é"]=> + string(8) "&eacute;" + ["ê"]=> + string(7) "&ecirc;" + ["ë"]=> + string(6) "&euml;" + ["ì"]=> + string(8) "&igrave;" + ["í"]=> + string(8) "&iacute;" + ["î"]=> + string(7) "&icirc;" + ["ï"]=> + string(6) "&iuml;" + ["ð"]=> + string(5) "&eth;" + ["ñ"]=> + string(8) "&ntilde;" + ["ò"]=> + string(8) "&ograve;" + ["ó"]=> + string(8) "&oacute;" + ["ô"]=> + string(7) "&ocirc;" + ["õ"]=> + string(8) "&otilde;" + ["ö"]=> + string(6) "&ouml;" + ["÷"]=> + string(8) "&divide;" + ["ø"]=> + string(8) "&oslash;" + ["ù"]=> + string(8) "&ugrave;" + ["ú"]=> + string(8) "&uacute;" + ["û"]=> + string(7) "&ucirc;" + ["ü"]=> + string(6) "&uuml;" + ["ý"]=> + string(8) "&yacute;" + ["þ"]=> + string(7) "&thorn;" + ["ÿ"]=> + string(6) "&yuml;" + ["""]=> + string(6) "&quot;" + ["'"]=> + string(5) "&#39;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +Done +--UEXPECTF-- +*** Testing get_html_translation_table() : basic functionality *** +-- with default arguments -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- with table = HTML_ENTITIES & quote_style = ENT_COMPAT -- +array(311) { + [u" "]=> + unicode(6) "&nbsp;" + [u"¡"]=> + unicode(7) "&iexcl;" + [u"¢"]=> + unicode(6) "&cent;" + [u"£"]=> + unicode(7) "&pound;" + [u"¤"]=> + unicode(8) "&curren;" + [u"Â¥"]=> + unicode(5) "&yen;" + [u"¦"]=> + unicode(8) "&brvbar;" + [u"§"]=> + unicode(6) "&sect;" + [u"¨"]=> + unicode(5) "&uml;" + [u"©"]=> + unicode(6) "&copy;" + [u"ª"]=> + unicode(6) "&ordf;" + [u"«"]=> + unicode(7) "&laquo;" + [u"¬"]=> + unicode(5) "&not;" + [u"­"]=> + unicode(5) "&shy;" + [u"®"]=> + unicode(5) "&reg;" + [u"¯"]=> + unicode(6) "&macr;" + [u"°"]=> + unicode(5) "&deg;" + [u"±"]=> + unicode(8) "&plusmn;" + [u"²"]=> + unicode(6) "&sup2;" + [u"³"]=> + unicode(6) "&sup3;" + [u"´"]=> + unicode(7) "&acute;" + [u"µ"]=> + unicode(7) "&micro;" + [u"¶"]=> + unicode(6) "&para;" + [u"·"]=> + unicode(8) "&middot;" + [u"¸"]=> + unicode(7) "&cedil;" + [u"¹"]=> + unicode(6) "&sup1;" + [u"º"]=> + unicode(6) "&ordm;" + [u"»"]=> + unicode(7) "&raquo;" + [u"¼"]=> + unicode(8) "&frac14;" + [u"½"]=> + unicode(8) "&frac12;" + [u"¾"]=> + unicode(8) "&frac34;" + [u"¿"]=> + unicode(8) "&iquest;" + [u"À"]=> + unicode(8) "&Agrave;" + [u"Á"]=> + unicode(8) "&Aacute;" + [u"Â"]=> + unicode(7) "&Acirc;" + [u"Ã"]=> + unicode(8) "&Atilde;" + [u"Ä"]=> + unicode(6) "&Auml;" + [u"Å"]=> + unicode(7) "&Aring;" + [u"Æ"]=> + unicode(7) "&AElig;" + [u"Ç"]=> + unicode(8) "&Ccedil;" + [u"È"]=> + unicode(8) "&Egrave;" + [u"É"]=> + unicode(8) "&Eacute;" + [u"Ê"]=> + unicode(7) "&Ecirc;" + [u"Ë"]=> + unicode(6) "&Euml;" + [u"Ì"]=> + unicode(8) "&Igrave;" + [u"Í"]=> + unicode(8) "&Iacute;" + [u"Î"]=> + unicode(7) "&Icirc;" + [u"Ï"]=> + unicode(6) "&Iuml;" + [u"Ð"]=> + unicode(5) "&ETH;" + [u"Ñ"]=> + unicode(8) "&Ntilde;" + [u"Ò"]=> + unicode(8) "&Ograve;" + [u"Ó"]=> + unicode(8) "&Oacute;" + [u"Ô"]=> + unicode(7) "&Ocirc;" + [u"Õ"]=> + unicode(8) "&Otilde;" + [u"Ö"]=> + unicode(6) "&Ouml;" + [u"×"]=> + unicode(7) "&times;" + [u"Ø"]=> + unicode(8) "&Oslash;" + [u"Ù"]=> + unicode(8) "&Ugrave;" + [u"Ú"]=> + unicode(8) "&Uacute;" + [u"Û"]=> + unicode(7) "&Ucirc;" + [u"Ü"]=> + unicode(6) "&Uuml;" + [u"Ý"]=> + unicode(8) "&Yacute;" + [u"Þ"]=> + unicode(7) "&THORN;" + [u"ß"]=> + unicode(7) "&szlig;" + [u"à"]=> + unicode(8) "&agrave;" + [u"á"]=> + unicode(8) "&aacute;" + [u"â"]=> + unicode(7) "&acirc;" + [u"ã"]=> + unicode(8) "&atilde;" + [u"ä"]=> + unicode(6) "&auml;" + [u"Ã¥"]=> + unicode(7) "&aring;" + [u"æ"]=> + unicode(7) "&aelig;" + [u"ç"]=> + unicode(8) "&ccedil;" + [u"è"]=> + unicode(8) "&egrave;" + [u"é"]=> + unicode(8) "&eacute;" + [u"ê"]=> + unicode(7) "&ecirc;" + [u"ë"]=> + unicode(6) "&euml;" + [u"ì"]=> + unicode(8) "&igrave;" + [u"í"]=> + unicode(8) "&iacute;" + [u"î"]=> + unicode(7) "&icirc;" + [u"ï"]=> + unicode(6) "&iuml;" + [u"ð"]=> + unicode(5) "&eth;" + [u"ñ"]=> + unicode(8) "&ntilde;" + [u"ò"]=> + unicode(8) "&ograve;" + [u"ó"]=> + unicode(8) "&oacute;" + [u"ô"]=> + unicode(7) "&ocirc;" + [u"õ"]=> + unicode(8) "&otilde;" + [u"ö"]=> + unicode(6) "&ouml;" + [u"÷"]=> + unicode(8) "&divide;" + [u"ø"]=> + unicode(8) "&oslash;" + [u"ù"]=> + unicode(8) "&ugrave;" + [u"ú"]=> + unicode(8) "&uacute;" + [u"û"]=> + unicode(7) "&ucirc;" + [u"ü"]=> + unicode(6) "&uuml;" + [u"ý"]=> + unicode(8) "&yacute;" + [u"þ"]=> + unicode(7) "&thorn;" + [u"ÿ"]=> + unicode(6) "&yuml;" + [u"Œ"]=> + unicode(7) "&OElig;" + [u"œ"]=> + unicode(7) "&oelig;" + [u"Å "]=> + unicode(8) "&Scaron;" + [u"Å¡"]=> + unicode(8) "&scaron;" + [u"Ÿ"]=> + unicode(6) "&Yuml;" + [u"ƒ"]=> + unicode(6) "&fnof;" + [u"ˆ"]=> + unicode(6) "&circ;" + [u"˜"]=> + unicode(7) "&tilde;" + [u"Α"]=> + unicode(7) "&Alpha;" + [u"Β"]=> + unicode(6) "&Beta;" + [u"Γ"]=> + unicode(7) "&Gamma;" + [u"Δ"]=> + unicode(7) "&Delta;" + [u"Ε"]=> + unicode(9) "&Epsilon;" + [u"Ζ"]=> + unicode(6) "&Zeta;" + [u"Η"]=> + unicode(5) "&Eta;" + [u"Θ"]=> + unicode(7) "&Theta;" + [u"Ι"]=> + unicode(6) "&Iota;" + [u"Κ"]=> + unicode(7) "&Kappa;" + [u"Λ"]=> + unicode(8) "&Lambda;" + [u"Μ"]=> + unicode(4) "&Mu;" + [u"Ν"]=> + unicode(4) "&Nu;" + [u"Ξ"]=> + unicode(4) "&Xi;" + [u"Ο"]=> + unicode(9) "&Omicron;" + [u"Π"]=> + unicode(4) "&Pi;" + [u"Ρ"]=> + unicode(5) "&Rho;" + [u"Σ"]=> + unicode(7) "&Sigma;" + [u"Τ"]=> + unicode(5) "&Tau;" + [u"Î¥"]=> + unicode(9) "&Upsilon;" + [u"Φ"]=> + unicode(5) "&Phi;" + [u"Χ"]=> + unicode(5) "&Chi;" + [u"Ψ"]=> + unicode(5) "&Psi;" + [u"Ω"]=> + unicode(7) "&Omega;" + [u"α"]=> + unicode(7) "&alpha;" + [u"β"]=> + unicode(6) "&beta;" + [u"γ"]=> + unicode(7) "&gamma;" + [u"δ"]=> + unicode(7) "&delta;" + [u"ε"]=> + unicode(9) "&epsilon;" + [u"ζ"]=> + unicode(6) "&zeta;" + [u"η"]=> + unicode(5) "&eta;" + [u"θ"]=> + unicode(7) "&theta;" + [u"ι"]=> + unicode(6) "&iota;" + [u"κ"]=> + unicode(7) "&kappa;" + [u"λ"]=> + unicode(8) "&lambda;" + [u"μ"]=> + unicode(4) "&mu;" + [u"ν"]=> + unicode(4) "&nu;" + [u"ξ"]=> + unicode(4) "&xi;" + [u"ο"]=> + unicode(9) "&omicron;" + [u"π"]=> + unicode(4) "&pi;" + [u"ρ"]=> + unicode(5) "&rho;" + [u"ς"]=> + unicode(8) "&sigmaf;" + [u"σ"]=> + unicode(7) "&sigma;" + [u"τ"]=> + unicode(5) "&tau;" + [u"υ"]=> + unicode(9) "&upsilon;" + [u"φ"]=> + unicode(5) "&phi;" + [u"χ"]=> + unicode(5) "&chi;" + [u"ψ"]=> + unicode(5) "&psi;" + [u"ω"]=> + unicode(7) "&omega;" + [u"ϑ"]=> + unicode(10) "&thetasym;" + [u"ϒ"]=> + unicode(7) "&upsih;" + [u"ϖ"]=> + unicode(5) "&piv;" + [u" "]=> + unicode(6) "&ensp;" + [u" "]=> + unicode(6) "&emsp;" + [u" "]=> + unicode(8) "&thinsp;" + [u"‌"]=> + unicode(6) "&zwnj;" + [u"‍"]=> + unicode(5) "&zwj;" + [u"‎"]=> + unicode(5) "&lrm;" + [u"‏"]=> + unicode(5) "&rlm;" + [u"–"]=> + unicode(7) "&ndash;" + [u"—"]=> + unicode(7) "&mdash;" + [u"‘"]=> + unicode(7) "&lsquo;" + [u"’"]=> + unicode(7) "&rsquo;" + [u"‚"]=> + unicode(7) "&sbquo;" + [u"“"]=> + unicode(7) "&ldquo;" + [u"”"]=> + unicode(7) "&rdquo;" + [u"„"]=> + unicode(7) "&bdquo;" + [u"†"]=> + unicode(8) "&dagger;" + [u"‡"]=> + unicode(8) "&Dagger;" + [u"•"]=> + unicode(6) "&bull;" + [u"…"]=> + unicode(8) "&hellip;" + [u"‰"]=> + unicode(8) "&permil;" + [u"′"]=> + unicode(7) "&prime;" + [u"″"]=> + unicode(7) "&Prime;" + [u"‹"]=> + unicode(8) "&lsaquo;" + [u"›"]=> + unicode(8) "&rsaquo;" + [u"‾"]=> + unicode(7) "&oline;" + [u"⁄"]=> + unicode(7) "&frasl;" + [u"€"]=> + unicode(6) "&euro;" + [u"ℑ"]=> + unicode(7) "&image;" + [u"℘"]=> + unicode(8) "&weierp;" + [u"ℜ"]=> + unicode(6) "&real;" + [u"™"]=> + unicode(7) "&trade;" + [u"ℵ"]=> + unicode(9) "&alefsym;" + [u"←"]=> + unicode(6) "&larr;" + [u"↑"]=> + unicode(6) "&uarr;" + [u"→"]=> + unicode(6) "&rarr;" + [u"↓"]=> + unicode(6) "&darr;" + [u"↔"]=> + unicode(6) "&harr;" + [u"↵"]=> + unicode(7) "&crarr;" + [u"⇐"]=> + unicode(6) "&lArr;" + [u"⇑"]=> + unicode(6) "&uArr;" + [u"⇒"]=> + unicode(6) "&rArr;" + [u"⇓"]=> + unicode(6) "&dArr;" + [u"⇔"]=> + unicode(6) "&hArr;" + [u"⇕"]=> + unicode(6) "&vArr;" + [u"⇚"]=> + unicode(7) "&lAarr;" + [u"⇛"]=> + unicode(7) "&rAarr;" + [u"⇝"]=> + unicode(7) "&rarrw;" + [u"∀"]=> + unicode(8) "&forall;" + [u"∁"]=> + unicode(6) "&comp;" + [u"∂"]=> + unicode(6) "&part;" + [u"∃"]=> + unicode(7) "&exist;" + [u"∄"]=> + unicode(8) "&nexist;" + [u"∅"]=> + unicode(7) "&empty;" + [u"∇"]=> + unicode(7) "&nabla;" + [u"∈"]=> + unicode(6) "&isin;" + [u"∉"]=> + unicode(7) "&notin;" + [u"∊"]=> + unicode(7) "&epsis;" + [u"∋"]=> + unicode(4) "&ni;" + [u"∌"]=> + unicode(7) "&notni;" + [u"∍"]=> + unicode(7) "&bepsi;" + [u"∏"]=> + unicode(6) "&prod;" + [u"∐"]=> + unicode(8) "&coprod;" + [u"∑"]=> + unicode(5) "&sum;" + [u"−"]=> + unicode(7) "&minus;" + [u"∓"]=> + unicode(8) "&mnplus;" + [u"∔"]=> + unicode(8) "&plusdo;" + [u"∖"]=> + unicode(7) "&setmn;" + [u"∗"]=> + unicode(8) "&lowast;" + [u"∘"]=> + unicode(8) "&compfn;" + [u"√"]=> + unicode(7) "&radic;" + [u"∝"]=> + unicode(6) "&prop;" + [u"∞"]=> + unicode(7) "&infin;" + [u"∟"]=> + unicode(7) "&ang90;" + [u"∠"]=> + unicode(5) "&ang;" + [u"∡"]=> + unicode(8) "&angmsd;" + [u"∢"]=> + unicode(8) "&angsph;" + [u"∣"]=> + unicode(5) "&mid;" + [u"∤"]=> + unicode(6) "&nmid;" + [u"∥"]=> + unicode(5) "&par;" + [u"∦"]=> + unicode(6) "&npar;" + [u"∧"]=> + unicode(5) "&and;" + [u"∨"]=> + unicode(4) "&or;" + [u"∩"]=> + unicode(5) "&cap;" + [u"∪"]=> + unicode(5) "&cup;" + [u"∫"]=> + unicode(5) "&int;" + [u"∮"]=> + unicode(8) "&conint;" + [u"∴"]=> + unicode(8) "&there4;" + [u"∵"]=> + unicode(8) "&becaus;" + [u"∼"]=> + unicode(5) "&sim;" + [u"∽"]=> + unicode(6) "&bsim;" + [u"≀"]=> + unicode(8) "&wreath;" + [u"≁"]=> + unicode(6) "&nsim;" + [u"≃"]=> + unicode(6) "&sime;" + [u"≄"]=> + unicode(7) "&nsime;" + [u"≅"]=> + unicode(6) "&cong;" + [u"≇"]=> + unicode(7) "&ncong;" + [u"≈"]=> + unicode(7) "&asymp;" + [u"≉"]=> + unicode(5) "&nap;" + [u"≊"]=> + unicode(5) "&ape;" + [u"≌"]=> + unicode(7) "&bcong;" + [u"≍"]=> + unicode(7) "&asymp;" + [u"≎"]=> + unicode(6) "&bump;" + [u"≏"]=> + unicode(7) "&bumpe;" + [u"≠"]=> + unicode(4) "&ne;" + [u"≡"]=> + unicode(7) "&equiv;" + [u"≤"]=> + unicode(4) "&le;" + [u"≥"]=> + unicode(4) "&ge;" + [u"≦"]=> + unicode(4) "&lE;" + [u"≧"]=> + unicode(4) "&gE;" + [u"≨"]=> + unicode(5) "&lnE;" + [u"≩"]=> + unicode(5) "&gnE;" + [u"≪"]=> + unicode(4) "&Lt;" + [u"≫"]=> + unicode(4) "&Gt;" + [u"≬"]=> + unicode(7) "&twixt;" + [u"≮"]=> + unicode(5) "&nlt;" + [u"≯"]=> + unicode(5) "&ngt;" + [u"≰"]=> + unicode(6) "&nles;" + [u"≱"]=> + unicode(6) "&nges;" + [u"≲"]=> + unicode(6) "&lsim;" + [u"≳"]=> + unicode(6) "&gsim;" + [u"≶"]=> + unicode(4) "&lg;" + [u"≷"]=> + unicode(4) "&gl;" + [u"≺"]=> + unicode(4) "&pr;" + [u"≻"]=> + unicode(4) "&sc;" + [u"≼"]=> + unicode(7) "&cupre;" + [u"≽"]=> + unicode(7) "&sscue;" + [u"≾"]=> + unicode(7) "&prsim;" + [u"≿"]=> + unicode(7) "&scsim;" + [u"⊀"]=> + unicode(5) "&npr;" + [u"⊁"]=> + unicode(5) "&nsc;" + [u"⊂"]=> + unicode(5) "&sub;" + [u"⊃"]=> + unicode(5) "&sup;" + [u"⊄"]=> + unicode(6) "&nsub;" + [u"⊅"]=> + unicode(6) "&nsup;" + [u"⊆"]=> + unicode(6) "&sube;" + [u"⊇"]=> + unicode(6) "&supe;" + [u"⊕"]=> + unicode(7) "&oplus;" + [u"⊗"]=> + unicode(8) "&otimes;" + [u"⊥"]=> + unicode(6) "&perp;" + [u"⋅"]=> + unicode(6) "&sdot;" + [u"⌈"]=> + unicode(7) "&lceil;" + [u"⌉"]=> + unicode(7) "&rceil;" + [u"⌊"]=> + unicode(8) "&lfloor;" + [u"⌋"]=> + unicode(8) "&rfloor;" + [u"〈"]=> + unicode(6) "&lang;" + [u"〉"]=> + unicode(6) "&rang;" + [u"◊"]=> + unicode(5) "&loz;" + [u"♠"]=> + unicode(8) "&spades;" + [u"♣"]=> + unicode(7) "&clubs;" + [u"♥"]=> + unicode(8) "&hearts;" + [u"♦"]=> + unicode(7) "&diams;" + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- with table = HTML_ENTITIES & quote_style = ENT_QUOTES -- +array(312) { + [u" "]=> + unicode(6) "&nbsp;" + [u"¡"]=> + unicode(7) "&iexcl;" + [u"¢"]=> + unicode(6) "&cent;" + [u"£"]=> + unicode(7) "&pound;" + [u"¤"]=> + unicode(8) "&curren;" + [u"Â¥"]=> + unicode(5) "&yen;" + [u"¦"]=> + unicode(8) "&brvbar;" + [u"§"]=> + unicode(6) "&sect;" + [u"¨"]=> + unicode(5) "&uml;" + [u"©"]=> + unicode(6) "&copy;" + [u"ª"]=> + unicode(6) "&ordf;" + [u"«"]=> + unicode(7) "&laquo;" + [u"¬"]=> + unicode(5) "&not;" + [u"­"]=> + unicode(5) "&shy;" + [u"®"]=> + unicode(5) "&reg;" + [u"¯"]=> + unicode(6) "&macr;" + [u"°"]=> + unicode(5) "&deg;" + [u"±"]=> + unicode(8) "&plusmn;" + [u"²"]=> + unicode(6) "&sup2;" + [u"³"]=> + unicode(6) "&sup3;" + [u"´"]=> + unicode(7) "&acute;" + [u"µ"]=> + unicode(7) "&micro;" + [u"¶"]=> + unicode(6) "&para;" + [u"·"]=> + unicode(8) "&middot;" + [u"¸"]=> + unicode(7) "&cedil;" + [u"¹"]=> + unicode(6) "&sup1;" + [u"º"]=> + unicode(6) "&ordm;" + [u"»"]=> + unicode(7) "&raquo;" + [u"¼"]=> + unicode(8) "&frac14;" + [u"½"]=> + unicode(8) "&frac12;" + [u"¾"]=> + unicode(8) "&frac34;" + [u"¿"]=> + unicode(8) "&iquest;" + [u"À"]=> + unicode(8) "&Agrave;" + [u"Á"]=> + unicode(8) "&Aacute;" + [u"Â"]=> + unicode(7) "&Acirc;" + [u"Ã"]=> + unicode(8) "&Atilde;" + [u"Ä"]=> + unicode(6) "&Auml;" + [u"Å"]=> + unicode(7) "&Aring;" + [u"Æ"]=> + unicode(7) "&AElig;" + [u"Ç"]=> + unicode(8) "&Ccedil;" + [u"È"]=> + unicode(8) "&Egrave;" + [u"É"]=> + unicode(8) "&Eacute;" + [u"Ê"]=> + unicode(7) "&Ecirc;" + [u"Ë"]=> + unicode(6) "&Euml;" + [u"Ì"]=> + unicode(8) "&Igrave;" + [u"Í"]=> + unicode(8) "&Iacute;" + [u"Î"]=> + unicode(7) "&Icirc;" + [u"Ï"]=> + unicode(6) "&Iuml;" + [u"Ð"]=> + unicode(5) "&ETH;" + [u"Ñ"]=> + unicode(8) "&Ntilde;" + [u"Ò"]=> + unicode(8) "&Ograve;" + [u"Ó"]=> + unicode(8) "&Oacute;" + [u"Ô"]=> + unicode(7) "&Ocirc;" + [u"Õ"]=> + unicode(8) "&Otilde;" + [u"Ö"]=> + unicode(6) "&Ouml;" + [u"×"]=> + unicode(7) "&times;" + [u"Ø"]=> + unicode(8) "&Oslash;" + [u"Ù"]=> + unicode(8) "&Ugrave;" + [u"Ú"]=> + unicode(8) "&Uacute;" + [u"Û"]=> + unicode(7) "&Ucirc;" + [u"Ü"]=> + unicode(6) "&Uuml;" + [u"Ý"]=> + unicode(8) "&Yacute;" + [u"Þ"]=> + unicode(7) "&THORN;" + [u"ß"]=> + unicode(7) "&szlig;" + [u"à"]=> + unicode(8) "&agrave;" + [u"á"]=> + unicode(8) "&aacute;" + [u"â"]=> + unicode(7) "&acirc;" + [u"ã"]=> + unicode(8) "&atilde;" + [u"ä"]=> + unicode(6) "&auml;" + [u"Ã¥"]=> + unicode(7) "&aring;" + [u"æ"]=> + unicode(7) "&aelig;" + [u"ç"]=> + unicode(8) "&ccedil;" + [u"è"]=> + unicode(8) "&egrave;" + [u"é"]=> + unicode(8) "&eacute;" + [u"ê"]=> + unicode(7) "&ecirc;" + [u"ë"]=> + unicode(6) "&euml;" + [u"ì"]=> + unicode(8) "&igrave;" + [u"í"]=> + unicode(8) "&iacute;" + [u"î"]=> + unicode(7) "&icirc;" + [u"ï"]=> + unicode(6) "&iuml;" + [u"ð"]=> + unicode(5) "&eth;" + [u"ñ"]=> + unicode(8) "&ntilde;" + [u"ò"]=> + unicode(8) "&ograve;" + [u"ó"]=> + unicode(8) "&oacute;" + [u"ô"]=> + unicode(7) "&ocirc;" + [u"õ"]=> + unicode(8) "&otilde;" + [u"ö"]=> + unicode(6) "&ouml;" + [u"÷"]=> + unicode(8) "&divide;" + [u"ø"]=> + unicode(8) "&oslash;" + [u"ù"]=> + unicode(8) "&ugrave;" + [u"ú"]=> + unicode(8) "&uacute;" + [u"û"]=> + unicode(7) "&ucirc;" + [u"ü"]=> + unicode(6) "&uuml;" + [u"ý"]=> + unicode(8) "&yacute;" + [u"þ"]=> + unicode(7) "&thorn;" + [u"ÿ"]=> + unicode(6) "&yuml;" + [u"Œ"]=> + unicode(7) "&OElig;" + [u"œ"]=> + unicode(7) "&oelig;" + [u"Å "]=> + unicode(8) "&Scaron;" + [u"Å¡"]=> + unicode(8) "&scaron;" + [u"Ÿ"]=> + unicode(6) "&Yuml;" + [u"ƒ"]=> + unicode(6) "&fnof;" + [u"ˆ"]=> + unicode(6) "&circ;" + [u"˜"]=> + unicode(7) "&tilde;" + [u"Α"]=> + unicode(7) "&Alpha;" + [u"Β"]=> + unicode(6) "&Beta;" + [u"Γ"]=> + unicode(7) "&Gamma;" + [u"Δ"]=> + unicode(7) "&Delta;" + [u"Ε"]=> + unicode(9) "&Epsilon;" + [u"Ζ"]=> + unicode(6) "&Zeta;" + [u"Η"]=> + unicode(5) "&Eta;" + [u"Θ"]=> + unicode(7) "&Theta;" + [u"Ι"]=> + unicode(6) "&Iota;" + [u"Κ"]=> + unicode(7) "&Kappa;" + [u"Λ"]=> + unicode(8) "&Lambda;" + [u"Μ"]=> + unicode(4) "&Mu;" + [u"Ν"]=> + unicode(4) "&Nu;" + [u"Ξ"]=> + unicode(4) "&Xi;" + [u"Ο"]=> + unicode(9) "&Omicron;" + [u"Π"]=> + unicode(4) "&Pi;" + [u"Ρ"]=> + unicode(5) "&Rho;" + [u"Σ"]=> + unicode(7) "&Sigma;" + [u"Τ"]=> + unicode(5) "&Tau;" + [u"Î¥"]=> + unicode(9) "&Upsilon;" + [u"Φ"]=> + unicode(5) "&Phi;" + [u"Χ"]=> + unicode(5) "&Chi;" + [u"Ψ"]=> + unicode(5) "&Psi;" + [u"Ω"]=> + unicode(7) "&Omega;" + [u"α"]=> + unicode(7) "&alpha;" + [u"β"]=> + unicode(6) "&beta;" + [u"γ"]=> + unicode(7) "&gamma;" + [u"δ"]=> + unicode(7) "&delta;" + [u"ε"]=> + unicode(9) "&epsilon;" + [u"ζ"]=> + unicode(6) "&zeta;" + [u"η"]=> + unicode(5) "&eta;" + [u"θ"]=> + unicode(7) "&theta;" + [u"ι"]=> + unicode(6) "&iota;" + [u"κ"]=> + unicode(7) "&kappa;" + [u"λ"]=> + unicode(8) "&lambda;" + [u"μ"]=> + unicode(4) "&mu;" + [u"ν"]=> + unicode(4) "&nu;" + [u"ξ"]=> + unicode(4) "&xi;" + [u"ο"]=> + unicode(9) "&omicron;" + [u"π"]=> + unicode(4) "&pi;" + [u"ρ"]=> + unicode(5) "&rho;" + [u"ς"]=> + unicode(8) "&sigmaf;" + [u"σ"]=> + unicode(7) "&sigma;" + [u"τ"]=> + unicode(5) "&tau;" + [u"υ"]=> + unicode(9) "&upsilon;" + [u"φ"]=> + unicode(5) "&phi;" + [u"χ"]=> + unicode(5) "&chi;" + [u"ψ"]=> + unicode(5) "&psi;" + [u"ω"]=> + unicode(7) "&omega;" + [u"ϑ"]=> + unicode(10) "&thetasym;" + [u"ϒ"]=> + unicode(7) "&upsih;" + [u"ϖ"]=> + unicode(5) "&piv;" + [u" "]=> + unicode(6) "&ensp;" + [u" "]=> + unicode(6) "&emsp;" + [u" "]=> + unicode(8) "&thinsp;" + [u"‌"]=> + unicode(6) "&zwnj;" + [u"‍"]=> + unicode(5) "&zwj;" + [u"‎"]=> + unicode(5) "&lrm;" + [u"‏"]=> + unicode(5) "&rlm;" + [u"–"]=> + unicode(7) "&ndash;" + [u"—"]=> + unicode(7) "&mdash;" + [u"‘"]=> + unicode(7) "&lsquo;" + [u"’"]=> + unicode(7) "&rsquo;" + [u"‚"]=> + unicode(7) "&sbquo;" + [u"“"]=> + unicode(7) "&ldquo;" + [u"”"]=> + unicode(7) "&rdquo;" + [u"„"]=> + unicode(7) "&bdquo;" + [u"†"]=> + unicode(8) "&dagger;" + [u"‡"]=> + unicode(8) "&Dagger;" + [u"•"]=> + unicode(6) "&bull;" + [u"…"]=> + unicode(8) "&hellip;" + [u"‰"]=> + unicode(8) "&permil;" + [u"′"]=> + unicode(7) "&prime;" + [u"″"]=> + unicode(7) "&Prime;" + [u"‹"]=> + unicode(8) "&lsaquo;" + [u"›"]=> + unicode(8) "&rsaquo;" + [u"‾"]=> + unicode(7) "&oline;" + [u"⁄"]=> + unicode(7) "&frasl;" + [u"€"]=> + unicode(6) "&euro;" + [u"ℑ"]=> + unicode(7) "&image;" + [u"℘"]=> + unicode(8) "&weierp;" + [u"ℜ"]=> + unicode(6) "&real;" + [u"™"]=> + unicode(7) "&trade;" + [u"ℵ"]=> + unicode(9) "&alefsym;" + [u"←"]=> + unicode(6) "&larr;" + [u"↑"]=> + unicode(6) "&uarr;" + [u"→"]=> + unicode(6) "&rarr;" + [u"↓"]=> + unicode(6) "&darr;" + [u"↔"]=> + unicode(6) "&harr;" + [u"↵"]=> + unicode(7) "&crarr;" + [u"⇐"]=> + unicode(6) "&lArr;" + [u"⇑"]=> + unicode(6) "&uArr;" + [u"⇒"]=> + unicode(6) "&rArr;" + [u"⇓"]=> + unicode(6) "&dArr;" + [u"⇔"]=> + unicode(6) "&hArr;" + [u"⇕"]=> + unicode(6) "&vArr;" + [u"⇚"]=> + unicode(7) "&lAarr;" + [u"⇛"]=> + unicode(7) "&rAarr;" + [u"⇝"]=> + unicode(7) "&rarrw;" + [u"∀"]=> + unicode(8) "&forall;" + [u"∁"]=> + unicode(6) "&comp;" + [u"∂"]=> + unicode(6) "&part;" + [u"∃"]=> + unicode(7) "&exist;" + [u"∄"]=> + unicode(8) "&nexist;" + [u"∅"]=> + unicode(7) "&empty;" + [u"∇"]=> + unicode(7) "&nabla;" + [u"∈"]=> + unicode(6) "&isin;" + [u"∉"]=> + unicode(7) "&notin;" + [u"∊"]=> + unicode(7) "&epsis;" + [u"∋"]=> + unicode(4) "&ni;" + [u"∌"]=> + unicode(7) "&notni;" + [u"∍"]=> + unicode(7) "&bepsi;" + [u"∏"]=> + unicode(6) "&prod;" + [u"∐"]=> + unicode(8) "&coprod;" + [u"∑"]=> + unicode(5) "&sum;" + [u"−"]=> + unicode(7) "&minus;" + [u"∓"]=> + unicode(8) "&mnplus;" + [u"∔"]=> + unicode(8) "&plusdo;" + [u"∖"]=> + unicode(7) "&setmn;" + [u"∗"]=> + unicode(8) "&lowast;" + [u"∘"]=> + unicode(8) "&compfn;" + [u"√"]=> + unicode(7) "&radic;" + [u"∝"]=> + unicode(6) "&prop;" + [u"∞"]=> + unicode(7) "&infin;" + [u"∟"]=> + unicode(7) "&ang90;" + [u"∠"]=> + unicode(5) "&ang;" + [u"∡"]=> + unicode(8) "&angmsd;" + [u"∢"]=> + unicode(8) "&angsph;" + [u"∣"]=> + unicode(5) "&mid;" + [u"∤"]=> + unicode(6) "&nmid;" + [u"∥"]=> + unicode(5) "&par;" + [u"∦"]=> + unicode(6) "&npar;" + [u"∧"]=> + unicode(5) "&and;" + [u"∨"]=> + unicode(4) "&or;" + [u"∩"]=> + unicode(5) "&cap;" + [u"∪"]=> + unicode(5) "&cup;" + [u"∫"]=> + unicode(5) "&int;" + [u"∮"]=> + unicode(8) "&conint;" + [u"∴"]=> + unicode(8) "&there4;" + [u"∵"]=> + unicode(8) "&becaus;" + [u"∼"]=> + unicode(5) "&sim;" + [u"∽"]=> + unicode(6) "&bsim;" + [u"≀"]=> + unicode(8) "&wreath;" + [u"≁"]=> + unicode(6) "&nsim;" + [u"≃"]=> + unicode(6) "&sime;" + [u"≄"]=> + unicode(7) "&nsime;" + [u"≅"]=> + unicode(6) "&cong;" + [u"≇"]=> + unicode(7) "&ncong;" + [u"≈"]=> + unicode(7) "&asymp;" + [u"≉"]=> + unicode(5) "&nap;" + [u"≊"]=> + unicode(5) "&ape;" + [u"≌"]=> + unicode(7) "&bcong;" + [u"≍"]=> + unicode(7) "&asymp;" + [u"≎"]=> + unicode(6) "&bump;" + [u"≏"]=> + unicode(7) "&bumpe;" + [u"≠"]=> + unicode(4) "&ne;" + [u"≡"]=> + unicode(7) "&equiv;" + [u"≤"]=> + unicode(4) "&le;" + [u"≥"]=> + unicode(4) "&ge;" + [u"≦"]=> + unicode(4) "&lE;" + [u"≧"]=> + unicode(4) "&gE;" + [u"≨"]=> + unicode(5) "&lnE;" + [u"≩"]=> + unicode(5) "&gnE;" + [u"≪"]=> + unicode(4) "&Lt;" + [u"≫"]=> + unicode(4) "&Gt;" + [u"≬"]=> + unicode(7) "&twixt;" + [u"≮"]=> + unicode(5) "&nlt;" + [u"≯"]=> + unicode(5) "&ngt;" + [u"≰"]=> + unicode(6) "&nles;" + [u"≱"]=> + unicode(6) "&nges;" + [u"≲"]=> + unicode(6) "&lsim;" + [u"≳"]=> + unicode(6) "&gsim;" + [u"≶"]=> + unicode(4) "&lg;" + [u"≷"]=> + unicode(4) "&gl;" + [u"≺"]=> + unicode(4) "&pr;" + [u"≻"]=> + unicode(4) "&sc;" + [u"≼"]=> + unicode(7) "&cupre;" + [u"≽"]=> + unicode(7) "&sscue;" + [u"≾"]=> + unicode(7) "&prsim;" + [u"≿"]=> + unicode(7) "&scsim;" + [u"⊀"]=> + unicode(5) "&npr;" + [u"⊁"]=> + unicode(5) "&nsc;" + [u"⊂"]=> + unicode(5) "&sub;" + [u"⊃"]=> + unicode(5) "&sup;" + [u"⊄"]=> + unicode(6) "&nsub;" + [u"⊅"]=> + unicode(6) "&nsup;" + [u"⊆"]=> + unicode(6) "&sube;" + [u"⊇"]=> + unicode(6) "&supe;" + [u"⊕"]=> + unicode(7) "&oplus;" + [u"⊗"]=> + unicode(8) "&otimes;" + [u"⊥"]=> + unicode(6) "&perp;" + [u"⋅"]=> + unicode(6) "&sdot;" + [u"⌈"]=> + unicode(7) "&lceil;" + [u"⌉"]=> + unicode(7) "&rceil;" + [u"⌊"]=> + unicode(8) "&lfloor;" + [u"⌋"]=> + unicode(8) "&rfloor;" + [u"〈"]=> + unicode(6) "&lang;" + [u"〉"]=> + unicode(6) "&rang;" + [u"◊"]=> + unicode(5) "&loz;" + [u"♠"]=> + unicode(8) "&spades;" + [u"♣"]=> + unicode(7) "&clubs;" + [u"♥"]=> + unicode(8) "&hearts;" + [u"♦"]=> + unicode(7) "&diams;" + [u"""]=> + unicode(6) "&quot;" + [u"'"]=> + unicode(5) "&#39;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/get_html_translation_table_basic3.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/strings/get_html_translation_table_basic3.phpt diff -u /dev/null php-src/ext/standard/tests/strings/get_html_translation_table_basic3.phpt:1.2 --- /dev/null Mon Oct 8 15:30:38 2007 +++ php-src/ext/standard/tests/strings/get_html_translation_table_basic3.phpt Mon Oct 8 15:30:37 2007 @@ -0,0 +1,867 @@ +--TEST-- +Test get_html_translation_table() function : basic functionality - table as HTML_ENTITIES & quote_style(ENT_NOQUOTES) +--SKIPIF-- +<?php +if( substr(PHP_OS, 0, 3) == "WIN"){ + die('skip Not for Windows'); +} + +if( ini_get("unicode.semantics") == "1") + die('skip do not run when unicode on'); + +if( !setlocale(LC_ALL, "en_US.UTF-8") ) { + die('skip failed to set locale settings to "en-US.UTF-8"'); +} +?> +--FILE-- +<?php +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) + * Description: Returns the internal translation table used by htmlspecialchars and htmlentities + * Source code: ext/standard/html.c +*/ + +/* Test get_html_translation_table() when table is specified as HTML_ENTITIES */ + +//set locale to en_US.UTF-8 +setlocale(LC_ALL, "en_US.UTF-8"); + +echo "*** Testing get_html_translation_table() : basic functionality ***\n"; + +echo "-- with table = HTML_ENTITIES & quote_style = ENT_NOQUOTES --\n"; +$table = HTML_ENTITIES; +$quote_style = ENT_NOQUOTES; +var_dump( get_html_translation_table($table, $quote_style) ); + + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing get_html_translation_table() : basic functionality *** +-- with table = HTML_ENTITIES & quote_style = ENT_NOQUOTES -- +array(99) { + [" "]=> + string(6) "&nbsp;" + ["¡"]=> + string(7) "&iexcl;" + ["¢"]=> + string(6) "&cent;" + ["£"]=> + string(7) "&pound;" + ["¤"]=> + string(8) "&curren;" + ["¥"]=> + string(5) "&yen;" + ["¦"]=> + string(8) "&brvbar;" + ["§"]=> + string(6) "&sect;" + ["¨"]=> + string(5) "&uml;" + ["©"]=> + string(6) "&copy;" + ["ª"]=> + string(6) "&ordf;" + ["«"]=> + string(7) "&laquo;" + ["¬"]=> + string(5) "&not;" + ["­"]=> + string(5) "&shy;" + ["®"]=> + string(5) "&reg;" + ["¯"]=> + string(6) "&macr;" + ["°"]=> + string(5) "&deg;" + ["±"]=> + string(8) "&plusmn;" + ["²"]=> + string(6) "&sup2;" + ["³"]=> + string(6) "&sup3;" + ["´"]=> + string(7) "&acute;" + ["µ"]=> + string(7) "&micro;" + ["¶"]=> + string(6) "&para;" + ["·"]=> + string(8) "&middot;" + ["¸"]=> + string(7) "&cedil;" + ["¹"]=> + string(6) "&sup1;" + ["º"]=> + string(6) "&ordm;" + ["»"]=> + string(7) "&raquo;" + ["¼"]=> + string(8) "&frac14;" + ["½"]=> + string(8) "&frac12;" + ["¾"]=> + string(8) "&frac34;" + ["¿"]=> + string(8) "&iquest;" + ["À"]=> + string(8) "&Agrave;" + ["Á"]=> + string(8) "&Aacute;" + ["Â"]=> + string(7) "&Acirc;" + ["Ã"]=> + string(8) "&Atilde;" + ["Ä"]=> + string(6) "&Auml;" + ["Å"]=> + string(7) "&Aring;" + ["Æ"]=> + string(7) "&AElig;" + ["Ç"]=> + string(8) "&Ccedil;" + ["È"]=> + string(8) "&Egrave;" + ["É"]=> + string(8) "&Eacute;" + ["Ê"]=> + string(7) "&Ecirc;" + ["Ë"]=> + string(6) "&Euml;" + ["Ì"]=> + string(8) "&Igrave;" + ["Í"]=> + string(8) "&Iacute;" + ["Î"]=> + string(7) "&Icirc;" + ["Ï"]=> + string(6) "&Iuml;" + ["Ð"]=> + string(5) "&ETH;" + ["Ñ"]=> + string(8) "&Ntilde;" + ["Ò"]=> + string(8) "&Ograve;" + ["Ó"]=> + string(8) "&Oacute;" + ["Ô"]=> + string(7) "&Ocirc;" + ["Õ"]=> + string(8) "&Otilde;" + ["Ö"]=> + string(6) "&Ouml;" + ["×"]=> + string(7) "&times;" + ["Ø"]=> + string(8) "&Oslash;" + ["Ù"]=> + string(8) "&Ugrave;" + ["Ú"]=> + string(8) "&Uacute;" + ["Û"]=> + string(7) "&Ucirc;" + ["Ü"]=> + string(6) "&Uuml;" + ["Ý"]=> + string(8) "&Yacute;" + ["Þ"]=> + string(7) "&THORN;" + ["ß"]=> + string(7) "&szlig;" + ["à"]=> + string(8) "&agrave;" + ["á"]=> + string(8) "&aacute;" + ["â"]=> + string(7) "&acirc;" + ["ã"]=> + string(8) "&atilde;" + ["ä"]=> + string(6) "&auml;" + ["å"]=> + string(7) "&aring;" + ["æ"]=> + string(7) "&aelig;" + ["ç"]=> + string(8) "&ccedil;" + ["è"]=> + string(8) "&egrave;" + ["é"]=> + string(8) "&eacute;" + ["ê"]=> + string(7) "&ecirc;" + ["ë"]=> + string(6) "&euml;" + ["ì"]=> + string(8) "&igrave;" + ["í"]=> + string(8) "&iacute;" + ["î"]=> + string(7) "&icirc;" + ["ï"]=> + string(6) "&iuml;" + ["ð"]=> + string(5) "&eth;" + ["ñ"]=> + string(8) "&ntilde;" + ["ò"]=> + string(8) "&ograve;" + ["ó"]=> + string(8) "&oacute;" + ["ô"]=> + string(7) "&ocirc;" + ["õ"]=> + string(8) "&otilde;" + ["ö"]=> + string(6) "&ouml;" + ["÷"]=> + string(8) "&divide;" + ["ø"]=> + string(8) "&oslash;" + ["ù"]=> + string(8) "&ugrave;" + ["ú"]=> + string(8) "&uacute;" + ["û"]=> + string(7) "&ucirc;" + ["ü"]=> + string(6) "&uuml;" + ["ý"]=> + string(8) "&yacute;" + ["þ"]=> + string(7) "&thorn;" + ["ÿ"]=> + string(6) "&yuml;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +Done +--UEXPECTF-- +*** Testing get_html_translation_table() : basic functionality *** +-- with table = HTML_ENTITIES & quote_style = ENT_NOQUOTES -- +array(310) { + [u" "]=> + unicode(6) "&nbsp;" + [u"¡"]=> + unicode(7) "&iexcl;" + [u"¢"]=> + unicode(6) "&cent;" + [u"£"]=> + unicode(7) "&pound;" + [u"¤"]=> + unicode(8) "&curren;" + [u"Â¥"]=> + unicode(5) "&yen;" + [u"¦"]=> + unicode(8) "&brvbar;" + [u"§"]=> + unicode(6) "&sect;" + [u"¨"]=> + unicode(5) "&uml;" + [u"©"]=> + unicode(6) "&copy;" + [u"ª"]=> + unicode(6) "&ordf;" + [u"«"]=> + unicode(7) "&laquo;" + [u"¬"]=> + unicode(5) "&not;" + [u"­"]=> + unicode(5) "&shy;" + [u"®"]=> + unicode(5) "&reg;" + [u"¯"]=> + unicode(6) "&macr;" + [u"°"]=> + unicode(5) "&deg;" + [u"±"]=> + unicode(8) "&plusmn;" + [u"²"]=> + unicode(6) "&sup2;" + [u"³"]=> + unicode(6) "&sup3;" + [u"´"]=> + unicode(7) "&acute;" + [u"µ"]=> + unicode(7) "&micro;" + [u"¶"]=> + unicode(6) "&para;" + [u"·"]=> + unicode(8) "&middot;" + [u"¸"]=> + unicode(7) "&cedil;" + [u"¹"]=> + unicode(6) "&sup1;" + [u"º"]=> + unicode(6) "&ordm;" + [u"»"]=> + unicode(7) "&raquo;" + [u"¼"]=> + unicode(8) "&frac14;" + [u"½"]=> + unicode(8) "&frac12;" + [u"¾"]=> + unicode(8) "&frac34;" + [u"¿"]=> + unicode(8) "&iquest;" + [u"À"]=> + unicode(8) "&Agrave;" + [u"Á"]=> + unicode(8) "&Aacute;" + [u"Â"]=> + unicode(7) "&Acirc;" + [u"Ã"]=> + unicode(8) "&Atilde;" + [u"Ä"]=> + unicode(6) "&Auml;" + [u"Å"]=> + unicode(7) "&Aring;" + [u"Æ"]=> + unicode(7) "&AElig;" + [u"Ç"]=> + unicode(8) "&Ccedil;" + [u"È"]=> + unicode(8) "&Egrave;" + [u"É"]=> + unicode(8) "&Eacute;" + [u"Ê"]=> + unicode(7) "&Ecirc;" + [u"Ë"]=> + unicode(6) "&Euml;" + [u"Ì"]=> + unicode(8) "&Igrave;" + [u"Í"]=> + unicode(8) "&Iacute;" + [u"Î"]=> + unicode(7) "&Icirc;" + [u"Ï"]=> + unicode(6) "&Iuml;" + [u"Ð"]=> + unicode(5) "&ETH;" + [u"Ñ"]=> + unicode(8) "&Ntilde;" + [u"Ò"]=> + unicode(8) "&Ograve;" + [u"Ó"]=> + unicode(8) "&Oacute;" + [u"Ô"]=> + unicode(7) "&Ocirc;" + [u"Õ"]=> + unicode(8) "&Otilde;" + [u"Ö"]=> + unicode(6) "&Ouml;" + [u"×"]=> + unicode(7) "&times;" + [u"Ø"]=> + unicode(8) "&Oslash;" + [u"Ù"]=> + unicode(8) "&Ugrave;" + [u"Ú"]=> + unicode(8) "&Uacute;" + [u"Û"]=> + unicode(7) "&Ucirc;" + [u"Ü"]=> + unicode(6) "&Uuml;" + [u"Ý"]=> + unicode(8) "&Yacute;" + [u"Þ"]=> + unicode(7) "&THORN;" + [u"ß"]=> + unicode(7) "&szlig;" + [u"à"]=> + unicode(8) "&agrave;" + [u"á"]=> + unicode(8) "&aacute;" + [u"â"]=> + unicode(7) "&acirc;" + [u"ã"]=> + unicode(8) "&atilde;" + [u"ä"]=> + unicode(6) "&auml;" + [u"Ã¥"]=> + unicode(7) "&aring;" + [u"æ"]=> + unicode(7) "&aelig;" + [u"ç"]=> + unicode(8) "&ccedil;" + [u"è"]=> + unicode(8) "&egrave;" + [u"é"]=> + unicode(8) "&eacute;" + [u"ê"]=> + unicode(7) "&ecirc;" + [u"ë"]=> + unicode(6) "&euml;" + [u"ì"]=> + unicode(8) "&igrave;" + [u"í"]=> + unicode(8) "&iacute;" + [u"î"]=> + unicode(7) "&icirc;" + [u"ï"]=> + unicode(6) "&iuml;" + [u"ð"]=> + unicode(5) "&eth;" + [u"ñ"]=> + unicode(8) "&ntilde;" + [u"ò"]=> + unicode(8) "&ograve;" + [u"ó"]=> + unicode(8) "&oacute;" + [u"ô"]=> + unicode(7) "&ocirc;" + [u"õ"]=> + unicode(8) "&otilde;" + [u"ö"]=> + unicode(6) "&ouml;" + [u"÷"]=> + unicode(8) "&divide;" + [u"ø"]=> + unicode(8) "&oslash;" + [u"ù"]=> + unicode(8) "&ugrave;" + [u"ú"]=> + unicode(8) "&uacute;" + [u"û"]=> + unicode(7) "&ucirc;" + [u"ü"]=> + unicode(6) "&uuml;" + [u"ý"]=> + unicode(8) "&yacute;" + [u"þ"]=> + unicode(7) "&thorn;" + [u"ÿ"]=> + unicode(6) "&yuml;" + [u"Œ"]=> + unicode(7) "&OElig;" + [u"œ"]=> + unicode(7) "&oelig;" + [u"Å "]=> + unicode(8) "&Scaron;" + [u"Å¡"]=> + unicode(8) "&scaron;" + [u"Ÿ"]=> + unicode(6) "&Yuml;" + [u"ƒ"]=> + unicode(6) "&fnof;" + [u"ˆ"]=> + unicode(6) "&circ;" + [u"˜"]=> + unicode(7) "&tilde;" + [u"Α"]=> + unicode(7) "&Alpha;" + [u"Β"]=> + unicode(6) "&Beta;" + [u"Γ"]=> + unicode(7) "&Gamma;" + [u"Δ"]=> + unicode(7) "&Delta;" + [u"Ε"]=> + unicode(9) "&Epsilon;" + [u"Ζ"]=> + unicode(6) "&Zeta;" + [u"Η"]=> + unicode(5) "&Eta;" + [u"Θ"]=> + unicode(7) "&Theta;" + [u"Ι"]=> + unicode(6) "&Iota;" + [u"Κ"]=> + unicode(7) "&Kappa;" + [u"Λ"]=> + unicode(8) "&Lambda;" + [u"Μ"]=> + unicode(4) "&Mu;" + [u"Ν"]=> + unicode(4) "&Nu;" + [u"Ξ"]=> + unicode(4) "&Xi;" + [u"Ο"]=> + unicode(9) "&Omicron;" + [u"Π"]=> + unicode(4) "&Pi;" + [u"Ρ"]=> + unicode(5) "&Rho;" + [u"Σ"]=> + unicode(7) "&Sigma;" + [u"Τ"]=> + unicode(5) "&Tau;" + [u"Î¥"]=> + unicode(9) "&Upsilon;" + [u"Φ"]=> + unicode(5) "&Phi;" + [u"Χ"]=> + unicode(5) "&Chi;" + [u"Ψ"]=> + unicode(5) "&Psi;" + [u"Ω"]=> + unicode(7) "&Omega;" + [u"α"]=> + unicode(7) "&alpha;" + [u"β"]=> + unicode(6) "&beta;" + [u"γ"]=> + unicode(7) "&gamma;" + [u"δ"]=> + unicode(7) "&delta;" + [u"ε"]=> + unicode(9) "&epsilon;" + [u"ζ"]=> + unicode(6) "&zeta;" + [u"η"]=> + unicode(5) "&eta;" + [u"θ"]=> + unicode(7) "&theta;" + [u"ι"]=> + unicode(6) "&iota;" + [u"κ"]=> + unicode(7) "&kappa;" + [u"λ"]=> + unicode(8) "&lambda;" + [u"μ"]=> + unicode(4) "&mu;" + [u"ν"]=> + unicode(4) "&nu;" + [u"ξ"]=> + unicode(4) "&xi;" + [u"ο"]=> + unicode(9) "&omicron;" + [u"π"]=> + unicode(4) "&pi;" + [u"ρ"]=> + unicode(5) "&rho;" + [u"ς"]=> + unicode(8) "&sigmaf;" + [u"σ"]=> + unicode(7) "&sigma;" + [u"τ"]=> + unicode(5) "&tau;" + [u"υ"]=> + unicode(9) "&upsilon;" + [u"φ"]=> + unicode(5) "&phi;" + [u"χ"]=> + unicode(5) "&chi;" + [u"ψ"]=> + unicode(5) "&psi;" + [u"ω"]=> + unicode(7) "&omega;" + [u"ϑ"]=> + unicode(10) "&thetasym;" + [u"ϒ"]=> + unicode(7) "&upsih;" + [u"ϖ"]=> + unicode(5) "&piv;" + [u" "]=> + unicode(6) "&ensp;" + [u" "]=> + unicode(6) "&emsp;" + [u" "]=> + unicode(8) "&thinsp;" + [u"‌"]=> + unicode(6) "&zwnj;" + [u"‍"]=> + unicode(5) "&zwj;" + [u"‎"]=> + unicode(5) "&lrm;" + [u"‏"]=> + unicode(5) "&rlm;" + [u"–"]=> + unicode(7) "&ndash;" + [u"—"]=> + unicode(7) "&mdash;" + [u"‘"]=> + unicode(7) "&lsquo;" + [u"’"]=> + unicode(7) "&rsquo;" + [u"‚"]=> + unicode(7) "&sbquo;" + [u"“"]=> + unicode(7) "&ldquo;" + [u"”"]=> + unicode(7) "&rdquo;" + [u"„"]=> + unicode(7) "&bdquo;" + [u"†"]=> + unicode(8) "&dagger;" + [u"‡"]=> + unicode(8) "&Dagger;" + [u"•"]=> + unicode(6) "&bull;" + [u"…"]=> + unicode(8) "&hellip;" + [u"‰"]=> + unicode(8) "&permil;" + [u"′"]=> + unicode(7) "&prime;" + [u"″"]=> + unicode(7) "&Prime;" + [u"‹"]=> + unicode(8) "&lsaquo;" + [u"›"]=> + unicode(8) "&rsaquo;" + [u"‾"]=> + unicode(7) "&oline;" + [u"⁄"]=> + unicode(7) "&frasl;" + [u"€"]=> + unicode(6) "&euro;" + [u"ℑ"]=> + unicode(7) "&image;" + [u"℘"]=> + unicode(8) "&weierp;" + [u"ℜ"]=> + unicode(6) "&real;" + [u"™"]=> + unicode(7) "&trade;" + [u"ℵ"]=> + unicode(9) "&alefsym;" + [u"←"]=> + unicode(6) "&larr;" + [u"↑"]=> + unicode(6) "&uarr;" + [u"→"]=> + unicode(6) "&rarr;" + [u"↓"]=> + unicode(6) "&darr;" + [u"↔"]=> + unicode(6) "&harr;" + [u"↵"]=> + unicode(7) "&crarr;" + [u"⇐"]=> + unicode(6) "&lArr;" + [u"⇑"]=> + unicode(6) "&uArr;" + [u"⇒"]=> + unicode(6) "&rArr;" + [u"⇓"]=> + unicode(6) "&dArr;" + [u"⇔"]=> + unicode(6) "&hArr;" + [u"⇕"]=> + unicode(6) "&vArr;" + [u"⇚"]=> + unicode(7) "&lAarr;" + [u"⇛"]=> + unicode(7) "&rAarr;" + [u"⇝"]=> + unicode(7) "&rarrw;" + [u"∀"]=> + unicode(8) "&forall;" + [u"∁"]=> + unicode(6) "&comp;" + [u"∂"]=> + unicode(6) "&part;" + [u"∃"]=> + unicode(7) "&exist;" + [u"∄"]=> + unicode(8) "&nexist;" + [u"∅"]=> + unicode(7) "&empty;" + [u"∇"]=> + unicode(7) "&nabla;" + [u"∈"]=> + unicode(6) "&isin;" + [u"∉"]=> + unicode(7) "&notin;" + [u"∊"]=> + unicode(7) "&epsis;" + [u"∋"]=> + unicode(4) "&ni;" + [u"∌"]=> + unicode(7) "&notni;" + [u"∍"]=> + unicode(7) "&bepsi;" + [u"∏"]=> + unicode(6) "&prod;" + [u"∐"]=> + unicode(8) "&coprod;" + [u"∑"]=> + unicode(5) "&sum;" + [u"−"]=> + unicode(7) "&minus;" + [u"∓"]=> + unicode(8) "&mnplus;" + [u"∔"]=> + unicode(8) "&plusdo;" + [u"∖"]=> + unicode(7) "&setmn;" + [u"∗"]=> + unicode(8) "&lowast;" + [u"∘"]=> + unicode(8) "&compfn;" + [u"√"]=> + unicode(7) "&radic;" + [u"∝"]=> + unicode(6) "&prop;" + [u"∞"]=> + unicode(7) "&infin;" + [u"∟"]=> + unicode(7) "&ang90;" + [u"∠"]=> + unicode(5) "&ang;" + [u"∡"]=> + unicode(8) "&angmsd;" + [u"∢"]=> + unicode(8) "&angsph;" + [u"∣"]=> + unicode(5) "&mid;" + [u"∤"]=> + unicode(6) "&nmid;" + [u"∥"]=> + unicode(5) "&par;" + [u"∦"]=> + unicode(6) "&npar;" + [u"∧"]=> + unicode(5) "&and;" + [u"∨"]=> + unicode(4) "&or;" + [u"∩"]=> + unicode(5) "&cap;" + [u"∪"]=> + unicode(5) "&cup;" + [u"∫"]=> + unicode(5) "&int;" + [u"∮"]=> + unicode(8) "&conint;" + [u"∴"]=> + unicode(8) "&there4;" + [u"∵"]=> + unicode(8) "&becaus;" + [u"∼"]=> + unicode(5) "&sim;" + [u"∽"]=> + unicode(6) "&bsim;" + [u"≀"]=> + unicode(8) "&wreath;" + [u"≁"]=> + unicode(6) "&nsim;" + [u"≃"]=> + unicode(6) "&sime;" + [u"≄"]=> + unicode(7) "&nsime;" + [u"≅"]=> + unicode(6) "&cong;" + [u"≇"]=> + unicode(7) "&ncong;" + [u"≈"]=> + unicode(7) "&asymp;" + [u"≉"]=> + unicode(5) "&nap;" + [u"≊"]=> + unicode(5) "&ape;" + [u"≌"]=> + unicode(7) "&bcong;" + [u"≍"]=> + unicode(7) "&asymp;" + [u"≎"]=> + unicode(6) "&bump;" + [u"≏"]=> + unicode(7) "&bumpe;" + [u"≠"]=> + unicode(4) "&ne;" + [u"≡"]=> + unicode(7) "&equiv;" + [u"≤"]=> + unicode(4) "&le;" + [u"≥"]=> + unicode(4) "&ge;" + [u"≦"]=> + unicode(4) "&lE;" + [u"≧"]=> + unicode(4) "&gE;" + [u"≨"]=> + unicode(5) "&lnE;" + [u"≩"]=> + unicode(5) "&gnE;" + [u"≪"]=> + unicode(4) "&Lt;" + [u"≫"]=> + unicode(4) "&Gt;" + [u"≬"]=> + unicode(7) "&twixt;" + [u"≮"]=> + unicode(5) "&nlt;" + [u"≯"]=> + unicode(5) "&ngt;" + [u"≰"]=> + unicode(6) "&nles;" + [u"≱"]=> + unicode(6) "&nges;" + [u"≲"]=> + unicode(6) "&lsim;" + [u"≳"]=> + unicode(6) "&gsim;" + [u"≶"]=> + unicode(4) "&lg;" + [u"≷"]=> + unicode(4) "&gl;" + [u"≺"]=> + unicode(4) "&pr;" + [u"≻"]=> + unicode(4) "&sc;" + [u"≼"]=> + unicode(7) "&cupre;" + [u"≽"]=> + unicode(7) "&sscue;" + [u"≾"]=> + unicode(7) "&prsim;" + [u"≿"]=> + unicode(7) "&scsim;" + [u"⊀"]=> + unicode(5) "&npr;" + [u"⊁"]=> + unicode(5) "&nsc;" + [u"⊂"]=> + unicode(5) "&sub;" + [u"⊃"]=> + unicode(5) "&sup;" + [u"⊄"]=> + unicode(6) "&nsub;" + [u"⊅"]=> + unicode(6) "&nsup;" + [u"⊆"]=> + unicode(6) "&sube;" + [u"⊇"]=> + unicode(6) "&supe;" + [u"⊕"]=> + unicode(7) "&oplus;" + [u"⊗"]=> + unicode(8) "&otimes;" + [u"⊥"]=> + unicode(6) "&perp;" + [u"⋅"]=> + unicode(6) "&sdot;" + [u"⌈"]=> + unicode(7) "&lceil;" + [u"⌉"]=> + unicode(7) "&rceil;" + [u"⌊"]=> + unicode(8) "&lfloor;" + [u"⌋"]=> + unicode(8) "&rfloor;" + [u"〈"]=> + unicode(6) "&lang;" + [u"〉"]=> + unicode(6) "&rang;" + [u"◊"]=> + unicode(5) "&loz;" + [u"♠"]=> + unicode(8) "&spades;" + [u"♣"]=> + unicode(7) "&clubs;" + [u"♥"]=> + unicode(8) "&hearts;" + [u"♦"]=> + unicode(7) "&diams;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/get_html_translation_table_variation1-win32.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/strings/get_html_translation_table_variation1-win32.phpt diff -u /dev/null php-src/ext/standard/tests/strings/get_html_translation_table_variation1-win32.phpt:1.2 --- /dev/null Mon Oct 8 15:30:38 2007 +++ php-src/ext/standard/tests/strings/get_html_translation_table_variation1-win32.phpt Mon Oct 8 15:30:37 2007 @@ -0,0 +1,2127 @@ +--TEST-- +Test get_html_translation_table() function : usage variations - unexpected table values +--SKIPIF-- +<?php +if( substr(PHP_OS, 0, 3) != "WIN"){ + die('skip only for Windows'); +} + +if( ini_get("unicode.semantics") == "1") + die('skip do not run when unicode on'); + +if( !setlocale(LC_ALL, "English_United States.1252") ) { + die('skip failed to set locale settings to "English_United States.1252"'); +} +?> +--FILE-- +<?php +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) + * Description: Returns the internal translation table used by htmlspecialchars and htmlentities + * Source code: ext/standard/html.c +*/ + +/* + * test get_html_translation_table() with unexpected value for argument $table +*/ + +//set locale +setlocale(LC_ALL, "English_United States.1252"); + +echo "*** Testing get_html_translation_table() : usage variations ***\n"; +// initialize all required variables +$quote_style = ENT_COMPAT; + +// get an unset variable +$unset_var = 10; +unset($unset_var); + +// a resource variable +$fp = fopen(__FILE__, "r"); + +// array with different values +$values = array ( + + // array values + array(), + array(0), + array(1), + array(1, 2), + array('color' => 'red', 'item' => 'pen'), + + // boolean values + true, + FALSE, + + // string values + "string", + 'string', + + // objects + new stdclass(), + + // empty string + "", + '', + + // null vlaues + NULL, + null, + + // resource var + $fp, + + // undefined variable + @$undefined_var, + + // unset variable + @$unset_var +); + + +// loop through each element of the array and check the working of get_html_translation_table() +// when $table arugment is supplied with different values +echo "\n--- Testing get_html_translation_table() by supplying different values for 'table' argument ---\n"; +$counter = 1; +for($index = 0; $index < count($values); $index ++) { + echo "-- Iteration $counter --\n"; + $table = $values [$index]; + + var_dump( get_html_translation_table($table) ); + var_dump( get_html_translation_table($table, $quote_style) ); + + $counter ++; +} + +// close resource +fclose($fp); + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing get_html_translation_table() : usage variations *** + +--- Testing get_html_translation_table() by supplying different values for 'table' argument --- +-- Iteration 1 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 2 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 3 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 4 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 5 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 6 -- +array(100) { + [" "]=> + string(6) "&nbsp;" + ["¡"]=> + string(7) "&iexcl;" + ["¢"]=> + string(6) "&cent;" + ["£"]=> + string(7) "&pound;" + ["¤"]=> + string(8) "&curren;" + ["¥"]=> + string(5) "&yen;" + ["¦"]=> + string(8) "&brvbar;" + ["§"]=> + string(6) "&sect;" + ["¨"]=> + string(5) "&uml;" + ["©"]=> + string(6) "&copy;" + ["ª"]=> + string(6) "&ordf;" + ["«"]=> + string(7) "&laquo;" + ["¬"]=> + string(5) "&not;" + ["­"]=> + string(5) "&shy;" + ["®"]=> + string(5) "&reg;" + ["¯"]=> + string(6) "&macr;" + ["°"]=> + string(5) "&deg;" + ["±"]=> + string(8) "&plusmn;" + ["²"]=> + string(6) "&sup2;" + ["³"]=> + string(6) "&sup3;" + ["´"]=> + string(7) "&acute;" + ["µ"]=> + string(7) "&micro;" + ["¶"]=> + string(6) "&para;" + ["·"]=> + string(8) "&middot;" + ["¸"]=> + string(7) "&cedil;" + ["¹"]=> + string(6) "&sup1;" + ["º"]=> + string(6) "&ordm;" + ["»"]=> + string(7) "&raquo;" + ["¼"]=> + string(8) "&frac14;" + ["½"]=> + string(8) "&frac12;" + ["¾"]=> + string(8) "&frac34;" + ["¿"]=> + string(8) "&iquest;" + ["À"]=> + string(8) "&Agrave;" + ["Á"]=> + string(8) "&Aacute;" + ["Â"]=> + string(7) "&Acirc;" + ["Ã"]=> + string(8) "&Atilde;" + ["Ä"]=> + string(6) "&Auml;" + ["Å"]=> + string(7) "&Aring;" + ["Æ"]=> + string(7) "&AElig;" + ["Ç"]=> + string(8) "&Ccedil;" + ["È"]=> + string(8) "&Egrave;" + ["É"]=> + string(8) "&Eacute;" + ["Ê"]=> + string(7) "&Ecirc;" + ["Ë"]=> + string(6) "&Euml;" + ["Ì"]=> + string(8) "&Igrave;" + ["Í"]=> + string(8) "&Iacute;" + ["Î"]=> + string(7) "&Icirc;" + ["Ï"]=> + string(6) "&Iuml;" + ["Ð"]=> + string(5) "&ETH;" + ["Ñ"]=> + string(8) "&Ntilde;" + ["Ò"]=> + string(8) "&Ograve;" + ["Ó"]=> + string(8) "&Oacute;" + ["Ô"]=> + string(7) "&Ocirc;" + ["Õ"]=> + string(8) "&Otilde;" + ["Ö"]=> + string(6) "&Ouml;" + ["×"]=> + string(7) "&times;" + ["Ø"]=> + string(8) "&Oslash;" + ["Ù"]=> + string(8) "&Ugrave;" + ["Ú"]=> + string(8) "&Uacute;" + ["Û"]=> + string(7) "&Ucirc;" + ["Ü"]=> + string(6) "&Uuml;" + ["Ý"]=> + string(8) "&Yacute;" + ["Þ"]=> + string(7) "&THORN;" + ["ß"]=> + string(7) "&szlig;" + ["à"]=> + string(8) "&agrave;" + ["á"]=> + string(8) "&aacute;" + ["â"]=> + string(7) "&acirc;" + ["ã"]=> + string(8) "&atilde;" + ["ä"]=> + string(6) "&auml;" + ["å"]=> + string(7) "&aring;" + ["æ"]=> + string(7) "&aelig;" + ["ç"]=> + string(8) "&ccedil;" + ["è"]=> + string(8) "&egrave;" + ["é"]=> + string(8) "&eacute;" + ["ê"]=> + string(7) "&ecirc;" + ["ë"]=> + string(6) "&euml;" + ["ì"]=> + string(8) "&igrave;" + ["í"]=> + string(8) "&iacute;" + ["î"]=> + string(7) "&icirc;" + ["ï"]=> + string(6) "&iuml;" + ["ð"]=> + string(5) "&eth;" + ["ñ"]=> + string(8) "&ntilde;" + ["ò"]=> + string(8) "&ograve;" + ["ó"]=> + string(8) "&oacute;" + ["ô"]=> + string(7) "&ocirc;" + ["õ"]=> + string(8) "&otilde;" + ["ö"]=> + string(6) "&ouml;" + ["÷"]=> + string(8) "&divide;" + ["ø"]=> + string(8) "&oslash;" + ["ù"]=> + string(8) "&ugrave;" + ["ú"]=> + string(8) "&uacute;" + ["û"]=> + string(7) "&ucirc;" + ["ü"]=> + string(6) "&uuml;" + ["ý"]=> + string(8) "&yacute;" + ["þ"]=> + string(7) "&thorn;" + ["ÿ"]=> + string(6) "&yuml;" + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +array(100) { + [" "]=> + string(6) "&nbsp;" + ["¡"]=> + string(7) "&iexcl;" + ["¢"]=> + string(6) "&cent;" + ["£"]=> + string(7) "&pound;" + ["¤"]=> + string(8) "&curren;" + ["¥"]=> + string(5) "&yen;" + ["¦"]=> + string(8) "&brvbar;" + ["§"]=> + string(6) "&sect;" + ["¨"]=> + string(5) "&uml;" + ["©"]=> + string(6) "&copy;" + ["ª"]=> + string(6) "&ordf;" + ["«"]=> + string(7) "&laquo;" + ["¬"]=> + string(5) "&not;" + ["­"]=> + string(5) "&shy;" + ["®"]=> + string(5) "&reg;" + ["¯"]=> + string(6) "&macr;" + ["°"]=> + string(5) "&deg;" + ["±"]=> + string(8) "&plusmn;" + ["²"]=> + string(6) "&sup2;" + ["³"]=> + string(6) "&sup3;" + ["´"]=> + string(7) "&acute;" + ["µ"]=> + string(7) "&micro;" + ["¶"]=> + string(6) "&para;" + ["·"]=> + string(8) "&middot;" + ["¸"]=> + string(7) "&cedil;" + ["¹"]=> + string(6) "&sup1;" + ["º"]=> + string(6) "&ordm;" + ["»"]=> + string(7) "&raquo;" + ["¼"]=> + string(8) "&frac14;" + ["½"]=> + string(8) "&frac12;" + ["¾"]=> + string(8) "&frac34;" + ["¿"]=> + string(8) "&iquest;" + ["À"]=> + string(8) "&Agrave;" + ["Á"]=> + string(8) "&Aacute;" + ["Â"]=> + string(7) "&Acirc;" + ["Ã"]=> + string(8) "&Atilde;" + ["Ä"]=> + string(6) "&Auml;" + ["Å"]=> + string(7) "&Aring;" + ["Æ"]=> + string(7) "&AElig;" + ["Ç"]=> + string(8) "&Ccedil;" + ["È"]=> + string(8) "&Egrave;" + ["É"]=> + string(8) "&Eacute;" + ["Ê"]=> + string(7) "&Ecirc;" + ["Ë"]=> + string(6) "&Euml;" + ["Ì"]=> + string(8) "&Igrave;" + ["Í"]=> + string(8) "&Iacute;" + ["Î"]=> + string(7) "&Icirc;" + ["Ï"]=> + string(6) "&Iuml;" + ["Ð"]=> + string(5) "&ETH;" + ["Ñ"]=> + string(8) "&Ntilde;" + ["Ò"]=> + string(8) "&Ograve;" + ["Ó"]=> + string(8) "&Oacute;" + ["Ô"]=> + string(7) "&Ocirc;" + ["Õ"]=> + string(8) "&Otilde;" + ["Ö"]=> + string(6) "&Ouml;" + ["×"]=> + string(7) "&times;" + ["Ø"]=> + string(8) "&Oslash;" + ["Ù"]=> + string(8) "&Ugrave;" + ["Ú"]=> + string(8) "&Uacute;" + ["Û"]=> + string(7) "&Ucirc;" + ["Ü"]=> + string(6) "&Uuml;" + ["Ý"]=> + string(8) "&Yacute;" + ["Þ"]=> + string(7) "&THORN;" + ["ß"]=> + string(7) "&szlig;" + ["à"]=> + string(8) "&agrave;" + ["á"]=> + string(8) "&aacute;" + ["â"]=> + string(7) "&acirc;" + ["ã"]=> + string(8) "&atilde;" + ["ä"]=> + string(6) "&auml;" + ["å"]=> + string(7) "&aring;" + ["æ"]=> + string(7) "&aelig;" + ["ç"]=> + string(8) "&ccedil;" + ["è"]=> + string(8) "&egrave;" + ["é"]=> + string(8) "&eacute;" + ["ê"]=> + string(7) "&ecirc;" + ["ë"]=> + string(6) "&euml;" + ["ì"]=> + string(8) "&igrave;" + ["í"]=> + string(8) "&iacute;" + ["î"]=> + string(7) "&icirc;" + ["ï"]=> + string(6) "&iuml;" + ["ð"]=> + string(5) "&eth;" + ["ñ"]=> + string(8) "&ntilde;" + ["ò"]=> + string(8) "&ograve;" + ["ó"]=> + string(8) "&oacute;" + ["ô"]=> + string(7) "&ocirc;" + ["õ"]=> + string(8) "&otilde;" + ["ö"]=> + string(6) "&ouml;" + ["÷"]=> + string(8) "&divide;" + ["ø"]=> + string(8) "&oslash;" + ["ù"]=> + string(8) "&ugrave;" + ["ú"]=> + string(8) "&uacute;" + ["û"]=> + string(7) "&ucirc;" + ["ü"]=> + string(6) "&uuml;" + ["ý"]=> + string(8) "&yacute;" + ["þ"]=> + string(7) "&thorn;" + ["ÿ"]=> + string(6) "&yuml;" + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 7 -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 8 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL +-- Iteration 9 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL +-- Iteration 10 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, object given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, object given in %s on line %d +NULL +-- Iteration 11 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL +-- Iteration 12 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL +-- Iteration 13 -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 14 -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 15 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %d +NULL +-- Iteration 16 -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 17 -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +Done +--UEXPECTF-- +*** Testing get_html_translation_table() : usage variations *** + +--- Testing get_html_translation_table() by supplying different values for 'table' argument --- +-- Iteration 1 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 2 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 3 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 4 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 5 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 6 -- +array(311) { + [u" "]=> + unicode(6) "&nbsp;" + [u"¡"]=> + unicode(7) "&iexcl;" + [u"¢"]=> + unicode(6) "&cent;" + [u"£"]=> + unicode(7) "&pound;" + [u"¤"]=> + unicode(8) "&curren;" + [u"Â¥"]=> + unicode(5) "&yen;" + [u"¦"]=> + unicode(8) "&brvbar;" + [u"§"]=> + unicode(6) "&sect;" + [u"¨"]=> + unicode(5) "&uml;" + [u"©"]=> + unicode(6) "&copy;" + [u"ª"]=> + unicode(6) "&ordf;" + [u"«"]=> + unicode(7) "&laquo;" + [u"¬"]=> + unicode(5) "&not;" + [u"­"]=> + unicode(5) "&shy;" + [u"®"]=> + unicode(5) "&reg;" + [u"¯"]=> + unicode(6) "&macr;" + [u"°"]=> + unicode(5) "&deg;" + [u"±"]=> + unicode(8) "&plusmn;" + [u"²"]=> + unicode(6) "&sup2;" + [u"³"]=> + unicode(6) "&sup3;" + [u"´"]=> + unicode(7) "&acute;" + [u"µ"]=> + unicode(7) "&micro;" + [u"¶"]=> + unicode(6) "&para;" + [u"·"]=> + unicode(8) "&middot;" + [u"¸"]=> + unicode(7) "&cedil;" + [u"¹"]=> + unicode(6) "&sup1;" + [u"º"]=> + unicode(6) "&ordm;" + [u"»"]=> + unicode(7) "&raquo;" + [u"¼"]=> + unicode(8) "&frac14;" + [u"½"]=> + unicode(8) "&frac12;" + [u"¾"]=> + unicode(8) "&frac34;" + [u"¿"]=> + unicode(8) "&iquest;" + [u"À"]=> + unicode(8) "&Agrave;" + [u"Á"]=> + unicode(8) "&Aacute;" + [u"Â"]=> + unicode(7) "&Acirc;" + [u"Ã"]=> + unicode(8) "&Atilde;" + [u"Ä"]=> + unicode(6) "&Auml;" + [u"Å"]=> + unicode(7) "&Aring;" + [u"Æ"]=> + unicode(7) "&AElig;" + [u"Ç"]=> + unicode(8) "&Ccedil;" + [u"È"]=> + unicode(8) "&Egrave;" + [u"É"]=> + unicode(8) "&Eacute;" + [u"Ê"]=> + unicode(7) "&Ecirc;" + [u"Ë"]=> + unicode(6) "&Euml;" + [u"Ì"]=> + unicode(8) "&Igrave;" + [u"Í"]=> + unicode(8) "&Iacute;" + [u"Î"]=> + unicode(7) "&Icirc;" + [u"Ï"]=> + unicode(6) "&Iuml;" + [u"Ð"]=> + unicode(5) "&ETH;" + [u"Ñ"]=> + unicode(8) "&Ntilde;" + [u"Ò"]=> + unicode(8) "&Ograve;" + [u"Ó"]=> + unicode(8) "&Oacute;" + [u"Ô"]=> + unicode(7) "&Ocirc;" + [u"Õ"]=> + unicode(8) "&Otilde;" + [u"Ö"]=> + unicode(6) "&Ouml;" + [u"×"]=> + unicode(7) "&times;" + [u"Ø"]=> + unicode(8) "&Oslash;" + [u"Ù"]=> + unicode(8) "&Ugrave;" + [u"Ú"]=> + unicode(8) "&Uacute;" + [u"Û"]=> + unicode(7) "&Ucirc;" + [u"Ü"]=> + unicode(6) "&Uuml;" + [u"Ý"]=> + unicode(8) "&Yacute;" + [u"Þ"]=> + unicode(7) "&THORN;" + [u"ß"]=> + unicode(7) "&szlig;" + [u"à"]=> + unicode(8) "&agrave;" + [u"á"]=> + unicode(8) "&aacute;" + [u"â"]=> + unicode(7) "&acirc;" + [u"ã"]=> + unicode(8) "&atilde;" + [u"ä"]=> + unicode(6) "&auml;" + [u"Ã¥"]=> + unicode(7) "&aring;" + [u"æ"]=> + unicode(7) "&aelig;" + [u"ç"]=> + unicode(8) "&ccedil;" + [u"è"]=> + unicode(8) "&egrave;" + [u"é"]=> + unicode(8) "&eacute;" + [u"ê"]=> + unicode(7) "&ecirc;" + [u"ë"]=> + unicode(6) "&euml;" + [u"ì"]=> + unicode(8) "&igrave;" + [u"í"]=> + unicode(8) "&iacute;" + [u"î"]=> + unicode(7) "&icirc;" + [u"ï"]=> + unicode(6) "&iuml;" + [u"ð"]=> + unicode(5) "&eth;" + [u"ñ"]=> + unicode(8) "&ntilde;" + [u"ò"]=> + unicode(8) "&ograve;" + [u"ó"]=> + unicode(8) "&oacute;" + [u"ô"]=> + unicode(7) "&ocirc;" + [u"õ"]=> + unicode(8) "&otilde;" + [u"ö"]=> + unicode(6) "&ouml;" + [u"÷"]=> + unicode(8) "&divide;" + [u"ø"]=> + unicode(8) "&oslash;" + [u"ù"]=> + unicode(8) "&ugrave;" + [u"ú"]=> + unicode(8) "&uacute;" + [u"û"]=> + unicode(7) "&ucirc;" + [u"ü"]=> + unicode(6) "&uuml;" + [u"ý"]=> + unicode(8) "&yacute;" + [u"þ"]=> + unicode(7) "&thorn;" + [u"ÿ"]=> + unicode(6) "&yuml;" + [u"Œ"]=> + unicode(7) "&OElig;" + [u"œ"]=> + unicode(7) "&oelig;" + [u"Å "]=> + unicode(8) "&Scaron;" + [u"Å¡"]=> + unicode(8) "&scaron;" + [u"Ÿ"]=> + unicode(6) "&Yuml;" + [u"ƒ"]=> + unicode(6) "&fnof;" + [u"ˆ"]=> + unicode(6) "&circ;" + [u"˜"]=> + unicode(7) "&tilde;" + [u"Α"]=> + unicode(7) "&Alpha;" + [u"Β"]=> + unicode(6) "&Beta;" + [u"Γ"]=> + unicode(7) "&Gamma;" + [u"Δ"]=> + unicode(7) "&Delta;" + [u"Ε"]=> + unicode(9) "&Epsilon;" + [u"Ζ"]=> + unicode(6) "&Zeta;" + [u"Η"]=> + unicode(5) "&Eta;" + [u"Θ"]=> + unicode(7) "&Theta;" + [u"Ι"]=> + unicode(6) "&Iota;" + [u"Κ"]=> + unicode(7) "&Kappa;" + [u"Λ"]=> + unicode(8) "&Lambda;" + [u"Μ"]=> + unicode(4) "&Mu;" + [u"Ν"]=> + unicode(4) "&Nu;" + [u"Ξ"]=> + unicode(4) "&Xi;" + [u"Ο"]=> + unicode(9) "&Omicron;" + [u"Π"]=> + unicode(4) "&Pi;" + [u"Ρ"]=> + unicode(5) "&Rho;" + [u"Σ"]=> + unicode(7) "&Sigma;" + [u"Τ"]=> + unicode(5) "&Tau;" + [u"Î¥"]=> + unicode(9) "&Upsilon;" + [u"Φ"]=> + unicode(5) "&Phi;" + [u"Χ"]=> + unicode(5) "&Chi;" + [u"Ψ"]=> + unicode(5) "&Psi;" + [u"Ω"]=> + unicode(7) "&Omega;" + [u"α"]=> + unicode(7) "&alpha;" + [u"β"]=> + unicode(6) "&beta;" + [u"γ"]=> + unicode(7) "&gamma;" + [u"δ"]=> + unicode(7) "&delta;" + [u"ε"]=> + unicode(9) "&epsilon;" + [u"ζ"]=> + unicode(6) "&zeta;" + [u"η"]=> + unicode(5) "&eta;" + [u"θ"]=> + unicode(7) "&theta;" + [u"ι"]=> + unicode(6) "&iota;" + [u"κ"]=> + unicode(7) "&kappa;" + [u"λ"]=> + unicode(8) "&lambda;" + [u"μ"]=> + unicode(4) "&mu;" + [u"ν"]=> + unicode(4) "&nu;" + [u"ξ"]=> + unicode(4) "&xi;" + [u"ο"]=> + unicode(9) "&omicron;" + [u"π"]=> + unicode(4) "&pi;" + [u"ρ"]=> + unicode(5) "&rho;" + [u"ς"]=> + unicode(8) "&sigmaf;" + [u"σ"]=> + unicode(7) "&sigma;" + [u"τ"]=> + unicode(5) "&tau;" + [u"υ"]=> + unicode(9) "&upsilon;" + [u"φ"]=> + unicode(5) "&phi;" + [u"χ"]=> + unicode(5) "&chi;" + [u"ψ"]=> + unicode(5) "&psi;" + [u"ω"]=> + unicode(7) "&omega;" + [u"ϑ"]=> + unicode(10) "&thetasym;" + [u"ϒ"]=> + unicode(7) "&upsih;" + [u"ϖ"]=> + unicode(5) "&piv;" + [u" "]=> + unicode(6) "&ensp;" + [u" "]=> + unicode(6) "&emsp;" + [u" "]=> + unicode(8) "&thinsp;" + [u"‌"]=> + unicode(6) "&zwnj;" + [u"‍"]=> + unicode(5) "&zwj;" + [u"‎"]=> + unicode(5) "&lrm;" + [u"‏"]=> + unicode(5) "&rlm;" + [u"–"]=> + unicode(7) "&ndash;" + [u"—"]=> + unicode(7) "&mdash;" + [u"‘"]=> + unicode(7) "&lsquo;" + [u"’"]=> + unicode(7) "&rsquo;" + [u"‚"]=> + unicode(7) "&sbquo;" + [u"“"]=> + unicode(7) "&ldquo;" + [u"”"]=> + unicode(7) "&rdquo;" + [u"„"]=> + unicode(7) "&bdquo;" + [u"†"]=> + unicode(8) "&dagger;" + [u"‡"]=> + unicode(8) "&Dagger;" + [u"•"]=> + unicode(6) "&bull;" + [u"…"]=> + unicode(8) "&hellip;" + [u"‰"]=> + unicode(8) "&permil;" + [u"′"]=> + unicode(7) "&prime;" + [u"″"]=> + unicode(7) "&Prime;" + [u"‹"]=> + unicode(8) "&lsaquo;" + [u"›"]=> + unicode(8) "&rsaquo;" + [u"‾"]=> + unicode(7) "&oline;" + [u"⁄"]=> + unicode(7) "&frasl;" + [u"€"]=> + unicode(6) "&euro;" + [u"ℑ"]=> + unicode(7) "&image;" + [u"℘"]=> + unicode(8) "&weierp;" + [u"ℜ"]=> + unicode(6) "&real;" + [u"™"]=> + unicode(7) "&trade;" + [u"ℵ"]=> + unicode(9) "&alefsym;" + [u"←"]=> + unicode(6) "&larr;" + [u"↑"]=> + unicode(6) "&uarr;" + [u"→"]=> + unicode(6) "&rarr;" + [u"↓"]=> + unicode(6) "&darr;" + [u"↔"]=> + unicode(6) "&harr;" + [u"↵"]=> + unicode(7) "&crarr;" + [u"⇐"]=> + unicode(6) "&lArr;" + [u"⇑"]=> + unicode(6) "&uArr;" + [u"⇒"]=> + unicode(6) "&rArr;" + [u"⇓"]=> + unicode(6) "&dArr;" + [u"⇔"]=> + unicode(6) "&hArr;" + [u"⇕"]=> + unicode(6) "&vArr;" + [u"⇚"]=> + unicode(7) "&lAarr;" + [u"⇛"]=> + unicode(7) "&rAarr;" + [u"⇝"]=> + unicode(7) "&rarrw;" + [u"∀"]=> + unicode(8) "&forall;" + [u"∁"]=> + unicode(6) "&comp;" + [u"∂"]=> + unicode(6) "&part;" + [u"∃"]=> + unicode(7) "&exist;" + [u"∄"]=> + unicode(8) "&nexist;" + [u"∅"]=> + unicode(7) "&empty;" + [u"∇"]=> + unicode(7) "&nabla;" + [u"∈"]=> + unicode(6) "&isin;" + [u"∉"]=> + unicode(7) "&notin;" + [u"∊"]=> + unicode(7) "&epsis;" + [u"∋"]=> + unicode(4) "&ni;" + [u"∌"]=> + unicode(7) "&notni;" + [u"∍"]=> + unicode(7) "&bepsi;" + [u"∏"]=> + unicode(6) "&prod;" + [u"∐"]=> + unicode(8) "&coprod;" + [u"∑"]=> + unicode(5) "&sum;" + [u"−"]=> + unicode(7) "&minus;" + [u"∓"]=> + unicode(8) "&mnplus;" + [u"∔"]=> + unicode(8) "&plusdo;" + [u"∖"]=> + unicode(7) "&setmn;" + [u"∗"]=> + unicode(8) "&lowast;" + [u"∘"]=> + unicode(8) "&compfn;" + [u"√"]=> + unicode(7) "&radic;" + [u"∝"]=> + unicode(6) "&prop;" + [u"∞"]=> + unicode(7) "&infin;" + [u"∟"]=> + unicode(7) "&ang90;" + [u"∠"]=> + unicode(5) "&ang;" + [u"∡"]=> + unicode(8) "&angmsd;" + [u"∢"]=> + unicode(8) "&angsph;" + [u"∣"]=> + unicode(5) "&mid;" + [u"∤"]=> + unicode(6) "&nmid;" + [u"∥"]=> + unicode(5) "&par;" + [u"∦"]=> + unicode(6) "&npar;" + [u"∧"]=> + unicode(5) "&and;" + [u"∨"]=> + unicode(4) "&or;" + [u"∩"]=> + unicode(5) "&cap;" + [u"∪"]=> + unicode(5) "&cup;" + [u"∫"]=> + unicode(5) "&int;" + [u"∮"]=> + unicode(8) "&conint;" + [u"∴"]=> + unicode(8) "&there4;" + [u"∵"]=> + unicode(8) "&becaus;" + [u"∼"]=> + unicode(5) "&sim;" + [u"∽"]=> + unicode(6) "&bsim;" + [u"≀"]=> + unicode(8) "&wreath;" + [u"≁"]=> + unicode(6) "&nsim;" + [u"≃"]=> + unicode(6) "&sime;" + [u"≄"]=> + unicode(7) "&nsime;" + [u"≅"]=> + unicode(6) "&cong;" + [u"≇"]=> + unicode(7) "&ncong;" + [u"≈"]=> + unicode(7) "&asymp;" + [u"≉"]=> + unicode(5) "&nap;" + [u"≊"]=> + unicode(5) "&ape;" + [u"≌"]=> + unicode(7) "&bcong;" + [u"≍"]=> + unicode(7) "&asymp;" + [u"≎"]=> + unicode(6) "&bump;" + [u"≏"]=> + unicode(7) "&bumpe;" + [u"≠"]=> + unicode(4) "&ne;" + [u"≡"]=> + unicode(7) "&equiv;" + [u"≤"]=> + unicode(4) "&le;" + [u"≥"]=> + unicode(4) "&ge;" + [u"≦"]=> + unicode(4) "&lE;" + [u"≧"]=> + unicode(4) "&gE;" + [u"≨"]=> + unicode(5) "&lnE;" + [u"≩"]=> + unicode(5) "&gnE;" + [u"≪"]=> + unicode(4) "&Lt;" + [u"≫"]=> + unicode(4) "&Gt;" + [u"≬"]=> + unicode(7) "&twixt;" + [u"≮"]=> + unicode(5) "&nlt;" + [u"≯"]=> + unicode(5) "&ngt;" + [u"≰"]=> + unicode(6) "&nles;" + [u"≱"]=> + unicode(6) "&nges;" + [u"≲"]=> + unicode(6) "&lsim;" + [u"≳"]=> + unicode(6) "&gsim;" + [u"≶"]=> + unicode(4) "&lg;" + [u"≷"]=> + unicode(4) "&gl;" + [u"≺"]=> + unicode(4) "&pr;" + [u"≻"]=> + unicode(4) "&sc;" + [u"≼"]=> + unicode(7) "&cupre;" + [u"≽"]=> + unicode(7) "&sscue;" + [u"≾"]=> + unicode(7) "&prsim;" + [u"≿"]=> + unicode(7) "&scsim;" + [u"⊀"]=> + unicode(5) "&npr;" + [u"⊁"]=> + unicode(5) "&nsc;" + [u"⊂"]=> + unicode(5) "&sub;" + [u"⊃"]=> + unicode(5) "&sup;" + [u"⊄"]=> + unicode(6) "&nsub;" + [u"⊅"]=> + unicode(6) "&nsup;" + [u"⊆"]=> + unicode(6) "&sube;" + [u"⊇"]=> + unicode(6) "&supe;" + [u"⊕"]=> + unicode(7) "&oplus;" + [u"⊗"]=> + unicode(8) "&otimes;" + [u"⊥"]=> + unicode(6) "&perp;" + [u"⋅"]=> + unicode(6) "&sdot;" + [u"⌈"]=> + unicode(7) "&lceil;" + [u"⌉"]=> + unicode(7) "&rceil;" + [u"⌊"]=> + unicode(8) "&lfloor;" + [u"⌋"]=> + unicode(8) "&rfloor;" + [u"〈"]=> + unicode(6) "&lang;" + [u"〉"]=> + unicode(6) "&rang;" + [u"◊"]=> + unicode(5) "&loz;" + [u"♠"]=> + unicode(8) "&spades;" + [u"♣"]=> + unicode(7) "&clubs;" + [u"♥"]=> + unicode(8) "&hearts;" + [u"♦"]=> + unicode(7) "&diams;" + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +array(311) { + [u" "]=> + unicode(6) "&nbsp;" + [u"¡"]=> + unicode(7) "&iexcl;" + [u"¢"]=> + unicode(6) "&cent;" + [u"£"]=> + unicode(7) "&pound;" + [u"¤"]=> + unicode(8) "&curren;" + [u"Â¥"]=> + unicode(5) "&yen;" + [u"¦"]=> + unicode(8) "&brvbar;" + [u"§"]=> + unicode(6) "&sect;" + [u"¨"]=> + unicode(5) "&uml;" + [u"©"]=> + unicode(6) "&copy;" + [u"ª"]=> + unicode(6) "&ordf;" + [u"«"]=> + unicode(7) "&laquo;" + [u"¬"]=> + unicode(5) "&not;" + [u"­"]=> + unicode(5) "&shy;" + [u"®"]=> + unicode(5) "&reg;" + [u"¯"]=> + unicode(6) "&macr;" + [u"°"]=> + unicode(5) "&deg;" + [u"±"]=> + unicode(8) "&plusmn;" + [u"²"]=> + unicode(6) "&sup2;" + [u"³"]=> + unicode(6) "&sup3;" + [u"´"]=> + unicode(7) "&acute;" + [u"µ"]=> + unicode(7) "&micro;" + [u"¶"]=> + unicode(6) "&para;" + [u"·"]=> + unicode(8) "&middot;" + [u"¸"]=> + unicode(7) "&cedil;" + [u"¹"]=> + unicode(6) "&sup1;" + [u"º"]=> + unicode(6) "&ordm;" + [u"»"]=> + unicode(7) "&raquo;" + [u"¼"]=> + unicode(8) "&frac14;" + [u"½"]=> + unicode(8) "&frac12;" + [u"¾"]=> + unicode(8) "&frac34;" + [u"¿"]=> + unicode(8) "&iquest;" + [u"À"]=> + unicode(8) "&Agrave;" + [u"Á"]=> + unicode(8) "&Aacute;" + [u"Â"]=> + unicode(7) "&Acirc;" + [u"Ã"]=> + unicode(8) "&Atilde;" + [u"Ä"]=> + unicode(6) "&Auml;" + [u"Å"]=> + unicode(7) "&Aring;" + [u"Æ"]=> + unicode(7) "&AElig;" + [u"Ç"]=> + unicode(8) "&Ccedil;" + [u"È"]=> + unicode(8) "&Egrave;" + [u"É"]=> + unicode(8) "&Eacute;" + [u"Ê"]=> + unicode(7) "&Ecirc;" + [u"Ë"]=> + unicode(6) "&Euml;" + [u"Ì"]=> + unicode(8) "&Igrave;" + [u"Í"]=> + unicode(8) "&Iacute;" + [u"Î"]=> + unicode(7) "&Icirc;" + [u"Ï"]=> + unicode(6) "&Iuml;" + [u"Ð"]=> + unicode(5) "&ETH;" + [u"Ñ"]=> + unicode(8) "&Ntilde;" + [u"Ò"]=> + unicode(8) "&Ograve;" + [u"Ó"]=> + unicode(8) "&Oacute;" + [u"Ô"]=> + unicode(7) "&Ocirc;" + [u"Õ"]=> + unicode(8) "&Otilde;" + [u"Ö"]=> + unicode(6) "&Ouml;" + [u"×"]=> + unicode(7) "&times;" + [u"Ø"]=> + unicode(8) "&Oslash;" + [u"Ù"]=> + unicode(8) "&Ugrave;" + [u"Ú"]=> + unicode(8) "&Uacute;" + [u"Û"]=> + unicode(7) "&Ucirc;" + [u"Ü"]=> + unicode(6) "&Uuml;" + [u"Ý"]=> + unicode(8) "&Yacute;" + [u"Þ"]=> + unicode(7) "&THORN;" + [u"ß"]=> + unicode(7) "&szlig;" + [u"à"]=> + unicode(8) "&agrave;" + [u"á"]=> + unicode(8) "&aacute;" + [u"â"]=> + unicode(7) "&acirc;" + [u"ã"]=> + unicode(8) "&atilde;" + [u"ä"]=> + unicode(6) "&auml;" + [u"Ã¥"]=> + unicode(7) "&aring;" + [u"æ"]=> + unicode(7) "&aelig;" + [u"ç"]=> + unicode(8) "&ccedil;" + [u"è"]=> + unicode(8) "&egrave;" + [u"é"]=> + unicode(8) "&eacute;" + [u"ê"]=> + unicode(7) "&ecirc;" + [u"ë"]=> + unicode(6) "&euml;" + [u"ì"]=> + unicode(8) "&igrave;" + [u"í"]=> + unicode(8) "&iacute;" + [u"î"]=> + unicode(7) "&icirc;" + [u"ï"]=> + unicode(6) "&iuml;" + [u"ð"]=> + unicode(5) "&eth;" + [u"ñ"]=> + unicode(8) "&ntilde;" + [u"ò"]=> + unicode(8) "&ograve;" + [u"ó"]=> + unicode(8) "&oacute;" + [u"ô"]=> + unicode(7) "&ocirc;" + [u"õ"]=> + unicode(8) "&otilde;" + [u"ö"]=> + unicode(6) "&ouml;" + [u"÷"]=> + unicode(8) "&divide;" + [u"ø"]=> + unicode(8) "&oslash;" + [u"ù"]=> + unicode(8) "&ugrave;" + [u"ú"]=> + unicode(8) "&uacute;" + [u"û"]=> + unicode(7) "&ucirc;" + [u"ü"]=> + unicode(6) "&uuml;" + [u"ý"]=> + unicode(8) "&yacute;" + [u"þ"]=> + unicode(7) "&thorn;" + [u"ÿ"]=> + unicode(6) "&yuml;" + [u"Œ"]=> + unicode(7) "&OElig;" + [u"œ"]=> + unicode(7) "&oelig;" + [u"Å "]=> + unicode(8) "&Scaron;" + [u"Å¡"]=> + unicode(8) "&scaron;" + [u"Ÿ"]=> + unicode(6) "&Yuml;" + [u"ƒ"]=> + unicode(6) "&fnof;" + [u"ˆ"]=> + unicode(6) "&circ;" + [u"˜"]=> + unicode(7) "&tilde;" + [u"Α"]=> + unicode(7) "&Alpha;" + [u"Β"]=> + unicode(6) "&Beta;" + [u"Γ"]=> + unicode(7) "&Gamma;" + [u"Δ"]=> + unicode(7) "&Delta;" + [u"Ε"]=> + unicode(9) "&Epsilon;" + [u"Ζ"]=> + unicode(6) "&Zeta;" + [u"Η"]=> + unicode(5) "&Eta;" + [u"Θ"]=> + unicode(7) "&Theta;" + [u"Ι"]=> + unicode(6) "&Iota;" + [u"Κ"]=> + unicode(7) "&Kappa;" + [u"Λ"]=> + unicode(8) "&Lambda;" + [u"Μ"]=> + unicode(4) "&Mu;" + [u"Ν"]=> + unicode(4) "&Nu;" + [u"Ξ"]=> + unicode(4) "&Xi;" + [u"Ο"]=> + unicode(9) "&Omicron;" + [u"Π"]=> + unicode(4) "&Pi;" + [u"Ρ"]=> + unicode(5) "&Rho;" + [u"Σ"]=> + unicode(7) "&Sigma;" + [u"Τ"]=> + unicode(5) "&Tau;" + [u"Î¥"]=> + unicode(9) "&Upsilon;" + [u"Φ"]=> + unicode(5) "&Phi;" + [u"Χ"]=> + unicode(5) "&Chi;" + [u"Ψ"]=> + unicode(5) "&Psi;" + [u"Ω"]=> + unicode(7) "&Omega;" + [u"α"]=> + unicode(7) "&alpha;" + [u"β"]=> + unicode(6) "&beta;" + [u"γ"]=> + unicode(7) "&gamma;" + [u"δ"]=> + unicode(7) "&delta;" + [u"ε"]=> + unicode(9) "&epsilon;" + [u"ζ"]=> + unicode(6) "&zeta;" + [u"η"]=> + unicode(5) "&eta;" + [u"θ"]=> + unicode(7) "&theta;" + [u"ι"]=> + unicode(6) "&iota;" + [u"κ"]=> + unicode(7) "&kappa;" + [u"λ"]=> + unicode(8) "&lambda;" + [u"μ"]=> + unicode(4) "&mu;" + [u"ν"]=> + unicode(4) "&nu;" + [u"ξ"]=> + unicode(4) "&xi;" + [u"ο"]=> + unicode(9) "&omicron;" + [u"π"]=> + unicode(4) "&pi;" + [u"ρ"]=> + unicode(5) "&rho;" + [u"ς"]=> + unicode(8) "&sigmaf;" + [u"σ"]=> + unicode(7) "&sigma;" + [u"τ"]=> + unicode(5) "&tau;" + [u"υ"]=> + unicode(9) "&upsilon;" + [u"φ"]=> + unicode(5) "&phi;" + [u"χ"]=> + unicode(5) "&chi;" + [u"ψ"]=> + unicode(5) "&psi;" + [u"ω"]=> + unicode(7) "&omega;" + [u"ϑ"]=> + unicode(10) "&thetasym;" + [u"ϒ"]=> + unicode(7) "&upsih;" + [u"ϖ"]=> + unicode(5) "&piv;" + [u" "]=> + unicode(6) "&ensp;" + [u" "]=> + unicode(6) "&emsp;" + [u" "]=> + unicode(8) "&thinsp;" + [u"‌"]=> + unicode(6) "&zwnj;" + [u"‍"]=> + unicode(5) "&zwj;" + [u"‎"]=> + unicode(5) "&lrm;" + [u"‏"]=> + unicode(5) "&rlm;" + [u"–"]=> + unicode(7) "&ndash;" + [u"—"]=> + unicode(7) "&mdash;" + [u"‘"]=> + unicode(7) "&lsquo;" + [u"’"]=> + unicode(7) "&rsquo;" + [u"‚"]=> + unicode(7) "&sbquo;" + [u"“"]=> + unicode(7) "&ldquo;" + [u"”"]=> + unicode(7) "&rdquo;" + [u"„"]=> + unicode(7) "&bdquo;" + [u"†"]=> + unicode(8) "&dagger;" + [u"‡"]=> + unicode(8) "&Dagger;" + [u"•"]=> + unicode(6) "&bull;" + [u"…"]=> + unicode(8) "&hellip;" + [u"‰"]=> + unicode(8) "&permil;" + [u"′"]=> + unicode(7) "&prime;" + [u"″"]=> + unicode(7) "&Prime;" + [u"‹"]=> + unicode(8) "&lsaquo;" + [u"›"]=> + unicode(8) "&rsaquo;" + [u"‾"]=> + unicode(7) "&oline;" + [u"⁄"]=> + unicode(7) "&frasl;" + [u"€"]=> + unicode(6) "&euro;" + [u"ℑ"]=> + unicode(7) "&image;" + [u"℘"]=> + unicode(8) "&weierp;" + [u"ℜ"]=> + unicode(6) "&real;" + [u"™"]=> + unicode(7) "&trade;" + [u"ℵ"]=> + unicode(9) "&alefsym;" + [u"←"]=> + unicode(6) "&larr;" + [u"↑"]=> + unicode(6) "&uarr;" + [u"→"]=> + unicode(6) "&rarr;" + [u"↓"]=> + unicode(6) "&darr;" + [u"↔"]=> + unicode(6) "&harr;" + [u"↵"]=> + unicode(7) "&crarr;" + [u"⇐"]=> + unicode(6) "&lArr;" + [u"⇑"]=> + unicode(6) "&uArr;" + [u"⇒"]=> + unicode(6) "&rArr;" + [u"⇓"]=> + unicode(6) "&dArr;" + [u"⇔"]=> + unicode(6) "&hArr;" + [u"⇕"]=> + unicode(6) "&vArr;" + [u"⇚"]=> + unicode(7) "&lAarr;" + [u"⇛"]=> + unicode(7) "&rAarr;" + [u"⇝"]=> + unicode(7) "&rarrw;" + [u"∀"]=> + unicode(8) "&forall;" + [u"∁"]=> + unicode(6) "&comp;" + [u"∂"]=> + unicode(6) "&part;" + [u"∃"]=> + unicode(7) "&exist;" + [u"∄"]=> + unicode(8) "&nexist;" + [u"∅"]=> + unicode(7) "&empty;" + [u"∇"]=> + unicode(7) "&nabla;" + [u"∈"]=> + unicode(6) "&isin;" + [u"∉"]=> + unicode(7) "&notin;" + [u"∊"]=> + unicode(7) "&epsis;" + [u"∋"]=> + unicode(4) "&ni;" + [u"∌"]=> + unicode(7) "&notni;" + [u"∍"]=> + unicode(7) "&bepsi;" + [u"∏"]=> + unicode(6) "&prod;" + [u"∐"]=> + unicode(8) "&coprod;" + [u"∑"]=> + unicode(5) "&sum;" + [u"−"]=> + unicode(7) "&minus;" + [u"∓"]=> + unicode(8) "&mnplus;" + [u"∔"]=> + unicode(8) "&plusdo;" + [u"∖"]=> + unicode(7) "&setmn;" + [u"∗"]=> + unicode(8) "&lowast;" + [u"∘"]=> + unicode(8) "&compfn;" + [u"√"]=> + unicode(7) "&radic;" + [u"∝"]=> + unicode(6) "&prop;" + [u"∞"]=> + unicode(7) "&infin;" + [u"∟"]=> + unicode(7) "&ang90;" + [u"∠"]=> + unicode(5) "&ang;" + [u"∡"]=> + unicode(8) "&angmsd;" + [u"∢"]=> + unicode(8) "&angsph;" + [u"∣"]=> + unicode(5) "&mid;" + [u"∤"]=> + unicode(6) "&nmid;" + [u"∥"]=> + unicode(5) "&par;" + [u"∦"]=> + unicode(6) "&npar;" + [u"∧"]=> + unicode(5) "&and;" + [u"∨"]=> + unicode(4) "&or;" + [u"∩"]=> + unicode(5) "&cap;" + [u"∪"]=> + unicode(5) "&cup;" + [u"∫"]=> + unicode(5) "&int;" + [u"∮"]=> + unicode(8) "&conint;" + [u"∴"]=> + unicode(8) "&there4;" + [u"∵"]=> + unicode(8) "&becaus;" + [u"∼"]=> + unicode(5) "&sim;" + [u"∽"]=> + unicode(6) "&bsim;" + [u"≀"]=> + unicode(8) "&wreath;" + [u"≁"]=> + unicode(6) "&nsim;" + [u"≃"]=> + unicode(6) "&sime;" + [u"≄"]=> + unicode(7) "&nsime;" + [u"≅"]=> + unicode(6) "&cong;" + [u"≇"]=> + unicode(7) "&ncong;" + [u"≈"]=> + unicode(7) "&asymp;" + [u"≉"]=> + unicode(5) "&nap;" + [u"≊"]=> + unicode(5) "&ape;" + [u"≌"]=> + unicode(7) "&bcong;" + [u"≍"]=> + unicode(7) "&asymp;" + [u"≎"]=> + unicode(6) "&bump;" + [u"≏"]=> + unicode(7) "&bumpe;" + [u"≠"]=> + unicode(4) "&ne;" + [u"≡"]=> + unicode(7) "&equiv;" + [u"≤"]=> + unicode(4) "&le;" + [u"≥"]=> + unicode(4) "&ge;" + [u"≦"]=> + unicode(4) "&lE;" + [u"≧"]=> + unicode(4) "&gE;" + [u"≨"]=> + unicode(5) "&lnE;" + [u"≩"]=> + unicode(5) "&gnE;" + [u"≪"]=> + unicode(4) "&Lt;" + [u"≫"]=> + unicode(4) "&Gt;" + [u"≬"]=> + unicode(7) "&twixt;" + [u"≮"]=> + unicode(5) "&nlt;" + [u"≯"]=> + unicode(5) "&ngt;" + [u"≰"]=> + unicode(6) "&nles;" + [u"≱"]=> + unicode(6) "&nges;" + [u"≲"]=> + unicode(6) "&lsim;" + [u"≳"]=> + unicode(6) "&gsim;" + [u"≶"]=> + unicode(4) "&lg;" + [u"≷"]=> + unicode(4) "&gl;" + [u"≺"]=> + unicode(4) "&pr;" + [u"≻"]=> + unicode(4) "&sc;" + [u"≼"]=> + unicode(7) "&cupre;" + [u"≽"]=> + unicode(7) "&sscue;" + [u"≾"]=> + unicode(7) "&prsim;" + [u"≿"]=> + unicode(7) "&scsim;" + [u"⊀"]=> + unicode(5) "&npr;" + [u"⊁"]=> + unicode(5) "&nsc;" + [u"⊂"]=> + unicode(5) "&sub;" + [u"⊃"]=> + unicode(5) "&sup;" + [u"⊄"]=> + unicode(6) "&nsub;" + [u"⊅"]=> + unicode(6) "&nsup;" + [u"⊆"]=> + unicode(6) "&sube;" + [u"⊇"]=> + unicode(6) "&supe;" + [u"⊕"]=> + unicode(7) "&oplus;" + [u"⊗"]=> + unicode(8) "&otimes;" + [u"⊥"]=> + unicode(6) "&perp;" + [u"⋅"]=> + unicode(6) "&sdot;" + [u"⌈"]=> + unicode(7) "&lceil;" + [u"⌉"]=> + unicode(7) "&rceil;" + [u"⌊"]=> + unicode(8) "&lfloor;" + [u"⌋"]=> + unicode(8) "&rfloor;" + [u"〈"]=> + unicode(6) "&lang;" + [u"〉"]=> + unicode(6) "&rang;" + [u"◊"]=> + unicode(5) "&loz;" + [u"♠"]=> + unicode(8) "&spades;" + [u"♣"]=> + unicode(7) "&clubs;" + [u"♥"]=> + unicode(8) "&hearts;" + [u"♦"]=> + unicode(7) "&diams;" + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 7 -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 8 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 9 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 10 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, object given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, object given in %s on line %d +NULL +-- Iteration 11 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 12 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 13 -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 14 -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 15 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %d +NULL +-- Iteration 16 -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 17 -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/get_html_translation_table_variation2-win32.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/strings/get_html_translation_table_variation2-win32.phpt diff -u /dev/null php-src/ext/standard/tests/strings/get_html_translation_table_variation2-win32.phpt:1.2 --- /dev/null Mon Oct 8 15:30:38 2007 +++ php-src/ext/standard/tests/strings/get_html_translation_table_variation2-win32.phpt Mon Oct 8 15:30:37 2007 @@ -0,0 +1,306 @@ +--TEST-- +Test get_html_translation_table() function : usage variations - unexpected quote_style values +--SKIPIF-- +<?php +if( substr(PHP_OS, 0, 3) != "WIN"){ + die('skip only for Windows'); +} + +if( ini_get("unicode.semantics") == "1") + die('skip do not run when unicode on'); + +if( !setlocale(LC_ALL, "English_United States.1252") ) { + die('skip failed to set locale settings to "English_United States.1252"'); +} + +?> +--FILE-- +<?php +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) + * Description: Returns the internal translation table used by htmlspecialchars and htmlentities + * Source code: ext/standard/html.c +*/ + +/* + * test get_html_translation_table() with unexpteced value for argument $quote_style +*/ + +//set locale +setlocale(LC_ALL, "English_United States.1252"); + +echo "*** Testing get_html_translation_table() : usage variations ***\n"; +// initialize all required variables +$table = HTML_SPECIALCHARS; + +// get an unset variable +$unset_var = 10; +unset($unset_var); + +// a resource var +$fp = fopen(__FILE__, "r"); + +// array with different values +$values = array ( + + // array values + array(), + array(0), + array(1), + array(1, 2), + array('color' => 'red', 'item' => 'pen'), + + // boolean values + true, + FALSE, + + // string values + "string", + 'string', + + // objects + new stdclass(), + + // empty string + "", + '', + + // null vlaues + NULL, + null, + + // resource var + $fp, + + // undefined variable + @$undefined_var, + + // unset variable + @$unset_var +); + + +// loop through each element of the array and check the working of get_html_translation_table() +// when $quote_style arugment is supplied with different values +echo "\n--- Testing get_html_translation_table() by supplying different values for 'quote_style' argument ---\n"; +$counter = 1; +for($index = 0; $index < count($values); $index ++) { + echo "-- Iteration $counter --\n"; + $quote_style = $values [$index]; + + var_dump( get_html_translation_table($table, $quote_style) ); + + $counter ++; +} + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing get_html_translation_table() : usage variations *** + +--- Testing get_html_translation_table() by supplying different values for 'quote_style' argument --- +-- Iteration 1 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 2 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 3 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 4 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 5 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 6 -- +array(4) { + ["'"]=> + string(5) "&#39;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 7 -- +array(3) { + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 8 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %d +NULL +-- Iteration 9 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %d +NULL +-- Iteration 10 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, object given in %s on line %d +NULL +-- Iteration 11 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %d +NULL +-- Iteration 12 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %d +NULL +-- Iteration 13 -- +array(3) { + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 14 -- +array(3) { + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 15 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, resource given in %s on line %d +NULL +-- Iteration 16 -- +array(3) { + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 17 -- +array(3) { + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +Done +--UEXPECTF-- +*** Testing get_html_translation_table() : usage variations *** + +--- Testing get_html_translation_table() by supplying different values for 'quote_style' argument --- +-- Iteration 1 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 2 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 3 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 4 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 5 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 6 -- +array(4) { + [u"'"]=> + unicode(5) "&#39;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 7 -- +array(3) { + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 8 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 9 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 10 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, object given in %s on line %d +NULL +-- Iteration 11 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 12 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 13 -- +array(3) { + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 14 -- +array(3) { + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 15 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, resource given in %s on line %d +NULL +-- Iteration 16 -- +array(3) { + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 17 -- +array(3) { + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/get_html_translation_table_basic1-win32.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/strings/get_html_translation_table_basic1-win32.phpt diff -u /dev/null php-src/ext/standard/tests/strings/get_html_translation_table_basic1-win32.phpt:1.2 --- /dev/null Mon Oct 8 15:30:38 2007 +++ php-src/ext/standard/tests/strings/get_html_translation_table_basic1-win32.phpt Mon Oct 8 15:30:37 2007 @@ -0,0 +1,922 @@ +--TEST-- +Test get_html_translation_table() function : basic functionality - with default args +--SKIPIF-- +<?php +if( substr(PHP_OS, 0, 3) != "WIN"){ + die('skip only for Windows'); +} + +if( ini_get("unicode.semantics") == "1") + die('skip do not run when unicode on'); + +if( !setlocale(LC_ALL, "English_United States.1252") ) { + die('skip failed to set locale settings to "English_United States.1252"'); +} +?> +--FILE-- +<?php +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) + * Description: Returns the internal translation table used by htmlspecialchars and htmlentities + * Source code: ext/standard/html.c +*/ + +/* Test get_html_translation_table() when table is specified as HTML_ENTITIES */ + +//set locale +setlocale(LC_ALL, "English_United States.1252"); + +echo "*** Testing get_html_translation_table() : basic functionality ***\n"; + +// Calling get_html_translation_table() with default arguments +echo "-- with default arguments --\n"; +var_dump( get_html_translation_table() ); + +// Calling get_html_translation_table() with all possible optional arguments +echo "-- with table = HTML_ENTITIES --\n"; +$table = HTML_ENTITIES; +var_dump( get_html_translation_table($table) ); + +echo "-- with table = HTML_SPECIALCHARS --\n"; +$table = HTML_SPECIALCHARS; +var_dump( get_html_translation_table($table) ); + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing get_html_translation_table() : basic functionality *** +-- with default arguments -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- with table = HTML_ENTITIES -- +array(100) { + [" "]=> + string(6) "&nbsp;" + ["¡"]=> + string(7) "&iexcl;" + ["¢"]=> + string(6) "&cent;" + ["£"]=> + string(7) "&pound;" + ["¤"]=> + string(8) "&curren;" + ["¥"]=> + string(5) "&yen;" + ["¦"]=> + string(8) "&brvbar;" + ["§"]=> + string(6) "&sect;" + ["¨"]=> + string(5) "&uml;" + ["©"]=> + string(6) "&copy;" + ["ª"]=> + string(6) "&ordf;" + ["«"]=> + string(7) "&laquo;" + ["¬"]=> + string(5) "&not;" + ["­"]=> + string(5) "&shy;" + ["®"]=> + string(5) "&reg;" + ["¯"]=> + string(6) "&macr;" + ["°"]=> + string(5) "&deg;" + ["±"]=> + string(8) "&plusmn;" + ["²"]=> + string(6) "&sup2;" + ["³"]=> + string(6) "&sup3;" + ["´"]=> + string(7) "&acute;" + ["µ"]=> + string(7) "&micro;" + ["¶"]=> + string(6) "&para;" + ["·"]=> + string(8) "&middot;" + ["¸"]=> + string(7) "&cedil;" + ["¹"]=> + string(6) "&sup1;" + ["º"]=> + string(6) "&ordm;" + ["»"]=> + string(7) "&raquo;" + ["¼"]=> + string(8) "&frac14;" + ["½"]=> + string(8) "&frac12;" + ["¾"]=> + string(8) "&frac34;" + ["¿"]=> + string(8) "&iquest;" + ["À"]=> + string(8) "&Agrave;" + ["Á"]=> + string(8) "&Aacute;" + ["Â"]=> + string(7) "&Acirc;" + ["Ã"]=> + string(8) "&Atilde;" + ["Ä"]=> + string(6) "&Auml;" + ["Å"]=> + string(7) "&Aring;" + ["Æ"]=> + string(7) "&AElig;" + ["Ç"]=> + string(8) "&Ccedil;" + ["È"]=> + string(8) "&Egrave;" + ["É"]=> + string(8) "&Eacute;" + ["Ê"]=> + string(7) "&Ecirc;" + ["Ë"]=> + string(6) "&Euml;" + ["Ì"]=> + string(8) "&Igrave;" + ["Í"]=> + string(8) "&Iacute;" + ["Î"]=> + string(7) "&Icirc;" + ["Ï"]=> + string(6) "&Iuml;" + ["Ð"]=> + string(5) "&ETH;" + ["Ñ"]=> + string(8) "&Ntilde;" + ["Ò"]=> + string(8) "&Ograve;" + ["Ó"]=> + string(8) "&Oacute;" + ["Ô"]=> + string(7) "&Ocirc;" + ["Õ"]=> + string(8) "&Otilde;" + ["Ö"]=> + string(6) "&Ouml;" + ["×"]=> + string(7) "&times;" + ["Ø"]=> + string(8) "&Oslash;" + ["Ù"]=> + string(8) "&Ugrave;" + ["Ú"]=> + string(8) "&Uacute;" + ["Û"]=> + string(7) "&Ucirc;" + ["Ü"]=> + string(6) "&Uuml;" + ["Ý"]=> + string(8) "&Yacute;" + ["Þ"]=> + string(7) "&THORN;" + ["ß"]=> + string(7) "&szlig;" + ["à"]=> + string(8) "&agrave;" + ["á"]=> + string(8) "&aacute;" + ["â"]=> + string(7) "&acirc;" + ["ã"]=> + string(8) "&atilde;" + ["ä"]=> + string(6) "&auml;" + ["å"]=> + string(7) "&aring;" + ["æ"]=> + string(7) "&aelig;" + ["ç"]=> + string(8) "&ccedil;" + ["è"]=> + string(8) "&egrave;" + ["é"]=> + string(8) "&eacute;" + ["ê"]=> + string(7) "&ecirc;" + ["ë"]=> + string(6) "&euml;" + ["ì"]=> + string(8) "&igrave;" + ["í"]=> + string(8) "&iacute;" + ["î"]=> + string(7) "&icirc;" + ["ï"]=> + string(6) "&iuml;" + ["ð"]=> + string(5) "&eth;" + ["ñ"]=> + string(8) "&ntilde;" + ["ò"]=> + string(8) "&ograve;" + ["ó"]=> + string(8) "&oacute;" + ["ô"]=> + string(7) "&ocirc;" + ["õ"]=> + string(8) "&otilde;" + ["ö"]=> + string(6) "&ouml;" + ["÷"]=> + string(8) "&divide;" + ["ø"]=> + string(8) "&oslash;" + ["ù"]=> + string(8) "&ugrave;" + ["ú"]=> + string(8) "&uacute;" + ["û"]=> + string(7) "&ucirc;" + ["ü"]=> + string(6) "&uuml;" + ["ý"]=> + string(8) "&yacute;" + ["þ"]=> + string(7) "&thorn;" + ["ÿ"]=> + string(6) "&yuml;" + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- with table = HTML_SPECIALCHARS -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +Done +--UEXPECTF-- +*** Testing get_html_translation_table() : basic functionality *** +-- with default arguments -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- with table = HTML_ENTITIES -- +array(311) { + [u" "]=> + unicode(6) "&nbsp;" + [u"¡"]=> + unicode(7) "&iexcl;" + [u"¢"]=> + unicode(6) "&cent;" + [u"£"]=> + unicode(7) "&pound;" + [u"¤"]=> + unicode(8) "&curren;" + [u"Â¥"]=> + unicode(5) "&yen;" + [u"¦"]=> + unicode(8) "&brvbar;" + [u"§"]=> + unicode(6) "&sect;" + [u"¨"]=> + unicode(5) "&uml;" + [u"©"]=> + unicode(6) "&copy;" + [u"ª"]=> + unicode(6) "&ordf;" + [u"«"]=> + unicode(7) "&laquo;" + [u"¬"]=> + unicode(5) "&not;" + [u"­"]=> + unicode(5) "&shy;" + [u"®"]=> + unicode(5) "&reg;" + [u"¯"]=> + unicode(6) "&macr;" + [u"°"]=> + unicode(5) "&deg;" + [u"±"]=> + unicode(8) "&plusmn;" + [u"²"]=> + unicode(6) "&sup2;" + [u"³"]=> + unicode(6) "&sup3;" + [u"´"]=> + unicode(7) "&acute;" + [u"µ"]=> + unicode(7) "&micro;" + [u"¶"]=> + unicode(6) "&para;" + [u"·"]=> + unicode(8) "&middot;" + [u"¸"]=> + unicode(7) "&cedil;" + [u"¹"]=> + unicode(6) "&sup1;" + [u"º"]=> + unicode(6) "&ordm;" + [u"»"]=> + unicode(7) "&raquo;" + [u"¼"]=> + unicode(8) "&frac14;" + [u"½"]=> + unicode(8) "&frac12;" + [u"¾"]=> + unicode(8) "&frac34;" + [u"¿"]=> + unicode(8) "&iquest;" + [u"À"]=> + unicode(8) "&Agrave;" + [u"Á"]=> + unicode(8) "&Aacute;" + [u"Â"]=> + unicode(7) "&Acirc;" + [u"Ã"]=> + unicode(8) "&Atilde;" + [u"Ä"]=> + unicode(6) "&Auml;" + [u"Å"]=> + unicode(7) "&Aring;" + [u"Æ"]=> + unicode(7) "&AElig;" + [u"Ç"]=> + unicode(8) "&Ccedil;" + [u"È"]=> + unicode(8) "&Egrave;" + [u"É"]=> + unicode(8) "&Eacute;" + [u"Ê"]=> + unicode(7) "&Ecirc;" + [u"Ë"]=> + unicode(6) "&Euml;" + [u"Ì"]=> + unicode(8) "&Igrave;" + [u"Í"]=> + unicode(8) "&Iacute;" + [u"Î"]=> + unicode(7) "&Icirc;" + [u"Ï"]=> + unicode(6) "&Iuml;" + [u"Ð"]=> + unicode(5) "&ETH;" + [u"Ñ"]=> + unicode(8) "&Ntilde;" + [u"Ò"]=> + unicode(8) "&Ograve;" + [u"Ó"]=> + unicode(8) "&Oacute;" + [u"Ô"]=> + unicode(7) "&Ocirc;" + [u"Õ"]=> + unicode(8) "&Otilde;" + [u"Ö"]=> + unicode(6) "&Ouml;" + [u"×"]=> + unicode(7) "&times;" + [u"Ø"]=> + unicode(8) "&Oslash;" + [u"Ù"]=> + unicode(8) "&Ugrave;" + [u"Ú"]=> + unicode(8) "&Uacute;" + [u"Û"]=> + unicode(7) "&Ucirc;" + [u"Ü"]=> + unicode(6) "&Uuml;" + [u"Ý"]=> + unicode(8) "&Yacute;" + [u"Þ"]=> + unicode(7) "&THORN;" + [u"ß"]=> + unicode(7) "&szlig;" + [u"à"]=> + unicode(8) "&agrave;" + [u"á"]=> + unicode(8) "&aacute;" + [u"â"]=> + unicode(7) "&acirc;" + [u"ã"]=> + unicode(8) "&atilde;" + [u"ä"]=> + unicode(6) "&auml;" + [u"Ã¥"]=> + unicode(7) "&aring;" + [u"æ"]=> + unicode(7) "&aelig;" + [u"ç"]=> + unicode(8) "&ccedil;" + [u"è"]=> + unicode(8) "&egrave;" + [u"é"]=> + unicode(8) "&eacute;" + [u"ê"]=> + unicode(7) "&ecirc;" + [u"ë"]=> + unicode(6) "&euml;" + [u"ì"]=> + unicode(8) "&igrave;" + [u"í"]=> + unicode(8) "&iacute;" + [u"î"]=> + unicode(7) "&icirc;" + [u"ï"]=> + unicode(6) "&iuml;" + [u"ð"]=> + unicode(5) "&eth;" + [u"ñ"]=> + unicode(8) "&ntilde;" + [u"ò"]=> + unicode(8) "&ograve;" + [u"ó"]=> + unicode(8) "&oacute;" + [u"ô"]=> + unicode(7) "&ocirc;" + [u"õ"]=> + unicode(8) "&otilde;" + [u"ö"]=> + unicode(6) "&ouml;" + [u"÷"]=> + unicode(8) "&divide;" + [u"ø"]=> + unicode(8) "&oslash;" + [u"ù"]=> + unicode(8) "&ugrave;" + [u"ú"]=> + unicode(8) "&uacute;" + [u"û"]=> + unicode(7) "&ucirc;" + [u"ü"]=> + unicode(6) "&uuml;" + [u"ý"]=> + unicode(8) "&yacute;" + [u"þ"]=> + unicode(7) "&thorn;" + [u"ÿ"]=> + unicode(6) "&yuml;" + [u"Œ"]=> + unicode(7) "&OElig;" + [u"œ"]=> + unicode(7) "&oelig;" + [u"Å "]=> + unicode(8) "&Scaron;" + [u"Å¡"]=> + unicode(8) "&scaron;" + [u"Ÿ"]=> + unicode(6) "&Yuml;" + [u"ƒ"]=> + unicode(6) "&fnof;" + [u"ˆ"]=> + unicode(6) "&circ;" + [u"˜"]=> + unicode(7) "&tilde;" + [u"Α"]=> + unicode(7) "&Alpha;" + [u"Β"]=> + unicode(6) "&Beta;" + [u"Γ"]=> + unicode(7) "&Gamma;" + [u"Δ"]=> + unicode(7) "&Delta;" + [u"Ε"]=> + unicode(9) "&Epsilon;" + [u"Ζ"]=> + unicode(6) "&Zeta;" + [u"Η"]=> + unicode(5) "&Eta;" + [u"Θ"]=> + unicode(7) "&Theta;" + [u"Ι"]=> + unicode(6) "&Iota;" + [u"Κ"]=> + unicode(7) "&Kappa;" + [u"Λ"]=> + unicode(8) "&Lambda;" + [u"Μ"]=> + unicode(4) "&Mu;" + [u"Ν"]=> + unicode(4) "&Nu;" + [u"Ξ"]=> + unicode(4) "&Xi;" + [u"Ο"]=> + unicode(9) "&Omicron;" + [u"Π"]=> + unicode(4) "&Pi;" + [u"Ρ"]=> + unicode(5) "&Rho;" + [u"Σ"]=> + unicode(7) "&Sigma;" + [u"Τ"]=> + unicode(5) "&Tau;" + [u"Î¥"]=> + unicode(9) "&Upsilon;" + [u"Φ"]=> + unicode(5) "&Phi;" + [u"Χ"]=> + unicode(5) "&Chi;" + [u"Ψ"]=> + unicode(5) "&Psi;" + [u"Ω"]=> + unicode(7) "&Omega;" + [u"α"]=> + unicode(7) "&alpha;" + [u"β"]=> + unicode(6) "&beta;" + [u"γ"]=> + unicode(7) "&gamma;" + [u"δ"]=> + unicode(7) "&delta;" + [u"ε"]=> + unicode(9) "&epsilon;" + [u"ζ"]=> + unicode(6) "&zeta;" + [u"η"]=> + unicode(5) "&eta;" + [u"θ"]=> + unicode(7) "&theta;" + [u"ι"]=> + unicode(6) "&iota;" + [u"κ"]=> + unicode(7) "&kappa;" + [u"λ"]=> + unicode(8) "&lambda;" + [u"μ"]=> + unicode(4) "&mu;" + [u"ν"]=> + unicode(4) "&nu;" + [u"ξ"]=> + unicode(4) "&xi;" + [u"ο"]=> + unicode(9) "&omicron;" + [u"π"]=> + unicode(4) "&pi;" + [u"ρ"]=> + unicode(5) "&rho;" + [u"ς"]=> + unicode(8) "&sigmaf;" + [u"σ"]=> + unicode(7) "&sigma;" + [u"τ"]=> + unicode(5) "&tau;" + [u"υ"]=> + unicode(9) "&upsilon;" + [u"φ"]=> + unicode(5) "&phi;" + [u"χ"]=> + unicode(5) "&chi;" + [u"ψ"]=> + unicode(5) "&psi;" + [u"ω"]=> + unicode(7) "&omega;" + [u"ϑ"]=> + unicode(10) "&thetasym;" + [u"ϒ"]=> + unicode(7) "&upsih;" + [u"ϖ"]=> + unicode(5) "&piv;" + [u" "]=> + unicode(6) "&ensp;" + [u" "]=> + unicode(6) "&emsp;" + [u" "]=> + unicode(8) "&thinsp;" + [u"‌"]=> + unicode(6) "&zwnj;" + [u"‍"]=> + unicode(5) "&zwj;" + [u"‎"]=> + unicode(5) "&lrm;" + [u"‏"]=> + unicode(5) "&rlm;" + [u"–"]=> + unicode(7) "&ndash;" + [u"—"]=> + unicode(7) "&mdash;" + [u"‘"]=> + unicode(7) "&lsquo;" + [u"’"]=> + unicode(7) "&rsquo;" + [u"‚"]=> + unicode(7) "&sbquo;" + [u"“"]=> + unicode(7) "&ldquo;" + [u"”"]=> + unicode(7) "&rdquo;" + [u"„"]=> + unicode(7) "&bdquo;" + [u"†"]=> + unicode(8) "&dagger;" + [u"‡"]=> + unicode(8) "&Dagger;" + [u"•"]=> + unicode(6) "&bull;" + [u"…"]=> + unicode(8) "&hellip;" + [u"‰"]=> + unicode(8) "&permil;" + [u"′"]=> + unicode(7) "&prime;" + [u"″"]=> + unicode(7) "&Prime;" + [u"‹"]=> + unicode(8) "&lsaquo;" + [u"›"]=> + unicode(8) "&rsaquo;" + [u"‾"]=> + unicode(7) "&oline;" + [u"⁄"]=> + unicode(7) "&frasl;" + [u"€"]=> + unicode(6) "&euro;" + [u"ℑ"]=> + unicode(7) "&image;" + [u"℘"]=> + unicode(8) "&weierp;" + [u"ℜ"]=> + unicode(6) "&real;" + [u"™"]=> + unicode(7) "&trade;" + [u"ℵ"]=> + unicode(9) "&alefsym;" + [u"←"]=> + unicode(6) "&larr;" + [u"↑"]=> + unicode(6) "&uarr;" + [u"→"]=> + unicode(6) "&rarr;" + [u"↓"]=> + unicode(6) "&darr;" + [u"↔"]=> + unicode(6) "&harr;" + [u"↵"]=> + unicode(7) "&crarr;" + [u"⇐"]=> + unicode(6) "&lArr;" + [u"⇑"]=> + unicode(6) "&uArr;" + [u"⇒"]=> + unicode(6) "&rArr;" + [u"⇓"]=> + unicode(6) "&dArr;" + [u"⇔"]=> + unicode(6) "&hArr;" + [u"⇕"]=> + unicode(6) "&vArr;" + [u"⇚"]=> + unicode(7) "&lAarr;" + [u"⇛"]=> + unicode(7) "&rAarr;" + [u"⇝"]=> + unicode(7) "&rarrw;" + [u"∀"]=> + unicode(8) "&forall;" + [u"∁"]=> + unicode(6) "&comp;" + [u"∂"]=> + unicode(6) "&part;" + [u"∃"]=> + unicode(7) "&exist;" + [u"∄"]=> + unicode(8) "&nexist;" + [u"∅"]=> + unicode(7) "&empty;" + [u"∇"]=> + unicode(7) "&nabla;" + [u"∈"]=> + unicode(6) "&isin;" + [u"∉"]=> + unicode(7) "&notin;" + [u"∊"]=> + unicode(7) "&epsis;" + [u"∋"]=> + unicode(4) "&ni;" + [u"∌"]=> + unicode(7) "&notni;" + [u"∍"]=> + unicode(7) "&bepsi;" + [u"∏"]=> + unicode(6) "&prod;" + [u"∐"]=> + unicode(8) "&coprod;" + [u"∑"]=> + unicode(5) "&sum;" + [u"−"]=> + unicode(7) "&minus;" + [u"∓"]=> + unicode(8) "&mnplus;" + [u"∔"]=> + unicode(8) "&plusdo;" + [u"∖"]=> + unicode(7) "&setmn;" + [u"∗"]=> + unicode(8) "&lowast;" + [u"∘"]=> + unicode(8) "&compfn;" + [u"√"]=> + unicode(7) "&radic;" + [u"∝"]=> + unicode(6) "&prop;" + [u"∞"]=> + unicode(7) "&infin;" + [u"∟"]=> + unicode(7) "&ang90;" + [u"∠"]=> + unicode(5) "&ang;" + [u"∡"]=> + unicode(8) "&angmsd;" + [u"∢"]=> + unicode(8) "&angsph;" + [u"∣"]=> + unicode(5) "&mid;" + [u"∤"]=> + unicode(6) "&nmid;" + [u"∥"]=> + unicode(5) "&par;" + [u"∦"]=> + unicode(6) "&npar;" + [u"∧"]=> + unicode(5) "&and;" + [u"∨"]=> + unicode(4) "&or;" + [u"∩"]=> + unicode(5) "&cap;" + [u"∪"]=> + unicode(5) "&cup;" + [u"∫"]=> + unicode(5) "&int;" + [u"∮"]=> + unicode(8) "&conint;" + [u"∴"]=> + unicode(8) "&there4;" + [u"∵"]=> + unicode(8) "&becaus;" + [u"∼"]=> + unicode(5) "&sim;" + [u"∽"]=> + unicode(6) "&bsim;" + [u"≀"]=> + unicode(8) "&wreath;" + [u"≁"]=> + unicode(6) "&nsim;" + [u"≃"]=> + unicode(6) "&sime;" + [u"≄"]=> + unicode(7) "&nsime;" + [u"≅"]=> + unicode(6) "&cong;" + [u"≇"]=> + unicode(7) "&ncong;" + [u"≈"]=> + unicode(7) "&asymp;" + [u"≉"]=> + unicode(5) "&nap;" + [u"≊"]=> + unicode(5) "&ape;" + [u"≌"]=> + unicode(7) "&bcong;" + [u"≍"]=> + unicode(7) "&asymp;" + [u"≎"]=> + unicode(6) "&bump;" + [u"≏"]=> + unicode(7) "&bumpe;" + [u"≠"]=> + unicode(4) "&ne;" + [u"≡"]=> + unicode(7) "&equiv;" + [u"≤"]=> + unicode(4) "&le;" + [u"≥"]=> + unicode(4) "&ge;" + [u"≦"]=> + unicode(4) "&lE;" + [u"≧"]=> + unicode(4) "&gE;" + [u"≨"]=> + unicode(5) "&lnE;" + [u"≩"]=> + unicode(5) "&gnE;" + [u"≪"]=> + unicode(4) "&Lt;" + [u"≫"]=> + unicode(4) "&Gt;" + [u"≬"]=> + unicode(7) "&twixt;" + [u"≮"]=> + unicode(5) "&nlt;" + [u"≯"]=> + unicode(5) "&ngt;" + [u"≰"]=> + unicode(6) "&nles;" + [u"≱"]=> + unicode(6) "&nges;" + [u"≲"]=> + unicode(6) "&lsim;" + [u"≳"]=> + unicode(6) "&gsim;" + [u"≶"]=> + unicode(4) "&lg;" + [u"≷"]=> + unicode(4) "&gl;" + [u"≺"]=> + unicode(4) "&pr;" + [u"≻"]=> + unicode(4) "&sc;" + [u"≼"]=> + unicode(7) "&cupre;" + [u"≽"]=> + unicode(7) "&sscue;" + [u"≾"]=> + unicode(7) "&prsim;" + [u"≿"]=> + unicode(7) "&scsim;" + [u"⊀"]=> + unicode(5) "&npr;" + [u"⊁"]=> + unicode(5) "&nsc;" + [u"⊂"]=> + unicode(5) "&sub;" + [u"⊃"]=> + unicode(5) "&sup;" + [u"⊄"]=> + unicode(6) "&nsub;" + [u"⊅"]=> + unicode(6) "&nsup;" + [u"⊆"]=> + unicode(6) "&sube;" + [u"⊇"]=> + unicode(6) "&supe;" + [u"⊕"]=> + unicode(7) "&oplus;" + [u"⊗"]=> + unicode(8) "&otimes;" + [u"⊥"]=> + unicode(6) "&perp;" + [u"⋅"]=> + unicode(6) "&sdot;" + [u"⌈"]=> + unicode(7) "&lceil;" + [u"⌉"]=> + unicode(7) "&rceil;" + [u"⌊"]=> + unicode(8) "&lfloor;" + [u"⌋"]=> + unicode(8) "&rfloor;" + [u"〈"]=> + unicode(6) "&lang;" + [u"〉"]=> + unicode(6) "&rang;" + [u"◊"]=> + unicode(5) "&loz;" + [u"♠"]=> + unicode(8) "&spades;" + [u"♣"]=> + unicode(7) "&clubs;" + [u"♥"]=> + unicode(8) "&hearts;" + [u"♦"]=> + unicode(7) "&diams;" + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- with table = HTML_SPECIALCHARS -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/get_html_translation_table_basic2-win32.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/strings/get_html_translation_table_basic2-win32.phpt diff -u /dev/null php-src/ext/standard/tests/strings/get_html_translation_table_basic2-win32.phpt:1.2 --- /dev/null Mon Oct 8 15:30:38 2007 +++ php-src/ext/standard/tests/strings/get_html_translation_table_basic2-win32.phpt Mon Oct 8 15:30:37 2007 @@ -0,0 +1,1734 @@ +--TEST-- +Test get_html_translation_table() function : basic functionality - table as HTML_ENTITIES & quote_style(ENT_COMPAT, ENT_QUOTES) +--SKIPIF-- +<?php +if( substr(PHP_OS, 0, 3) != "WIN"){ + die('skip only for Windows'); +} + +if( ini_get("unicode.semantics") == "1") + die('skip do not run when unicode on'); + +if( !setlocale(LC_ALL, "English_United States.1252") ) { + die('skip failed to set locale settings to "English_United States.1252"'); +} +?> +--FILE-- +<?php +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) + * Description: Returns the internal translation table used by htmlspecialchars and htmlentities + * Source code: ext/standard/html.c +*/ + +/* Test get_html_translation_table() when table is specified as HTML_ENTITIES */ + +//set locale +setlocale(LC_ALL, "English_United States.1252"); + +echo "*** Testing get_html_translation_table() : basic functionality ***\n"; + +// Calling get_html_translation_table() with default arguments +echo "-- with default arguments --\n"; +var_dump( get_html_translation_table() ); + +// Calling get_html_translation_table() with all arguments +// $table as HTML_ENTITIES and different quote style +echo "-- with table = HTML_ENTITIES & quote_style = ENT_COMPAT --\n"; +$table = HTML_ENTITIES; +$quote_style = ENT_COMPAT; +var_dump( get_html_translation_table($table, $quote_style) ); + +echo "-- with table = HTML_ENTITIES & quote_style = ENT_QUOTES --\n"; +$quote_style = ENT_QUOTES; +var_dump( get_html_translation_table($table, $quote_style) ); + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing get_html_translation_table() : basic functionality *** +-- with default arguments -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- with table = HTML_ENTITIES & quote_style = ENT_COMPAT -- +array(100) { + [" "]=> + string(6) "&nbsp;" + ["¡"]=> + string(7) "&iexcl;" + ["¢"]=> + string(6) "&cent;" + ["£"]=> + string(7) "&pound;" + ["¤"]=> + string(8) "&curren;" + ["¥"]=> + string(5) "&yen;" + ["¦"]=> + string(8) "&brvbar;" + ["§"]=> + string(6) "&sect;" + ["¨"]=> + string(5) "&uml;" + ["©"]=> + string(6) "&copy;" + ["ª"]=> + string(6) "&ordf;" + ["«"]=> + string(7) "&laquo;" + ["¬"]=> + string(5) "&not;" + ["­"]=> + string(5) "&shy;" + ["®"]=> + string(5) "&reg;" + ["¯"]=> + string(6) "&macr;" + ["°"]=> + string(5) "&deg;" + ["±"]=> + string(8) "&plusmn;" + ["²"]=> + string(6) "&sup2;" + ["³"]=> + string(6) "&sup3;" + ["´"]=> + string(7) "&acute;" + ["µ"]=> + string(7) "&micro;" + ["¶"]=> + string(6) "&para;" + ["·"]=> + string(8) "&middot;" + ["¸"]=> + string(7) "&cedil;" + ["¹"]=> + string(6) "&sup1;" + ["º"]=> + string(6) "&ordm;" + ["»"]=> + string(7) "&raquo;" + ["¼"]=> + string(8) "&frac14;" + ["½"]=> + string(8) "&frac12;" + ["¾"]=> + string(8) "&frac34;" + ["¿"]=> + string(8) "&iquest;" + ["À"]=> + string(8) "&Agrave;" + ["Á"]=> + string(8) "&Aacute;" + ["Â"]=> + string(7) "&Acirc;" + ["Ã"]=> + string(8) "&Atilde;" + ["Ä"]=> + string(6) "&Auml;" + ["Å"]=> + string(7) "&Aring;" + ["Æ"]=> + string(7) "&AElig;" + ["Ç"]=> + string(8) "&Ccedil;" + ["È"]=> + string(8) "&Egrave;" + ["É"]=> + string(8) "&Eacute;" + ["Ê"]=> + string(7) "&Ecirc;" + ["Ë"]=> + string(6) "&Euml;" + ["Ì"]=> + string(8) "&Igrave;" + ["Í"]=> + string(8) "&Iacute;" + ["Î"]=> + string(7) "&Icirc;" + ["Ï"]=> + string(6) "&Iuml;" + ["Ð"]=> + string(5) "&ETH;" + ["Ñ"]=> + string(8) "&Ntilde;" + ["Ò"]=> + string(8) "&Ograve;" + ["Ó"]=> + string(8) "&Oacute;" + ["Ô"]=> + string(7) "&Ocirc;" + ["Õ"]=> + string(8) "&Otilde;" + ["Ö"]=> + string(6) "&Ouml;" + ["×"]=> + string(7) "&times;" + ["Ø"]=> + string(8) "&Oslash;" + ["Ù"]=> + string(8) "&Ugrave;" + ["Ú"]=> + string(8) "&Uacute;" + ["Û"]=> + string(7) "&Ucirc;" + ["Ü"]=> + string(6) "&Uuml;" + ["Ý"]=> + string(8) "&Yacute;" + ["Þ"]=> + string(7) "&THORN;" + ["ß"]=> + string(7) "&szlig;" + ["à"]=> + string(8) "&agrave;" + ["á"]=> + string(8) "&aacute;" + ["â"]=> + string(7) "&acirc;" + ["ã"]=> + string(8) "&atilde;" + ["ä"]=> + string(6) "&auml;" + ["å"]=> + string(7) "&aring;" + ["æ"]=> + string(7) "&aelig;" + ["ç"]=> + string(8) "&ccedil;" + ["è"]=> + string(8) "&egrave;" + ["é"]=> + string(8) "&eacute;" + ["ê"]=> + string(7) "&ecirc;" + ["ë"]=> + string(6) "&euml;" + ["ì"]=> + string(8) "&igrave;" + ["í"]=> + string(8) "&iacute;" + ["î"]=> + string(7) "&icirc;" + ["ï"]=> + string(6) "&iuml;" + ["ð"]=> + string(5) "&eth;" + ["ñ"]=> + string(8) "&ntilde;" + ["ò"]=> + string(8) "&ograve;" + ["ó"]=> + string(8) "&oacute;" + ["ô"]=> + string(7) "&ocirc;" + ["õ"]=> + string(8) "&otilde;" + ["ö"]=> + string(6) "&ouml;" + ["÷"]=> + string(8) "&divide;" + ["ø"]=> + string(8) "&oslash;" + ["ù"]=> + string(8) "&ugrave;" + ["ú"]=> + string(8) "&uacute;" + ["û"]=> + string(7) "&ucirc;" + ["ü"]=> + string(6) "&uuml;" + ["ý"]=> + string(8) "&yacute;" + ["þ"]=> + string(7) "&thorn;" + ["ÿ"]=> + string(6) "&yuml;" + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- with table = HTML_ENTITIES & quote_style = ENT_QUOTES -- +array(101) { + [" "]=> + string(6) "&nbsp;" + ["¡"]=> + string(7) "&iexcl;" + ["¢"]=> + string(6) "&cent;" + ["£"]=> + string(7) "&pound;" + ["¤"]=> + string(8) "&curren;" + ["¥"]=> + string(5) "&yen;" + ["¦"]=> + string(8) "&brvbar;" + ["§"]=> + string(6) "&sect;" + ["¨"]=> + string(5) "&uml;" + ["©"]=> + string(6) "&copy;" + ["ª"]=> + string(6) "&ordf;" + ["«"]=> + string(7) "&laquo;" + ["¬"]=> + string(5) "&not;" + ["­"]=> + string(5) "&shy;" + ["®"]=> + string(5) "&reg;" + ["¯"]=> + string(6) "&macr;" + ["°"]=> + string(5) "&deg;" + ["±"]=> + string(8) "&plusmn;" + ["²"]=> + string(6) "&sup2;" + ["³"]=> + string(6) "&sup3;" + ["´"]=> + string(7) "&acute;" + ["µ"]=> + string(7) "&micro;" + ["¶"]=> + string(6) "&para;" + ["·"]=> + string(8) "&middot;" + ["¸"]=> + string(7) "&cedil;" + ["¹"]=> + string(6) "&sup1;" + ["º"]=> + string(6) "&ordm;" + ["»"]=> + string(7) "&raquo;" + ["¼"]=> + string(8) "&frac14;" + ["½"]=> + string(8) "&frac12;" + ["¾"]=> + string(8) "&frac34;" + ["¿"]=> + string(8) "&iquest;" + ["À"]=> + string(8) "&Agrave;" + ["Á"]=> + string(8) "&Aacute;" + ["Â"]=> + string(7) "&Acirc;" + ["Ã"]=> + string(8) "&Atilde;" + ["Ä"]=> + string(6) "&Auml;" + ["Å"]=> + string(7) "&Aring;" + ["Æ"]=> + string(7) "&AElig;" + ["Ç"]=> + string(8) "&Ccedil;" + ["È"]=> + string(8) "&Egrave;" + ["É"]=> + string(8) "&Eacute;" + ["Ê"]=> + string(7) "&Ecirc;" + ["Ë"]=> + string(6) "&Euml;" + ["Ì"]=> + string(8) "&Igrave;" + ["Í"]=> + string(8) "&Iacute;" + ["Î"]=> + string(7) "&Icirc;" + ["Ï"]=> + string(6) "&Iuml;" + ["Ð"]=> + string(5) "&ETH;" + ["Ñ"]=> + string(8) "&Ntilde;" + ["Ò"]=> + string(8) "&Ograve;" + ["Ó"]=> + string(8) "&Oacute;" + ["Ô"]=> + string(7) "&Ocirc;" + ["Õ"]=> + string(8) "&Otilde;" + ["Ö"]=> + string(6) "&Ouml;" + ["×"]=> + string(7) "&times;" + ["Ø"]=> + string(8) "&Oslash;" + ["Ù"]=> + string(8) "&Ugrave;" + ["Ú"]=> + string(8) "&Uacute;" + ["Û"]=> + string(7) "&Ucirc;" + ["Ü"]=> + string(6) "&Uuml;" + ["Ý"]=> + string(8) "&Yacute;" + ["Þ"]=> + string(7) "&THORN;" + ["ß"]=> + string(7) "&szlig;" + ["à"]=> + string(8) "&agrave;" + ["á"]=> + string(8) "&aacute;" + ["â"]=> + string(7) "&acirc;" + ["ã"]=> + string(8) "&atilde;" + ["ä"]=> + string(6) "&auml;" + ["å"]=> + string(7) "&aring;" + ["æ"]=> + string(7) "&aelig;" + ["ç"]=> + string(8) "&ccedil;" + ["è"]=> + string(8) "&egrave;" + ["é"]=> + string(8) "&eacute;" + ["ê"]=> + string(7) "&ecirc;" + ["ë"]=> + string(6) "&euml;" + ["ì"]=> + string(8) "&igrave;" + ["í"]=> + string(8) "&iacute;" + ["î"]=> + string(7) "&icirc;" + ["ï"]=> + string(6) "&iuml;" + ["ð"]=> + string(5) "&eth;" + ["ñ"]=> + string(8) "&ntilde;" + ["ò"]=> + string(8) "&ograve;" + ["ó"]=> + string(8) "&oacute;" + ["ô"]=> + string(7) "&ocirc;" + ["õ"]=> + string(8) "&otilde;" + ["ö"]=> + string(6) "&ouml;" + ["÷"]=> + string(8) "&divide;" + ["ø"]=> + string(8) "&oslash;" + ["ù"]=> + string(8) "&ugrave;" + ["ú"]=> + string(8) "&uacute;" + ["û"]=> + string(7) "&ucirc;" + ["ü"]=> + string(6) "&uuml;" + ["ý"]=> + string(8) "&yacute;" + ["þ"]=> + string(7) "&thorn;" + ["ÿ"]=> + string(6) "&yuml;" + ["""]=> + string(6) "&quot;" + ["'"]=> + string(5) "&#39;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +Done +--UEXPECTF-- +*** Testing get_html_translation_table() : basic functionality *** +-- with default arguments -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- with table = HTML_ENTITIES & quote_style = ENT_COMPAT -- +array(311) { + [u" "]=> + unicode(6) "&nbsp;" + [u"¡"]=> + unicode(7) "&iexcl;" + [u"¢"]=> + unicode(6) "&cent;" + [u"£"]=> + unicode(7) "&pound;" + [u"¤"]=> + unicode(8) "&curren;" + [u"Â¥"]=> + unicode(5) "&yen;" + [u"¦"]=> + unicode(8) "&brvbar;" + [u"§"]=> + unicode(6) "&sect;" + [u"¨"]=> + unicode(5) "&uml;" + [u"©"]=> + unicode(6) "&copy;" + [u"ª"]=> + unicode(6) "&ordf;" + [u"«"]=> + unicode(7) "&laquo;" + [u"¬"]=> + unicode(5) "&not;" + [u"­"]=> + unicode(5) "&shy;" + [u"®"]=> + unicode(5) "&reg;" + [u"¯"]=> + unicode(6) "&macr;" + [u"°"]=> + unicode(5) "&deg;" + [u"±"]=> + unicode(8) "&plusmn;" + [u"²"]=> + unicode(6) "&sup2;" + [u"³"]=> + unicode(6) "&sup3;" + [u"´"]=> + unicode(7) "&acute;" + [u"µ"]=> + unicode(7) "&micro;" + [u"¶"]=> + unicode(6) "&para;" + [u"·"]=> + unicode(8) "&middot;" + [u"¸"]=> + unicode(7) "&cedil;" + [u"¹"]=> + unicode(6) "&sup1;" + [u"º"]=> + unicode(6) "&ordm;" + [u"»"]=> + unicode(7) "&raquo;" + [u"¼"]=> + unicode(8) "&frac14;" + [u"½"]=> + unicode(8) "&frac12;" + [u"¾"]=> + unicode(8) "&frac34;" + [u"¿"]=> + unicode(8) "&iquest;" + [u"À"]=> + unicode(8) "&Agrave;" + [u"Á"]=> + unicode(8) "&Aacute;" + [u"Â"]=> + unicode(7) "&Acirc;" + [u"Ã"]=> + unicode(8) "&Atilde;" + [u"Ä"]=> + unicode(6) "&Auml;" + [u"Å"]=> + unicode(7) "&Aring;" + [u"Æ"]=> + unicode(7) "&AElig;" + [u"Ç"]=> + unicode(8) "&Ccedil;" + [u"È"]=> + unicode(8) "&Egrave;" + [u"É"]=> + unicode(8) "&Eacute;" + [u"Ê"]=> + unicode(7) "&Ecirc;" + [u"Ë"]=> + unicode(6) "&Euml;" + [u"Ì"]=> + unicode(8) "&Igrave;" + [u"Í"]=> + unicode(8) "&Iacute;" + [u"Î"]=> + unicode(7) "&Icirc;" + [u"Ï"]=> + unicode(6) "&Iuml;" + [u"Ð"]=> + unicode(5) "&ETH;" + [u"Ñ"]=> + unicode(8) "&Ntilde;" + [u"Ò"]=> + unicode(8) "&Ograve;" + [u"Ó"]=> + unicode(8) "&Oacute;" + [u"Ô"]=> + unicode(7) "&Ocirc;" + [u"Õ"]=> + unicode(8) "&Otilde;" + [u"Ö"]=> + unicode(6) "&Ouml;" + [u"×"]=> + unicode(7) "&times;" + [u"Ø"]=> + unicode(8) "&Oslash;" + [u"Ù"]=> + unicode(8) "&Ugrave;" + [u"Ú"]=> + unicode(8) "&Uacute;" + [u"Û"]=> + unicode(7) "&Ucirc;" + [u"Ü"]=> + unicode(6) "&Uuml;" + [u"Ý"]=> + unicode(8) "&Yacute;" + [u"Þ"]=> + unicode(7) "&THORN;" + [u"ß"]=> + unicode(7) "&szlig;" + [u"à"]=> + unicode(8) "&agrave;" + [u"á"]=> + unicode(8) "&aacute;" + [u"â"]=> + unicode(7) "&acirc;" + [u"ã"]=> + unicode(8) "&atilde;" + [u"ä"]=> + unicode(6) "&auml;" + [u"Ã¥"]=> + unicode(7) "&aring;" + [u"æ"]=> + unicode(7) "&aelig;" + [u"ç"]=> + unicode(8) "&ccedil;" + [u"è"]=> + unicode(8) "&egrave;" + [u"é"]=> + unicode(8) "&eacute;" + [u"ê"]=> + unicode(7) "&ecirc;" + [u"ë"]=> + unicode(6) "&euml;" + [u"ì"]=> + unicode(8) "&igrave;" + [u"í"]=> + unicode(8) "&iacute;" + [u"î"]=> + unicode(7) "&icirc;" + [u"ï"]=> + unicode(6) "&iuml;" + [u"ð"]=> + unicode(5) "&eth;" + [u"ñ"]=> + unicode(8) "&ntilde;" + [u"ò"]=> + unicode(8) "&ograve;" + [u"ó"]=> + unicode(8) "&oacute;" + [u"ô"]=> + unicode(7) "&ocirc;" + [u"õ"]=> + unicode(8) "&otilde;" + [u"ö"]=> + unicode(6) "&ouml;" + [u"÷"]=> + unicode(8) "&divide;" + [u"ø"]=> + unicode(8) "&oslash;" + [u"ù"]=> + unicode(8) "&ugrave;" + [u"ú"]=> + unicode(8) "&uacute;" + [u"û"]=> + unicode(7) "&ucirc;" + [u"ü"]=> + unicode(6) "&uuml;" + [u"ý"]=> + unicode(8) "&yacute;" + [u"þ"]=> + unicode(7) "&thorn;" + [u"ÿ"]=> + unicode(6) "&yuml;" + [u"Œ"]=> + unicode(7) "&OElig;" + [u"œ"]=> + unicode(7) "&oelig;" + [u"Å "]=> + unicode(8) "&Scaron;" + [u"Å¡"]=> + unicode(8) "&scaron;" + [u"Ÿ"]=> + unicode(6) "&Yuml;" + [u"ƒ"]=> + unicode(6) "&fnof;" + [u"ˆ"]=> + unicode(6) "&circ;" + [u"˜"]=> + unicode(7) "&tilde;" + [u"Α"]=> + unicode(7) "&Alpha;" + [u"Β"]=> + unicode(6) "&Beta;" + [u"Γ"]=> + unicode(7) "&Gamma;" + [u"Δ"]=> + unicode(7) "&Delta;" + [u"Ε"]=> + unicode(9) "&Epsilon;" + [u"Ζ"]=> + unicode(6) "&Zeta;" + [u"Η"]=> + unicode(5) "&Eta;" + [u"Θ"]=> + unicode(7) "&Theta;" + [u"Ι"]=> + unicode(6) "&Iota;" + [u"Κ"]=> + unicode(7) "&Kappa;" + [u"Λ"]=> + unicode(8) "&Lambda;" + [u"Μ"]=> + unicode(4) "&Mu;" + [u"Ν"]=> + unicode(4) "&Nu;" + [u"Ξ"]=> + unicode(4) "&Xi;" + [u"Ο"]=> + unicode(9) "&Omicron;" + [u"Π"]=> + unicode(4) "&Pi;" + [u"Ρ"]=> + unicode(5) "&Rho;" + [u"Σ"]=> + unicode(7) "&Sigma;" + [u"Τ"]=> + unicode(5) "&Tau;" + [u"Î¥"]=> + unicode(9) "&Upsilon;" + [u"Φ"]=> + unicode(5) "&Phi;" + [u"Χ"]=> + unicode(5) "&Chi;" + [u"Ψ"]=> + unicode(5) "&Psi;" + [u"Ω"]=> + unicode(7) "&Omega;" + [u"α"]=> + unicode(7) "&alpha;" + [u"β"]=> + unicode(6) "&beta;" + [u"γ"]=> + unicode(7) "&gamma;" + [u"δ"]=> + unicode(7) "&delta;" + [u"ε"]=> + unicode(9) "&epsilon;" + [u"ζ"]=> + unicode(6) "&zeta;" + [u"η"]=> + unicode(5) "&eta;" + [u"θ"]=> + unicode(7) "&theta;" + [u"ι"]=> + unicode(6) "&iota;" + [u"κ"]=> + unicode(7) "&kappa;" + [u"λ"]=> + unicode(8) "&lambda;" + [u"μ"]=> + unicode(4) "&mu;" + [u"ν"]=> + unicode(4) "&nu;" + [u"ξ"]=> + unicode(4) "&xi;" + [u"ο"]=> + unicode(9) "&omicron;" + [u"π"]=> + unicode(4) "&pi;" + [u"ρ"]=> + unicode(5) "&rho;" + [u"ς"]=> + unicode(8) "&sigmaf;" + [u"σ"]=> + unicode(7) "&sigma;" + [u"τ"]=> + unicode(5) "&tau;" + [u"υ"]=> + unicode(9) "&upsilon;" + [u"φ"]=> + unicode(5) "&phi;" + [u"χ"]=> + unicode(5) "&chi;" + [u"ψ"]=> + unicode(5) "&psi;" + [u"ω"]=> + unicode(7) "&omega;" + [u"ϑ"]=> + unicode(10) "&thetasym;" + [u"ϒ"]=> + unicode(7) "&upsih;" + [u"ϖ"]=> + unicode(5) "&piv;" + [u" "]=> + unicode(6) "&ensp;" + [u" "]=> + unicode(6) "&emsp;" + [u" "]=> + unicode(8) "&thinsp;" + [u"‌"]=> + unicode(6) "&zwnj;" + [u"‍"]=> + unicode(5) "&zwj;" + [u"‎"]=> + unicode(5) "&lrm;" + [u"‏"]=> + unicode(5) "&rlm;" + [u"–"]=> + unicode(7) "&ndash;" + [u"—"]=> + unicode(7) "&mdash;" + [u"‘"]=> + unicode(7) "&lsquo;" + [u"’"]=> + unicode(7) "&rsquo;" + [u"‚"]=> + unicode(7) "&sbquo;" + [u"“"]=> + unicode(7) "&ldquo;" + [u"”"]=> + unicode(7) "&rdquo;" + [u"„"]=> + unicode(7) "&bdquo;" + [u"†"]=> + unicode(8) "&dagger;" + [u"‡"]=> + unicode(8) "&Dagger;" + [u"•"]=> + unicode(6) "&bull;" + [u"…"]=> + unicode(8) "&hellip;" + [u"‰"]=> + unicode(8) "&permil;" + [u"′"]=> + unicode(7) "&prime;" + [u"″"]=> + unicode(7) "&Prime;" + [u"‹"]=> + unicode(8) "&lsaquo;" + [u"›"]=> + unicode(8) "&rsaquo;" + [u"‾"]=> + unicode(7) "&oline;" + [u"⁄"]=> + unicode(7) "&frasl;" + [u"€"]=> + unicode(6) "&euro;" + [u"ℑ"]=> + unicode(7) "&image;" + [u"℘"]=> + unicode(8) "&weierp;" + [u"ℜ"]=> + unicode(6) "&real;" + [u"™"]=> + unicode(7) "&trade;" + [u"ℵ"]=> + unicode(9) "&alefsym;" + [u"←"]=> + unicode(6) "&larr;" + [u"↑"]=> + unicode(6) "&uarr;" + [u"→"]=> + unicode(6) "&rarr;" + [u"↓"]=> + unicode(6) "&darr;" + [u"↔"]=> + unicode(6) "&harr;" + [u"↵"]=> + unicode(7) "&crarr;" + [u"⇐"]=> + unicode(6) "&lArr;" + [u"⇑"]=> + unicode(6) "&uArr;" + [u"⇒"]=> + unicode(6) "&rArr;" + [u"⇓"]=> + unicode(6) "&dArr;" + [u"⇔"]=> + unicode(6) "&hArr;" + [u"⇕"]=> + unicode(6) "&vArr;" + [u"⇚"]=> + unicode(7) "&lAarr;" + [u"⇛"]=> + unicode(7) "&rAarr;" + [u"⇝"]=> + unicode(7) "&rarrw;" + [u"∀"]=> + unicode(8) "&forall;" + [u"∁"]=> + unicode(6) "&comp;" + [u"∂"]=> + unicode(6) "&part;" + [u"∃"]=> + unicode(7) "&exist;" + [u"∄"]=> + unicode(8) "&nexist;" + [u"∅"]=> + unicode(7) "&empty;" + [u"∇"]=> + unicode(7) "&nabla;" + [u"∈"]=> + unicode(6) "&isin;" + [u"∉"]=> + unicode(7) "&notin;" + [u"∊"]=> + unicode(7) "&epsis;" + [u"∋"]=> + unicode(4) "&ni;" + [u"∌"]=> + unicode(7) "&notni;" + [u"∍"]=> + unicode(7) "&bepsi;" + [u"∏"]=> + unicode(6) "&prod;" + [u"∐"]=> + unicode(8) "&coprod;" + [u"∑"]=> + unicode(5) "&sum;" + [u"−"]=> + unicode(7) "&minus;" + [u"∓"]=> + unicode(8) "&mnplus;" + [u"∔"]=> + unicode(8) "&plusdo;" + [u"∖"]=> + unicode(7) "&setmn;" + [u"∗"]=> + unicode(8) "&lowast;" + [u"∘"]=> + unicode(8) "&compfn;" + [u"√"]=> + unicode(7) "&radic;" + [u"∝"]=> + unicode(6) "&prop;" + [u"∞"]=> + unicode(7) "&infin;" + [u"∟"]=> + unicode(7) "&ang90;" + [u"∠"]=> + unicode(5) "&ang;" + [u"∡"]=> + unicode(8) "&angmsd;" + [u"∢"]=> + unicode(8) "&angsph;" + [u"∣"]=> + unicode(5) "&mid;" + [u"∤"]=> + unicode(6) "&nmid;" + [u"∥"]=> + unicode(5) "&par;" + [u"∦"]=> + unicode(6) "&npar;" + [u"∧"]=> + unicode(5) "&and;" + [u"∨"]=> + unicode(4) "&or;" + [u"∩"]=> + unicode(5) "&cap;" + [u"∪"]=> + unicode(5) "&cup;" + [u"∫"]=> + unicode(5) "&int;" + [u"∮"]=> + unicode(8) "&conint;" + [u"∴"]=> + unicode(8) "&there4;" + [u"∵"]=> + unicode(8) "&becaus;" + [u"∼"]=> + unicode(5) "&sim;" + [u"∽"]=> + unicode(6) "&bsim;" + [u"≀"]=> + unicode(8) "&wreath;" + [u"≁"]=> + unicode(6) "&nsim;" + [u"≃"]=> + unicode(6) "&sime;" + [u"≄"]=> + unicode(7) "&nsime;" + [u"≅"]=> + unicode(6) "&cong;" + [u"≇"]=> + unicode(7) "&ncong;" + [u"≈"]=> + unicode(7) "&asymp;" + [u"≉"]=> + unicode(5) "&nap;" + [u"≊"]=> + unicode(5) "&ape;" + [u"≌"]=> + unicode(7) "&bcong;" + [u"≍"]=> + unicode(7) "&asymp;" + [u"≎"]=> + unicode(6) "&bump;" + [u"≏"]=> + unicode(7) "&bumpe;" + [u"≠"]=> + unicode(4) "&ne;" + [u"≡"]=> + unicode(7) "&equiv;" + [u"≤"]=> + unicode(4) "&le;" + [u"≥"]=> + unicode(4) "&ge;" + [u"≦"]=> + unicode(4) "&lE;" + [u"≧"]=> + unicode(4) "&gE;" + [u"≨"]=> + unicode(5) "&lnE;" + [u"≩"]=> + unicode(5) "&gnE;" + [u"≪"]=> + unicode(4) "&Lt;" + [u"≫"]=> + unicode(4) "&Gt;" + [u"≬"]=> + unicode(7) "&twixt;" + [u"≮"]=> + unicode(5) "&nlt;" + [u"≯"]=> + unicode(5) "&ngt;" + [u"≰"]=> + unicode(6) "&nles;" + [u"≱"]=> + unicode(6) "&nges;" + [u"≲"]=> + unicode(6) "&lsim;" + [u"≳"]=> + unicode(6) "&gsim;" + [u"≶"]=> + unicode(4) "&lg;" + [u"≷"]=> + unicode(4) "&gl;" + [u"≺"]=> + unicode(4) "&pr;" + [u"≻"]=> + unicode(4) "&sc;" + [u"≼"]=> + unicode(7) "&cupre;" + [u"≽"]=> + unicode(7) "&sscue;" + [u"≾"]=> + unicode(7) "&prsim;" + [u"≿"]=> + unicode(7) "&scsim;" + [u"⊀"]=> + unicode(5) "&npr;" + [u"⊁"]=> + unicode(5) "&nsc;" + [u"⊂"]=> + unicode(5) "&sub;" + [u"⊃"]=> + unicode(5) "&sup;" + [u"⊄"]=> + unicode(6) "&nsub;" + [u"⊅"]=> + unicode(6) "&nsup;" + [u"⊆"]=> + unicode(6) "&sube;" + [u"⊇"]=> + unicode(6) "&supe;" + [u"⊕"]=> + unicode(7) "&oplus;" + [u"⊗"]=> + unicode(8) "&otimes;" + [u"⊥"]=> + unicode(6) "&perp;" + [u"⋅"]=> + unicode(6) "&sdot;" + [u"⌈"]=> + unicode(7) "&lceil;" + [u"⌉"]=> + unicode(7) "&rceil;" + [u"⌊"]=> + unicode(8) "&lfloor;" + [u"⌋"]=> + unicode(8) "&rfloor;" + [u"〈"]=> + unicode(6) "&lang;" + [u"〉"]=> + unicode(6) "&rang;" + [u"◊"]=> + unicode(5) "&loz;" + [u"♠"]=> + unicode(8) "&spades;" + [u"♣"]=> + unicode(7) "&clubs;" + [u"♥"]=> + unicode(8) "&hearts;" + [u"♦"]=> + unicode(7) "&diams;" + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- with table = HTML_ENTITIES & quote_style = ENT_QUOTES -- +array(312) { + [u" "]=> + unicode(6) "&nbsp;" + [u"¡"]=> + unicode(7) "&iexcl;" + [u"¢"]=> + unicode(6) "&cent;" + [u"£"]=> + unicode(7) "&pound;" + [u"¤"]=> + unicode(8) "&curren;" + [u"Â¥"]=> + unicode(5) "&yen;" + [u"¦"]=> + unicode(8) "&brvbar;" + [u"§"]=> + unicode(6) "&sect;" + [u"¨"]=> + unicode(5) "&uml;" + [u"©"]=> + unicode(6) "&copy;" + [u"ª"]=> + unicode(6) "&ordf;" + [u"«"]=> + unicode(7) "&laquo;" + [u"¬"]=> + unicode(5) "&not;" + [u"­"]=> + unicode(5) "&shy;" + [u"®"]=> + unicode(5) "&reg;" + [u"¯"]=> + unicode(6) "&macr;" + [u"°"]=> + unicode(5) "&deg;" + [u"±"]=> + unicode(8) "&plusmn;" + [u"²"]=> + unicode(6) "&sup2;" + [u"³"]=> + unicode(6) "&sup3;" + [u"´"]=> + unicode(7) "&acute;" + [u"µ"]=> + unicode(7) "&micro;" + [u"¶"]=> + unicode(6) "&para;" + [u"·"]=> + unicode(8) "&middot;" + [u"¸"]=> + unicode(7) "&cedil;" + [u"¹"]=> + unicode(6) "&sup1;" + [u"º"]=> + unicode(6) "&ordm;" + [u"»"]=> + unicode(7) "&raquo;" + [u"¼"]=> + unicode(8) "&frac14;" + [u"½"]=> + unicode(8) "&frac12;" + [u"¾"]=> + unicode(8) "&frac34;" + [u"¿"]=> + unicode(8) "&iquest;" + [u"À"]=> + unicode(8) "&Agrave;" + [u"Á"]=> + unicode(8) "&Aacute;" + [u"Â"]=> + unicode(7) "&Acirc;" + [u"Ã"]=> + unicode(8) "&Atilde;" + [u"Ä"]=> + unicode(6) "&Auml;" + [u"Å"]=> + unicode(7) "&Aring;" + [u"Æ"]=> + unicode(7) "&AElig;" + [u"Ç"]=> + unicode(8) "&Ccedil;" + [u"È"]=> + unicode(8) "&Egrave;" + [u"É"]=> + unicode(8) "&Eacute;" + [u"Ê"]=> + unicode(7) "&Ecirc;" + [u"Ë"]=> + unicode(6) "&Euml;" + [u"Ì"]=> + unicode(8) "&Igrave;" + [u"Í"]=> + unicode(8) "&Iacute;" + [u"Î"]=> + unicode(7) "&Icirc;" + [u"Ï"]=> + unicode(6) "&Iuml;" + [u"Ð"]=> + unicode(5) "&ETH;" + [u"Ñ"]=> + unicode(8) "&Ntilde;" + [u"Ò"]=> + unicode(8) "&Ograve;" + [u"Ó"]=> + unicode(8) "&Oacute;" + [u"Ô"]=> + unicode(7) "&Ocirc;" + [u"Õ"]=> + unicode(8) "&Otilde;" + [u"Ö"]=> + unicode(6) "&Ouml;" + [u"×"]=> + unicode(7) "&times;" + [u"Ø"]=> + unicode(8) "&Oslash;" + [u"Ù"]=> + unicode(8) "&Ugrave;" + [u"Ú"]=> + unicode(8) "&Uacute;" + [u"Û"]=> + unicode(7) "&Ucirc;" + [u"Ü"]=> + unicode(6) "&Uuml;" + [u"Ý"]=> + unicode(8) "&Yacute;" + [u"Þ"]=> + unicode(7) "&THORN;" + [u"ß"]=> + unicode(7) "&szlig;" + [u"à"]=> + unicode(8) "&agrave;" + [u"á"]=> + unicode(8) "&aacute;" + [u"â"]=> + unicode(7) "&acirc;" + [u"ã"]=> + unicode(8) "&atilde;" + [u"ä"]=> + unicode(6) "&auml;" + [u"Ã¥"]=> + unicode(7) "&aring;" + [u"æ"]=> + unicode(7) "&aelig;" + [u"ç"]=> + unicode(8) "&ccedil;" + [u"è"]=> + unicode(8) "&egrave;" + [u"é"]=> + unicode(8) "&eacute;" + [u"ê"]=> + unicode(7) "&ecirc;" + [u"ë"]=> + unicode(6) "&euml;" + [u"ì"]=> + unicode(8) "&igrave;" + [u"í"]=> + unicode(8) "&iacute;" + [u"î"]=> + unicode(7) "&icirc;" + [u"ï"]=> + unicode(6) "&iuml;" + [u"ð"]=> + unicode(5) "&eth;" + [u"ñ"]=> + unicode(8) "&ntilde;" + [u"ò"]=> + unicode(8) "&ograve;" + [u"ó"]=> + unicode(8) "&oacute;" + [u"ô"]=> + unicode(7) "&ocirc;" + [u"õ"]=> + unicode(8) "&otilde;" + [u"ö"]=> + unicode(6) "&ouml;" + [u"÷"]=> + unicode(8) "&divide;" + [u"ø"]=> + unicode(8) "&oslash;" + [u"ù"]=> + unicode(8) "&ugrave;" + [u"ú"]=> + unicode(8) "&uacute;" + [u"û"]=> + unicode(7) "&ucirc;" + [u"ü"]=> + unicode(6) "&uuml;" + [u"ý"]=> + unicode(8) "&yacute;" + [u"þ"]=> + unicode(7) "&thorn;" + [u"ÿ"]=> + unicode(6) "&yuml;" + [u"Œ"]=> + unicode(7) "&OElig;" + [u"œ"]=> + unicode(7) "&oelig;" + [u"Å "]=> + unicode(8) "&Scaron;" + [u"Å¡"]=> + unicode(8) "&scaron;" + [u"Ÿ"]=> + unicode(6) "&Yuml;" + [u"ƒ"]=> + unicode(6) "&fnof;" + [u"ˆ"]=> + unicode(6) "&circ;" + [u"˜"]=> + unicode(7) "&tilde;" + [u"Α"]=> + unicode(7) "&Alpha;" + [u"Β"]=> + unicode(6) "&Beta;" + [u"Γ"]=> + unicode(7) "&Gamma;" + [u"Δ"]=> + unicode(7) "&Delta;" + [u"Ε"]=> + unicode(9) "&Epsilon;" + [u"Ζ"]=> + unicode(6) "&Zeta;" + [u"Η"]=> + unicode(5) "&Eta;" + [u"Θ"]=> + unicode(7) "&Theta;" + [u"Ι"]=> + unicode(6) "&Iota;" + [u"Κ"]=> + unicode(7) "&Kappa;" + [u"Λ"]=> + unicode(8) "&Lambda;" + [u"Μ"]=> + unicode(4) "&Mu;" + [u"Ν"]=> + unicode(4) "&Nu;" + [u"Ξ"]=> + unicode(4) "&Xi;" + [u"Ο"]=> + unicode(9) "&Omicron;" + [u"Π"]=> + unicode(4) "&Pi;" + [u"Ρ"]=> + unicode(5) "&Rho;" + [u"Σ"]=> + unicode(7) "&Sigma;" + [u"Τ"]=> + unicode(5) "&Tau;" + [u"Î¥"]=> + unicode(9) "&Upsilon;" + [u"Φ"]=> + unicode(5) "&Phi;" + [u"Χ"]=> + unicode(5) "&Chi;" + [u"Ψ"]=> + unicode(5) "&Psi;" + [u"Ω"]=> + unicode(7) "&Omega;" + [u"α"]=> + unicode(7) "&alpha;" + [u"β"]=> + unicode(6) "&beta;" + [u"γ"]=> + unicode(7) "&gamma;" + [u"δ"]=> + unicode(7) "&delta;" + [u"ε"]=> + unicode(9) "&epsilon;" + [u"ζ"]=> + unicode(6) "&zeta;" + [u"η"]=> + unicode(5) "&eta;" + [u"θ"]=> + unicode(7) "&theta;" + [u"ι"]=> + unicode(6) "&iota;" + [u"κ"]=> + unicode(7) "&kappa;" + [u"λ"]=> + unicode(8) "&lambda;" + [u"μ"]=> + unicode(4) "&mu;" + [u"ν"]=> + unicode(4) "&nu;" + [u"ξ"]=> + unicode(4) "&xi;" + [u"ο"]=> + unicode(9) "&omicron;" + [u"π"]=> + unicode(4) "&pi;" + [u"ρ"]=> + unicode(5) "&rho;" + [u"ς"]=> + unicode(8) "&sigmaf;" + [u"σ"]=> + unicode(7) "&sigma;" + [u"τ"]=> + unicode(5) "&tau;" + [u"υ"]=> + unicode(9) "&upsilon;" + [u"φ"]=> + unicode(5) "&phi;" + [u"χ"]=> + unicode(5) "&chi;" + [u"ψ"]=> + unicode(5) "&psi;" + [u"ω"]=> + unicode(7) "&omega;" + [u"ϑ"]=> + unicode(10) "&thetasym;" + [u"ϒ"]=> + unicode(7) "&upsih;" + [u"ϖ"]=> + unicode(5) "&piv;" + [u" "]=> + unicode(6) "&ensp;" + [u" "]=> + unicode(6) "&emsp;" + [u" "]=> + unicode(8) "&thinsp;" + [u"‌"]=> + unicode(6) "&zwnj;" + [u"‍"]=> + unicode(5) "&zwj;" + [u"‎"]=> + unicode(5) "&lrm;" + [u"‏"]=> + unicode(5) "&rlm;" + [u"–"]=> + unicode(7) "&ndash;" + [u"—"]=> + unicode(7) "&mdash;" + [u"‘"]=> + unicode(7) "&lsquo;" + [u"’"]=> + unicode(7) "&rsquo;" + [u"‚"]=> + unicode(7) "&sbquo;" + [u"“"]=> + unicode(7) "&ldquo;" + [u"”"]=> + unicode(7) "&rdquo;" + [u"„"]=> + unicode(7) "&bdquo;" + [u"†"]=> + unicode(8) "&dagger;" + [u"‡"]=> + unicode(8) "&Dagger;" + [u"•"]=> + unicode(6) "&bull;" + [u"…"]=> + unicode(8) "&hellip;" + [u"‰"]=> + unicode(8) "&permil;" + [u"′"]=> + unicode(7) "&prime;" + [u"″"]=> + unicode(7) "&Prime;" + [u"‹"]=> + unicode(8) "&lsaquo;" + [u"›"]=> + unicode(8) "&rsaquo;" + [u"‾"]=> + unicode(7) "&oline;" + [u"⁄"]=> + unicode(7) "&frasl;" + [u"€"]=> + unicode(6) "&euro;" + [u"ℑ"]=> + unicode(7) "&image;" + [u"℘"]=> + unicode(8) "&weierp;" + [u"ℜ"]=> + unicode(6) "&real;" + [u"™"]=> + unicode(7) "&trade;" + [u"ℵ"]=> + unicode(9) "&alefsym;" + [u"←"]=> + unicode(6) "&larr;" + [u"↑"]=> + unicode(6) "&uarr;" + [u"→"]=> + unicode(6) "&rarr;" + [u"↓"]=> + unicode(6) "&darr;" + [u"↔"]=> + unicode(6) "&harr;" + [u"↵"]=> + unicode(7) "&crarr;" + [u"⇐"]=> + unicode(6) "&lArr;" + [u"⇑"]=> + unicode(6) "&uArr;" + [u"⇒"]=> + unicode(6) "&rArr;" + [u"⇓"]=> + unicode(6) "&dArr;" + [u"⇔"]=> + unicode(6) "&hArr;" + [u"⇕"]=> + unicode(6) "&vArr;" + [u"⇚"]=> + unicode(7) "&lAarr;" + [u"⇛"]=> + unicode(7) "&rAarr;" + [u"⇝"]=> + unicode(7) "&rarrw;" + [u"∀"]=> + unicode(8) "&forall;" + [u"∁"]=> + unicode(6) "&comp;" + [u"∂"]=> + unicode(6) "&part;" + [u"∃"]=> + unicode(7) "&exist;" + [u"∄"]=> + unicode(8) "&nexist;" + [u"∅"]=> + unicode(7) "&empty;" + [u"∇"]=> + unicode(7) "&nabla;" + [u"∈"]=> + unicode(6) "&isin;" + [u"∉"]=> + unicode(7) "&notin;" + [u"∊"]=> + unicode(7) "&epsis;" + [u"∋"]=> + unicode(4) "&ni;" + [u"∌"]=> + unicode(7) "&notni;" + [u"∍"]=> + unicode(7) "&bepsi;" + [u"∏"]=> + unicode(6) "&prod;" + [u"∐"]=> + unicode(8) "&coprod;" + [u"∑"]=> + unicode(5) "&sum;" + [u"−"]=> + unicode(7) "&minus;" + [u"∓"]=> + unicode(8) "&mnplus;" + [u"∔"]=> + unicode(8) "&plusdo;" + [u"∖"]=> + unicode(7) "&setmn;" + [u"∗"]=> + unicode(8) "&lowast;" + [u"∘"]=> + unicode(8) "&compfn;" + [u"√"]=> + unicode(7) "&radic;" + [u"∝"]=> + unicode(6) "&prop;" + [u"∞"]=> + unicode(7) "&infin;" + [u"∟"]=> + unicode(7) "&ang90;" + [u"∠"]=> + unicode(5) "&ang;" + [u"∡"]=> + unicode(8) "&angmsd;" + [u"∢"]=> + unicode(8) "&angsph;" + [u"∣"]=> + unicode(5) "&mid;" + [u"∤"]=> + unicode(6) "&nmid;" + [u"∥"]=> + unicode(5) "&par;" + [u"∦"]=> + unicode(6) "&npar;" + [u"∧"]=> + unicode(5) "&and;" + [u"∨"]=> + unicode(4) "&or;" + [u"∩"]=> + unicode(5) "&cap;" + [u"∪"]=> + unicode(5) "&cup;" + [u"∫"]=> + unicode(5) "&int;" + [u"∮"]=> + unicode(8) "&conint;" + [u"∴"]=> + unicode(8) "&there4;" + [u"∵"]=> + unicode(8) "&becaus;" + [u"∼"]=> + unicode(5) "&sim;" + [u"∽"]=> + unicode(6) "&bsim;" + [u"≀"]=> + unicode(8) "&wreath;" + [u"≁"]=> + unicode(6) "&nsim;" + [u"≃"]=> + unicode(6) "&sime;" + [u"≄"]=> + unicode(7) "&nsime;" + [u"≅"]=> + unicode(6) "&cong;" + [u"≇"]=> + unicode(7) "&ncong;" + [u"≈"]=> + unicode(7) "&asymp;" + [u"≉"]=> + unicode(5) "&nap;" + [u"≊"]=> + unicode(5) "&ape;" + [u"≌"]=> + unicode(7) "&bcong;" + [u"≍"]=> + unicode(7) "&asymp;" + [u"≎"]=> + unicode(6) "&bump;" + [u"≏"]=> + unicode(7) "&bumpe;" + [u"≠"]=> + unicode(4) "&ne;" + [u"≡"]=> + unicode(7) "&equiv;" + [u"≤"]=> + unicode(4) "&le;" + [u"≥"]=> + unicode(4) "&ge;" + [u"≦"]=> + unicode(4) "&lE;" + [u"≧"]=> + unicode(4) "&gE;" + [u"≨"]=> + unicode(5) "&lnE;" + [u"≩"]=> + unicode(5) "&gnE;" + [u"≪"]=> + unicode(4) "&Lt;" + [u"≫"]=> + unicode(4) "&Gt;" + [u"≬"]=> + unicode(7) "&twixt;" + [u"≮"]=> + unicode(5) "&nlt;" + [u"≯"]=> + unicode(5) "&ngt;" + [u"≰"]=> + unicode(6) "&nles;" + [u"≱"]=> + unicode(6) "&nges;" + [u"≲"]=> + unicode(6) "&lsim;" + [u"≳"]=> + unicode(6) "&gsim;" + [u"≶"]=> + unicode(4) "&lg;" + [u"≷"]=> + unicode(4) "&gl;" + [u"≺"]=> + unicode(4) "&pr;" + [u"≻"]=> + unicode(4) "&sc;" + [u"≼"]=> + unicode(7) "&cupre;" + [u"≽"]=> + unicode(7) "&sscue;" + [u"≾"]=> + unicode(7) "&prsim;" + [u"≿"]=> + unicode(7) "&scsim;" + [u"⊀"]=> + unicode(5) "&npr;" + [u"⊁"]=> + unicode(5) "&nsc;" + [u"⊂"]=> + unicode(5) "&sub;" + [u"⊃"]=> + unicode(5) "&sup;" + [u"⊄"]=> + unicode(6) "&nsub;" + [u"⊅"]=> + unicode(6) "&nsup;" + [u"⊆"]=> + unicode(6) "&sube;" + [u"⊇"]=> + unicode(6) "&supe;" + [u"⊕"]=> + unicode(7) "&oplus;" + [u"⊗"]=> + unicode(8) "&otimes;" + [u"⊥"]=> + unicode(6) "&perp;" + [u"⋅"]=> + unicode(6) "&sdot;" + [u"⌈"]=> + unicode(7) "&lceil;" + [u"⌉"]=> + unicode(7) "&rceil;" + [u"⌊"]=> + unicode(8) "&lfloor;" + [u"⌋"]=> + unicode(8) "&rfloor;" + [u"〈"]=> + unicode(6) "&lang;" + [u"〉"]=> + unicode(6) "&rang;" + [u"◊"]=> + unicode(5) "&loz;" + [u"♠"]=> + unicode(8) "&spades;" + [u"♣"]=> + unicode(7) "&clubs;" + [u"♥"]=> + unicode(8) "&hearts;" + [u"♦"]=> + unicode(7) "&diams;" + [u"""]=> + unicode(6) "&quot;" + [u"'"]=> + unicode(5) "&#39;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/get_html_translation_table_error.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/strings/get_html_translation_table_error.phpt diff -u /dev/null php-src/ext/standard/tests/strings/get_html_translation_table_error.phpt:1.2 --- /dev/null Mon Oct 8 15:30:38 2007 +++ php-src/ext/standard/tests/strings/get_html_translation_table_error.phpt Mon Oct 8 15:30:37 2007 @@ -0,0 +1,37 @@ +--TEST-- +Test get_html_translation_table() function : error conditions +--FILE-- +<?php +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) + * Description: Returns the internal translation table used by htmlspecialchars and htmlentities + * Source code: ext/standard/html.c +*/ + +echo "*** Testing get_html_translation_table() : error conditions ***\n"; + +// More than expected number of arguments +echo "\n-- Testing get_html_translation_table() function with more than expected no. of arguments --\n"; +$table = HTML_ENTITIES; +$quote_style = ENT_COMPAT; +$extra_arg = 10; + +var_dump( get_html_translation_table($table, $quote_style, $extra_arg) ); + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing get_html_translation_table() : error conditions *** + +-- Testing get_html_translation_table() function with more than expected no. of arguments -- + +Warning: get_html_translation_table() expects at most 2 parameters, 3 given in %s on line %d +NULL +Done +--UEXPECTF-- +*** Testing get_html_translation_table() : error conditions *** + +-- Testing get_html_translation_table() function with more than expected no. of arguments -- + +Warning: get_html_translation_table() expects at most 2 parameters, 3 given in %s on line %d +NULL +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/get_html_translation_table_basic3-win32.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/strings/get_html_translation_table_basic3-win32.phpt diff -u /dev/null php-src/ext/standard/tests/strings/get_html_translation_table_basic3-win32.phpt:1.2 --- /dev/null Mon Oct 8 15:30:38 2007 +++ php-src/ext/standard/tests/strings/get_html_translation_table_basic3-win32.phpt Mon Oct 8 15:30:37 2007 @@ -0,0 +1,867 @@ +--TEST-- +Test get_html_translation_table() function : basic functionality - table as HTML_ENTITIES & quote_style(ENT_NOQUOTES) +--SKIPIF-- +<?php +if( substr(PHP_OS, 0, 3) != "WIN"){ + die('skip only for Windows'); +} + +if( ini_get("unicode.semantics") == "1") + die('skip do not run when unicode on'); + +if( !setlocale(LC_ALL, "English_United States.1252") ) { + die('skip failed to set locale settings to "English_United States.1252"'); +} +?> +--FILE-- +<?php +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) + * Description: Returns the internal translation table used by htmlspecialchars and htmlentities + * Source code: ext/standard/html.c +*/ + +/* Test get_html_translation_table() when table is specified as HTML_ENTITIES */ + +//set locale +setlocale(LC_ALL, "English_United States.1252"); + +echo "*** Testing get_html_translation_table() : basic functionality ***\n"; + +echo "-- with table = HTML_ENTITIES & quote_style = ENT_NOQUOTES --\n"; +$table = HTML_ENTITIES; +$quote_style = ENT_NOQUOTES; +var_dump( get_html_translation_table($table, $quote_style) ); + + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing get_html_translation_table() : basic functionality *** +-- with table = HTML_ENTITIES & quote_style = ENT_NOQUOTES -- +array(99) { + [" "]=> + string(6) "&nbsp;" + ["¡"]=> + string(7) "&iexcl;" + ["¢"]=> + string(6) "&cent;" + ["£"]=> + string(7) "&pound;" + ["¤"]=> + string(8) "&curren;" + ["¥"]=> + string(5) "&yen;" + ["¦"]=> + string(8) "&brvbar;" + ["§"]=> + string(6) "&sect;" + ["¨"]=> + string(5) "&uml;" + ["©"]=> + string(6) "&copy;" + ["ª"]=> + string(6) "&ordf;" + ["«"]=> + string(7) "&laquo;" + ["¬"]=> + string(5) "&not;" + ["­"]=> + string(5) "&shy;" + ["®"]=> + string(5) "&reg;" + ["¯"]=> + string(6) "&macr;" + ["°"]=> + string(5) "&deg;" + ["±"]=> + string(8) "&plusmn;" + ["²"]=> + string(6) "&sup2;" + ["³"]=> + string(6) "&sup3;" + ["´"]=> + string(7) "&acute;" + ["µ"]=> + string(7) "&micro;" + ["¶"]=> + string(6) "&para;" + ["·"]=> + string(8) "&middot;" + ["¸"]=> + string(7) "&cedil;" + ["¹"]=> + string(6) "&sup1;" + ["º"]=> + string(6) "&ordm;" + ["»"]=> + string(7) "&raquo;" + ["¼"]=> + string(8) "&frac14;" + ["½"]=> + string(8) "&frac12;" + ["¾"]=> + string(8) "&frac34;" + ["¿"]=> + string(8) "&iquest;" + ["À"]=> + string(8) "&Agrave;" + ["Á"]=> + string(8) "&Aacute;" + ["Â"]=> + string(7) "&Acirc;" + ["Ã"]=> + string(8) "&Atilde;" + ["Ä"]=> + string(6) "&Auml;" + ["Å"]=> + string(7) "&Aring;" + ["Æ"]=> + string(7) "&AElig;" + ["Ç"]=> + string(8) "&Ccedil;" + ["È"]=> + string(8) "&Egrave;" + ["É"]=> + string(8) "&Eacute;" + ["Ê"]=> + string(7) "&Ecirc;" + ["Ë"]=> + string(6) "&Euml;" + ["Ì"]=> + string(8) "&Igrave;" + ["Í"]=> + string(8) "&Iacute;" + ["Î"]=> + string(7) "&Icirc;" + ["Ï"]=> + string(6) "&Iuml;" + ["Ð"]=> + string(5) "&ETH;" + ["Ñ"]=> + string(8) "&Ntilde;" + ["Ò"]=> + string(8) "&Ograve;" + ["Ó"]=> + string(8) "&Oacute;" + ["Ô"]=> + string(7) "&Ocirc;" + ["Õ"]=> + string(8) "&Otilde;" + ["Ö"]=> + string(6) "&Ouml;" + ["×"]=> + string(7) "&times;" + ["Ø"]=> + string(8) "&Oslash;" + ["Ù"]=> + string(8) "&Ugrave;" + ["Ú"]=> + string(8) "&Uacute;" + ["Û"]=> + string(7) "&Ucirc;" + ["Ü"]=> + string(6) "&Uuml;" + ["Ý"]=> + string(8) "&Yacute;" + ["Þ"]=> + string(7) "&THORN;" + ["ß"]=> + string(7) "&szlig;" + ["à"]=> + string(8) "&agrave;" + ["á"]=> + string(8) "&aacute;" + ["â"]=> + string(7) "&acirc;" + ["ã"]=> + string(8) "&atilde;" + ["ä"]=> + string(6) "&auml;" + ["å"]=> + string(7) "&aring;" + ["æ"]=> + string(7) "&aelig;" + ["ç"]=> + string(8) "&ccedil;" + ["è"]=> + string(8) "&egrave;" + ["é"]=> + string(8) "&eacute;" + ["ê"]=> + string(7) "&ecirc;" + ["ë"]=> + string(6) "&euml;" + ["ì"]=> + string(8) "&igrave;" + ["í"]=> + string(8) "&iacute;" + ["î"]=> + string(7) "&icirc;" + ["ï"]=> + string(6) "&iuml;" + ["ð"]=> + string(5) "&eth;" + ["ñ"]=> + string(8) "&ntilde;" + ["ò"]=> + string(8) "&ograve;" + ["ó"]=> + string(8) "&oacute;" + ["ô"]=> + string(7) "&ocirc;" + ["õ"]=> + string(8) "&otilde;" + ["ö"]=> + string(6) "&ouml;" + ["÷"]=> + string(8) "&divide;" + ["ø"]=> + string(8) "&oslash;" + ["ù"]=> + string(8) "&ugrave;" + ["ú"]=> + string(8) "&uacute;" + ["û"]=> + string(7) "&ucirc;" + ["ü"]=> + string(6) "&uuml;" + ["ý"]=> + string(8) "&yacute;" + ["þ"]=> + string(7) "&thorn;" + ["ÿ"]=> + string(6) "&yuml;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +Done +--UEXPECTF-- +*** Testing get_html_translation_table() : basic functionality *** +-- with table = HTML_ENTITIES & quote_style = ENT_NOQUOTES -- +array(310) { + [u" "]=> + unicode(6) "&nbsp;" + [u"¡"]=> + unicode(7) "&iexcl;" + [u"¢"]=> + unicode(6) "&cent;" + [u"£"]=> + unicode(7) "&pound;" + [u"¤"]=> + unicode(8) "&curren;" + [u"Â¥"]=> + unicode(5) "&yen;" + [u"¦"]=> + unicode(8) "&brvbar;" + [u"§"]=> + unicode(6) "&sect;" + [u"¨"]=> + unicode(5) "&uml;" + [u"©"]=> + unicode(6) "&copy;" + [u"ª"]=> + unicode(6) "&ordf;" + [u"«"]=> + unicode(7) "&laquo;" + [u"¬"]=> + unicode(5) "&not;" + [u"­"]=> + unicode(5) "&shy;" + [u"®"]=> + unicode(5) "&reg;" + [u"¯"]=> + unicode(6) "&macr;" + [u"°"]=> + unicode(5) "&deg;" + [u"±"]=> + unicode(8) "&plusmn;" + [u"²"]=> + unicode(6) "&sup2;" + [u"³"]=> + unicode(6) "&sup3;" + [u"´"]=> + unicode(7) "&acute;" + [u"µ"]=> + unicode(7) "&micro;" + [u"¶"]=> + unicode(6) "&para;" + [u"·"]=> + unicode(8) "&middot;" + [u"¸"]=> + unicode(7) "&cedil;" + [u"¹"]=> + unicode(6) "&sup1;" + [u"º"]=> + unicode(6) "&ordm;" + [u"»"]=> + unicode(7) "&raquo;" + [u"¼"]=> + unicode(8) "&frac14;" + [u"½"]=> + unicode(8) "&frac12;" + [u"¾"]=> + unicode(8) "&frac34;" + [u"¿"]=> + unicode(8) "&iquest;" + [u"À"]=> + unicode(8) "&Agrave;" + [u"Á"]=> + unicode(8) "&Aacute;" + [u"Â"]=> + unicode(7) "&Acirc;" + [u"Ã"]=> + unicode(8) "&Atilde;" + [u"Ä"]=> + unicode(6) "&Auml;" + [u"Å"]=> + unicode(7) "&Aring;" + [u"Æ"]=> + unicode(7) "&AElig;" + [u"Ç"]=> + unicode(8) "&Ccedil;" + [u"È"]=> + unicode(8) "&Egrave;" + [u"É"]=> + unicode(8) "&Eacute;" + [u"Ê"]=> + unicode(7) "&Ecirc;" + [u"Ë"]=> + unicode(6) "&Euml;" + [u"Ì"]=> + unicode(8) "&Igrave;" + [u"Í"]=> + unicode(8) "&Iacute;" + [u"Î"]=> + unicode(7) "&Icirc;" + [u"Ï"]=> + unicode(6) "&Iuml;" + [u"Ð"]=> + unicode(5) "&ETH;" + [u"Ñ"]=> + unicode(8) "&Ntilde;" + [u"Ò"]=> + unicode(8) "&Ograve;" + [u"Ó"]=> + unicode(8) "&Oacute;" + [u"Ô"]=> + unicode(7) "&Ocirc;" + [u"Õ"]=> + unicode(8) "&Otilde;" + [u"Ö"]=> + unicode(6) "&Ouml;" + [u"×"]=> + unicode(7) "&times;" + [u"Ø"]=> + unicode(8) "&Oslash;" + [u"Ù"]=> + unicode(8) "&Ugrave;" + [u"Ú"]=> + unicode(8) "&Uacute;" + [u"Û"]=> + unicode(7) "&Ucirc;" + [u"Ü"]=> + unicode(6) "&Uuml;" + [u"Ý"]=> + unicode(8) "&Yacute;" + [u"Þ"]=> + unicode(7) "&THORN;" + [u"ß"]=> + unicode(7) "&szlig;" + [u"à"]=> + unicode(8) "&agrave;" + [u"á"]=> + unicode(8) "&aacute;" + [u"â"]=> + unicode(7) "&acirc;" + [u"ã"]=> + unicode(8) "&atilde;" + [u"ä"]=> + unicode(6) "&auml;" + [u"Ã¥"]=> + unicode(7) "&aring;" + [u"æ"]=> + unicode(7) "&aelig;" + [u"ç"]=> + unicode(8) "&ccedil;" + [u"è"]=> + unicode(8) "&egrave;" + [u"é"]=> + unicode(8) "&eacute;" + [u"ê"]=> + unicode(7) "&ecirc;" + [u"ë"]=> + unicode(6) "&euml;" + [u"ì"]=> + unicode(8) "&igrave;" + [u"í"]=> + unicode(8) "&iacute;" + [u"î"]=> + unicode(7) "&icirc;" + [u"ï"]=> + unicode(6) "&iuml;" + [u"ð"]=> + unicode(5) "&eth;" + [u"ñ"]=> + unicode(8) "&ntilde;" + [u"ò"]=> + unicode(8) "&ograve;" + [u"ó"]=> + unicode(8) "&oacute;" + [u"ô"]=> + unicode(7) "&ocirc;" + [u"õ"]=> + unicode(8) "&otilde;" + [u"ö"]=> + unicode(6) "&ouml;" + [u"÷"]=> + unicode(8) "&divide;" + [u"ø"]=> + unicode(8) "&oslash;" + [u"ù"]=> + unicode(8) "&ugrave;" + [u"ú"]=> + unicode(8) "&uacute;" + [u"û"]=> + unicode(7) "&ucirc;" + [u"ü"]=> + unicode(6) "&uuml;" + [u"ý"]=> + unicode(8) "&yacute;" + [u"þ"]=> + unicode(7) "&thorn;" + [u"ÿ"]=> + unicode(6) "&yuml;" + [u"Œ"]=> + unicode(7) "&OElig;" + [u"œ"]=> + unicode(7) "&oelig;" + [u"Å "]=> + unicode(8) "&Scaron;" + [u"Å¡"]=> + unicode(8) "&scaron;" + [u"Ÿ"]=> + unicode(6) "&Yuml;" + [u"ƒ"]=> + unicode(6) "&fnof;" + [u"ˆ"]=> + unicode(6) "&circ;" + [u"˜"]=> + unicode(7) "&tilde;" + [u"Α"]=> + unicode(7) "&Alpha;" + [u"Β"]=> + unicode(6) "&Beta;" + [u"Γ"]=> + unicode(7) "&Gamma;" + [u"Δ"]=> + unicode(7) "&Delta;" + [u"Ε"]=> + unicode(9) "&Epsilon;" + [u"Ζ"]=> + unicode(6) "&Zeta;" + [u"Η"]=> + unicode(5) "&Eta;" + [u"Θ"]=> + unicode(7) "&Theta;" + [u"Ι"]=> + unicode(6) "&Iota;" + [u"Κ"]=> + unicode(7) "&Kappa;" + [u"Λ"]=> + unicode(8) "&Lambda;" + [u"Μ"]=> + unicode(4) "&Mu;" + [u"Ν"]=> + unicode(4) "&Nu;" + [u"Ξ"]=> + unicode(4) "&Xi;" + [u"Ο"]=> + unicode(9) "&Omicron;" + [u"Π"]=> + unicode(4) "&Pi;" + [u"Ρ"]=> + unicode(5) "&Rho;" + [u"Σ"]=> + unicode(7) "&Sigma;" + [u"Τ"]=> + unicode(5) "&Tau;" + [u"Î¥"]=> + unicode(9) "&Upsilon;" + [u"Φ"]=> + unicode(5) "&Phi;" + [u"Χ"]=> + unicode(5) "&Chi;" + [u"Ψ"]=> + unicode(5) "&Psi;" + [u"Ω"]=> + unicode(7) "&Omega;" + [u"α"]=> + unicode(7) "&alpha;" + [u"β"]=> + unicode(6) "&beta;" + [u"γ"]=> + unicode(7) "&gamma;" + [u"δ"]=> + unicode(7) "&delta;" + [u"ε"]=> + unicode(9) "&epsilon;" + [u"ζ"]=> + unicode(6) "&zeta;" + [u"η"]=> + unicode(5) "&eta;" + [u"θ"]=> + unicode(7) "&theta;" + [u"ι"]=> + unicode(6) "&iota;" + [u"κ"]=> + unicode(7) "&kappa;" + [u"λ"]=> + unicode(8) "&lambda;" + [u"μ"]=> + unicode(4) "&mu;" + [u"ν"]=> + unicode(4) "&nu;" + [u"ξ"]=> + unicode(4) "&xi;" + [u"ο"]=> + unicode(9) "&omicron;" + [u"π"]=> + unicode(4) "&pi;" + [u"ρ"]=> + unicode(5) "&rho;" + [u"ς"]=> + unicode(8) "&sigmaf;" + [u"σ"]=> + unicode(7) "&sigma;" + [u"τ"]=> + unicode(5) "&tau;" + [u"υ"]=> + unicode(9) "&upsilon;" + [u"φ"]=> + unicode(5) "&phi;" + [u"χ"]=> + unicode(5) "&chi;" + [u"ψ"]=> + unicode(5) "&psi;" + [u"ω"]=> + unicode(7) "&omega;" + [u"ϑ"]=> + unicode(10) "&thetasym;" + [u"ϒ"]=> + unicode(7) "&upsih;" + [u"ϖ"]=> + unicode(5) "&piv;" + [u" "]=> + unicode(6) "&ensp;" + [u" "]=> + unicode(6) "&emsp;" + [u" "]=> + unicode(8) "&thinsp;" + [u"‌"]=> + unicode(6) "&zwnj;" + [u"‍"]=> + unicode(5) "&zwj;" + [u"‎"]=> + unicode(5) "&lrm;" + [u"‏"]=> + unicode(5) "&rlm;" + [u"–"]=> + unicode(7) "&ndash;" + [u"—"]=> + unicode(7) "&mdash;" + [u"‘"]=> + unicode(7) "&lsquo;" + [u"’"]=> + unicode(7) "&rsquo;" + [u"‚"]=> + unicode(7) "&sbquo;" + [u"“"]=> + unicode(7) "&ldquo;" + [u"”"]=> + unicode(7) "&rdquo;" + [u"„"]=> + unicode(7) "&bdquo;" + [u"†"]=> + unicode(8) "&dagger;" + [u"‡"]=> + unicode(8) "&Dagger;" + [u"•"]=> + unicode(6) "&bull;" + [u"…"]=> + unicode(8) "&hellip;" + [u"‰"]=> + unicode(8) "&permil;" + [u"′"]=> + unicode(7) "&prime;" + [u"″"]=> + unicode(7) "&Prime;" + [u"‹"]=> + unicode(8) "&lsaquo;" + [u"›"]=> + unicode(8) "&rsaquo;" + [u"‾"]=> + unicode(7) "&oline;" + [u"⁄"]=> + unicode(7) "&frasl;" + [u"€"]=> + unicode(6) "&euro;" + [u"ℑ"]=> + unicode(7) "&image;" + [u"℘"]=> + unicode(8) "&weierp;" + [u"ℜ"]=> + unicode(6) "&real;" + [u"™"]=> + unicode(7) "&trade;" + [u"ℵ"]=> + unicode(9) "&alefsym;" + [u"←"]=> + unicode(6) "&larr;" + [u"↑"]=> + unicode(6) "&uarr;" + [u"→"]=> + unicode(6) "&rarr;" + [u"↓"]=> + unicode(6) "&darr;" + [u"↔"]=> + unicode(6) "&harr;" + [u"↵"]=> + unicode(7) "&crarr;" + [u"⇐"]=> + unicode(6) "&lArr;" + [u"⇑"]=> + unicode(6) "&uArr;" + [u"⇒"]=> + unicode(6) "&rArr;" + [u"⇓"]=> + unicode(6) "&dArr;" + [u"⇔"]=> + unicode(6) "&hArr;" + [u"⇕"]=> + unicode(6) "&vArr;" + [u"⇚"]=> + unicode(7) "&lAarr;" + [u"⇛"]=> + unicode(7) "&rAarr;" + [u"⇝"]=> + unicode(7) "&rarrw;" + [u"∀"]=> + unicode(8) "&forall;" + [u"∁"]=> + unicode(6) "&comp;" + [u"∂"]=> + unicode(6) "&part;" + [u"∃"]=> + unicode(7) "&exist;" + [u"∄"]=> + unicode(8) "&nexist;" + [u"∅"]=> + unicode(7) "&empty;" + [u"∇"]=> + unicode(7) "&nabla;" + [u"∈"]=> + unicode(6) "&isin;" + [u"∉"]=> + unicode(7) "&notin;" + [u"∊"]=> + unicode(7) "&epsis;" + [u"∋"]=> + unicode(4) "&ni;" + [u"∌"]=> + unicode(7) "&notni;" + [u"∍"]=> + unicode(7) "&bepsi;" + [u"∏"]=> + unicode(6) "&prod;" + [u"∐"]=> + unicode(8) "&coprod;" + [u"∑"]=> + unicode(5) "&sum;" + [u"−"]=> + unicode(7) "&minus;" + [u"∓"]=> + unicode(8) "&mnplus;" + [u"∔"]=> + unicode(8) "&plusdo;" + [u"∖"]=> + unicode(7) "&setmn;" + [u"∗"]=> + unicode(8) "&lowast;" + [u"∘"]=> + unicode(8) "&compfn;" + [u"√"]=> + unicode(7) "&radic;" + [u"∝"]=> + unicode(6) "&prop;" + [u"∞"]=> + unicode(7) "&infin;" + [u"∟"]=> + unicode(7) "&ang90;" + [u"∠"]=> + unicode(5) "&ang;" + [u"∡"]=> + unicode(8) "&angmsd;" + [u"∢"]=> + unicode(8) "&angsph;" + [u"∣"]=> + unicode(5) "&mid;" + [u"∤"]=> + unicode(6) "&nmid;" + [u"∥"]=> + unicode(5) "&par;" + [u"∦"]=> + unicode(6) "&npar;" + [u"∧"]=> + unicode(5) "&and;" + [u"∨"]=> + unicode(4) "&or;" + [u"∩"]=> + unicode(5) "&cap;" + [u"∪"]=> + unicode(5) "&cup;" + [u"∫"]=> + unicode(5) "&int;" + [u"∮"]=> + unicode(8) "&conint;" + [u"∴"]=> + unicode(8) "&there4;" + [u"∵"]=> + unicode(8) "&becaus;" + [u"∼"]=> + unicode(5) "&sim;" + [u"∽"]=> + unicode(6) "&bsim;" + [u"≀"]=> + unicode(8) "&wreath;" + [u"≁"]=> + unicode(6) "&nsim;" + [u"≃"]=> + unicode(6) "&sime;" + [u"≄"]=> + unicode(7) "&nsime;" + [u"≅"]=> + unicode(6) "&cong;" + [u"≇"]=> + unicode(7) "&ncong;" + [u"≈"]=> + unicode(7) "&asymp;" + [u"≉"]=> + unicode(5) "&nap;" + [u"≊"]=> + unicode(5) "&ape;" + [u"≌"]=> + unicode(7) "&bcong;" + [u"≍"]=> + unicode(7) "&asymp;" + [u"≎"]=> + unicode(6) "&bump;" + [u"≏"]=> + unicode(7) "&bumpe;" + [u"≠"]=> + unicode(4) "&ne;" + [u"≡"]=> + unicode(7) "&equiv;" + [u"≤"]=> + unicode(4) "&le;" + [u"≥"]=> + unicode(4) "&ge;" + [u"≦"]=> + unicode(4) "&lE;" + [u"≧"]=> + unicode(4) "&gE;" + [u"≨"]=> + unicode(5) "&lnE;" + [u"≩"]=> + unicode(5) "&gnE;" + [u"≪"]=> + unicode(4) "&Lt;" + [u"≫"]=> + unicode(4) "&Gt;" + [u"≬"]=> + unicode(7) "&twixt;" + [u"≮"]=> + unicode(5) "&nlt;" + [u"≯"]=> + unicode(5) "&ngt;" + [u"≰"]=> + unicode(6) "&nles;" + [u"≱"]=> + unicode(6) "&nges;" + [u"≲"]=> + unicode(6) "&lsim;" + [u"≳"]=> + unicode(6) "&gsim;" + [u"≶"]=> + unicode(4) "&lg;" + [u"≷"]=> + unicode(4) "&gl;" + [u"≺"]=> + unicode(4) "&pr;" + [u"≻"]=> + unicode(4) "&sc;" + [u"≼"]=> + unicode(7) "&cupre;" + [u"≽"]=> + unicode(7) "&sscue;" + [u"≾"]=> + unicode(7) "&prsim;" + [u"≿"]=> + unicode(7) "&scsim;" + [u"⊀"]=> + unicode(5) "&npr;" + [u"⊁"]=> + unicode(5) "&nsc;" + [u"⊂"]=> + unicode(5) "&sub;" + [u"⊃"]=> + unicode(5) "&sup;" + [u"⊄"]=> + unicode(6) "&nsub;" + [u"⊅"]=> + unicode(6) "&nsup;" + [u"⊆"]=> + unicode(6) "&sube;" + [u"⊇"]=> + unicode(6) "&supe;" + [u"⊕"]=> + unicode(7) "&oplus;" + [u"⊗"]=> + unicode(8) "&otimes;" + [u"⊥"]=> + unicode(6) "&perp;" + [u"⋅"]=> + unicode(6) "&sdot;" + [u"⌈"]=> + unicode(7) "&lceil;" + [u"⌉"]=> + unicode(7) "&rceil;" + [u"⌊"]=> + unicode(8) "&lfloor;" + [u"⌋"]=> + unicode(8) "&rfloor;" + [u"〈"]=> + unicode(6) "&lang;" + [u"〉"]=> + unicode(6) "&rang;" + [u"◊"]=> + unicode(5) "&loz;" + [u"♠"]=> + unicode(8) "&spades;" + [u"♣"]=> + unicode(7) "&clubs;" + [u"♥"]=> + unicode(8) "&hearts;" + [u"♦"]=> + unicode(7) "&diams;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/get_html_translation_table_variation1.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/strings/get_html_translation_table_variation1.phpt diff -u /dev/null php-src/ext/standard/tests/strings/get_html_translation_table_variation1.phpt:1.2 --- /dev/null Mon Oct 8 15:30:38 2007 +++ php-src/ext/standard/tests/strings/get_html_translation_table_variation1.phpt Mon Oct 8 15:30:37 2007 @@ -0,0 +1,2127 @@ +--TEST-- +Test get_html_translation_table() function : usage variations - unexpected table values +--SKIPIF-- +<?php +if( substr(PHP_OS, 0, 3) == "WIN"){ + die('skip Not for Windows'); +} + +if( ini_get("unicode.semantics") == "1") + die('skip do not run when unicode on'); + +if( !setlocale(LC_ALL, "en_US.UTF-8") ) { + die('skip failed to set locale settings to "en-US.UTF-8"'); +} +?> +--FILE-- +<?php +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) + * Description: Returns the internal translation table used by htmlspecialchars and htmlentities + * Source code: ext/standard/html.c +*/ + +/* + * test get_html_translation_table() with unexpected value for argument $table +*/ + +//set locale to en_US.UTF-8 +setlocale(LC_ALL, "en_US.UTF-8"); + +echo "*** Testing get_html_translation_table() : usage variations ***\n"; +// initialize all required variables +$quote_style = ENT_COMPAT; + +// get an unset variable +$unset_var = 10; +unset($unset_var); + +// a resource variable +$fp = fopen(__FILE__, "r"); + +// array with different values +$values = array ( + + // array values + array(), + array(0), + array(1), + array(1, 2), + array('color' => 'red', 'item' => 'pen'), + + // boolean values + true, + FALSE, + + // string values + "string", + 'string', + + // objects + new stdclass(), + + // empty string + "", + '', + + // null vlaues + NULL, + null, + + // resource var + $fp, + + // undefined variable + @$undefined_var, + + // unset variable + @$unset_var +); + + +// loop through each element of the array and check the working of get_html_translation_table() +// when $table arugment is supplied with different values +echo "\n--- Testing get_html_translation_table() by supplying different values for 'table' argument ---\n"; +$counter = 1; +for($index = 0; $index < count($values); $index ++) { + echo "-- Iteration $counter --\n"; + $table = $values [$index]; + + var_dump( get_html_translation_table($table) ); + var_dump( get_html_translation_table($table, $quote_style) ); + + $counter ++; +} + +// close resource +fclose($fp); + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing get_html_translation_table() : usage variations *** + +--- Testing get_html_translation_table() by supplying different values for 'table' argument --- +-- Iteration 1 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 2 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 3 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 4 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 5 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 6 -- +array(100) { + [" "]=> + string(6) "&nbsp;" + ["¡"]=> + string(7) "&iexcl;" + ["¢"]=> + string(6) "&cent;" + ["£"]=> + string(7) "&pound;" + ["¤"]=> + string(8) "&curren;" + ["¥"]=> + string(5) "&yen;" + ["¦"]=> + string(8) "&brvbar;" + ["§"]=> + string(6) "&sect;" + ["¨"]=> + string(5) "&uml;" + ["©"]=> + string(6) "&copy;" + ["ª"]=> + string(6) "&ordf;" + ["«"]=> + string(7) "&laquo;" + ["¬"]=> + string(5) "&not;" + ["­"]=> + string(5) "&shy;" + ["®"]=> + string(5) "&reg;" + ["¯"]=> + string(6) "&macr;" + ["°"]=> + string(5) "&deg;" + ["±"]=> + string(8) "&plusmn;" + ["²"]=> + string(6) "&sup2;" + ["³"]=> + string(6) "&sup3;" + ["´"]=> + string(7) "&acute;" + ["µ"]=> + string(7) "&micro;" + ["¶"]=> + string(6) "&para;" + ["·"]=> + string(8) "&middot;" + ["¸"]=> + string(7) "&cedil;" + ["¹"]=> + string(6) "&sup1;" + ["º"]=> + string(6) "&ordm;" + ["»"]=> + string(7) "&raquo;" + ["¼"]=> + string(8) "&frac14;" + ["½"]=> + string(8) "&frac12;" + ["¾"]=> + string(8) "&frac34;" + ["¿"]=> + string(8) "&iquest;" + ["À"]=> + string(8) "&Agrave;" + ["Á"]=> + string(8) "&Aacute;" + ["Â"]=> + string(7) "&Acirc;" + ["Ã"]=> + string(8) "&Atilde;" + ["Ä"]=> + string(6) "&Auml;" + ["Å"]=> + string(7) "&Aring;" + ["Æ"]=> + string(7) "&AElig;" + ["Ç"]=> + string(8) "&Ccedil;" + ["È"]=> + string(8) "&Egrave;" + ["É"]=> + string(8) "&Eacute;" + ["Ê"]=> + string(7) "&Ecirc;" + ["Ë"]=> + string(6) "&Euml;" + ["Ì"]=> + string(8) "&Igrave;" + ["Í"]=> + string(8) "&Iacute;" + ["Î"]=> + string(7) "&Icirc;" + ["Ï"]=> + string(6) "&Iuml;" + ["Ð"]=> + string(5) "&ETH;" + ["Ñ"]=> + string(8) "&Ntilde;" + ["Ò"]=> + string(8) "&Ograve;" + ["Ó"]=> + string(8) "&Oacute;" + ["Ô"]=> + string(7) "&Ocirc;" + ["Õ"]=> + string(8) "&Otilde;" + ["Ö"]=> + string(6) "&Ouml;" + ["×"]=> + string(7) "&times;" + ["Ø"]=> + string(8) "&Oslash;" + ["Ù"]=> + string(8) "&Ugrave;" + ["Ú"]=> + string(8) "&Uacute;" + ["Û"]=> + string(7) "&Ucirc;" + ["Ü"]=> + string(6) "&Uuml;" + ["Ý"]=> + string(8) "&Yacute;" + ["Þ"]=> + string(7) "&THORN;" + ["ß"]=> + string(7) "&szlig;" + ["à"]=> + string(8) "&agrave;" + ["á"]=> + string(8) "&aacute;" + ["â"]=> + string(7) "&acirc;" + ["ã"]=> + string(8) "&atilde;" + ["ä"]=> + string(6) "&auml;" + ["å"]=> + string(7) "&aring;" + ["æ"]=> + string(7) "&aelig;" + ["ç"]=> + string(8) "&ccedil;" + ["è"]=> + string(8) "&egrave;" + ["é"]=> + string(8) "&eacute;" + ["ê"]=> + string(7) "&ecirc;" + ["ë"]=> + string(6) "&euml;" + ["ì"]=> + string(8) "&igrave;" + ["í"]=> + string(8) "&iacute;" + ["î"]=> + string(7) "&icirc;" + ["ï"]=> + string(6) "&iuml;" + ["ð"]=> + string(5) "&eth;" + ["ñ"]=> + string(8) "&ntilde;" + ["ò"]=> + string(8) "&ograve;" + ["ó"]=> + string(8) "&oacute;" + ["ô"]=> + string(7) "&ocirc;" + ["õ"]=> + string(8) "&otilde;" + ["ö"]=> + string(6) "&ouml;" + ["÷"]=> + string(8) "&divide;" + ["ø"]=> + string(8) "&oslash;" + ["ù"]=> + string(8) "&ugrave;" + ["ú"]=> + string(8) "&uacute;" + ["û"]=> + string(7) "&ucirc;" + ["ü"]=> + string(6) "&uuml;" + ["ý"]=> + string(8) "&yacute;" + ["þ"]=> + string(7) "&thorn;" + ["ÿ"]=> + string(6) "&yuml;" + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +array(100) { + [" "]=> + string(6) "&nbsp;" + ["¡"]=> + string(7) "&iexcl;" + ["¢"]=> + string(6) "&cent;" + ["£"]=> + string(7) "&pound;" + ["¤"]=> + string(8) "&curren;" + ["¥"]=> + string(5) "&yen;" + ["¦"]=> + string(8) "&brvbar;" + ["§"]=> + string(6) "&sect;" + ["¨"]=> + string(5) "&uml;" + ["©"]=> + string(6) "&copy;" + ["ª"]=> + string(6) "&ordf;" + ["«"]=> + string(7) "&laquo;" + ["¬"]=> + string(5) "&not;" + ["­"]=> + string(5) "&shy;" + ["®"]=> + string(5) "&reg;" + ["¯"]=> + string(6) "&macr;" + ["°"]=> + string(5) "&deg;" + ["±"]=> + string(8) "&plusmn;" + ["²"]=> + string(6) "&sup2;" + ["³"]=> + string(6) "&sup3;" + ["´"]=> + string(7) "&acute;" + ["µ"]=> + string(7) "&micro;" + ["¶"]=> + string(6) "&para;" + ["·"]=> + string(8) "&middot;" + ["¸"]=> + string(7) "&cedil;" + ["¹"]=> + string(6) "&sup1;" + ["º"]=> + string(6) "&ordm;" + ["»"]=> + string(7) "&raquo;" + ["¼"]=> + string(8) "&frac14;" + ["½"]=> + string(8) "&frac12;" + ["¾"]=> + string(8) "&frac34;" + ["¿"]=> + string(8) "&iquest;" + ["À"]=> + string(8) "&Agrave;" + ["Á"]=> + string(8) "&Aacute;" + ["Â"]=> + string(7) "&Acirc;" + ["Ã"]=> + string(8) "&Atilde;" + ["Ä"]=> + string(6) "&Auml;" + ["Å"]=> + string(7) "&Aring;" + ["Æ"]=> + string(7) "&AElig;" + ["Ç"]=> + string(8) "&Ccedil;" + ["È"]=> + string(8) "&Egrave;" + ["É"]=> + string(8) "&Eacute;" + ["Ê"]=> + string(7) "&Ecirc;" + ["Ë"]=> + string(6) "&Euml;" + ["Ì"]=> + string(8) "&Igrave;" + ["Í"]=> + string(8) "&Iacute;" + ["Î"]=> + string(7) "&Icirc;" + ["Ï"]=> + string(6) "&Iuml;" + ["Ð"]=> + string(5) "&ETH;" + ["Ñ"]=> + string(8) "&Ntilde;" + ["Ò"]=> + string(8) "&Ograve;" + ["Ó"]=> + string(8) "&Oacute;" + ["Ô"]=> + string(7) "&Ocirc;" + ["Õ"]=> + string(8) "&Otilde;" + ["Ö"]=> + string(6) "&Ouml;" + ["×"]=> + string(7) "&times;" + ["Ø"]=> + string(8) "&Oslash;" + ["Ù"]=> + string(8) "&Ugrave;" + ["Ú"]=> + string(8) "&Uacute;" + ["Û"]=> + string(7) "&Ucirc;" + ["Ü"]=> + string(6) "&Uuml;" + ["Ý"]=> + string(8) "&Yacute;" + ["Þ"]=> + string(7) "&THORN;" + ["ß"]=> + string(7) "&szlig;" + ["à"]=> + string(8) "&agrave;" + ["á"]=> + string(8) "&aacute;" + ["â"]=> + string(7) "&acirc;" + ["ã"]=> + string(8) "&atilde;" + ["ä"]=> + string(6) "&auml;" + ["å"]=> + string(7) "&aring;" + ["æ"]=> + string(7) "&aelig;" + ["ç"]=> + string(8) "&ccedil;" + ["è"]=> + string(8) "&egrave;" + ["é"]=> + string(8) "&eacute;" + ["ê"]=> + string(7) "&ecirc;" + ["ë"]=> + string(6) "&euml;" + ["ì"]=> + string(8) "&igrave;" + ["í"]=> + string(8) "&iacute;" + ["î"]=> + string(7) "&icirc;" + ["ï"]=> + string(6) "&iuml;" + ["ð"]=> + string(5) "&eth;" + ["ñ"]=> + string(8) "&ntilde;" + ["ò"]=> + string(8) "&ograve;" + ["ó"]=> + string(8) "&oacute;" + ["ô"]=> + string(7) "&ocirc;" + ["õ"]=> + string(8) "&otilde;" + ["ö"]=> + string(6) "&ouml;" + ["÷"]=> + string(8) "&divide;" + ["ø"]=> + string(8) "&oslash;" + ["ù"]=> + string(8) "&ugrave;" + ["ú"]=> + string(8) "&uacute;" + ["û"]=> + string(7) "&ucirc;" + ["ü"]=> + string(6) "&uuml;" + ["ý"]=> + string(8) "&yacute;" + ["þ"]=> + string(7) "&thorn;" + ["ÿ"]=> + string(6) "&yuml;" + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 7 -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 8 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL +-- Iteration 9 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL +-- Iteration 10 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, object given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, object given in %s on line %d +NULL +-- Iteration 11 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL +-- Iteration 12 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d +NULL +-- Iteration 13 -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 14 -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 15 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %d +NULL +-- Iteration 16 -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 17 -- +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +array(4) { + ["""]=> + string(6) "&quot;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +Done +--UEXPECTF-- +*** Testing get_html_translation_table() : usage variations *** + +--- Testing get_html_translation_table() by supplying different values for 'table' argument --- +-- Iteration 1 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 2 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 3 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 4 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 5 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %d +NULL +-- Iteration 6 -- +array(311) { + [u" "]=> + unicode(6) "&nbsp;" + [u"¡"]=> + unicode(7) "&iexcl;" + [u"¢"]=> + unicode(6) "&cent;" + [u"£"]=> + unicode(7) "&pound;" + [u"¤"]=> + unicode(8) "&curren;" + [u"Â¥"]=> + unicode(5) "&yen;" + [u"¦"]=> + unicode(8) "&brvbar;" + [u"§"]=> + unicode(6) "&sect;" + [u"¨"]=> + unicode(5) "&uml;" + [u"©"]=> + unicode(6) "&copy;" + [u"ª"]=> + unicode(6) "&ordf;" + [u"«"]=> + unicode(7) "&laquo;" + [u"¬"]=> + unicode(5) "&not;" + [u"­"]=> + unicode(5) "&shy;" + [u"®"]=> + unicode(5) "&reg;" + [u"¯"]=> + unicode(6) "&macr;" + [u"°"]=> + unicode(5) "&deg;" + [u"±"]=> + unicode(8) "&plusmn;" + [u"²"]=> + unicode(6) "&sup2;" + [u"³"]=> + unicode(6) "&sup3;" + [u"´"]=> + unicode(7) "&acute;" + [u"µ"]=> + unicode(7) "&micro;" + [u"¶"]=> + unicode(6) "&para;" + [u"·"]=> + unicode(8) "&middot;" + [u"¸"]=> + unicode(7) "&cedil;" + [u"¹"]=> + unicode(6) "&sup1;" + [u"º"]=> + unicode(6) "&ordm;" + [u"»"]=> + unicode(7) "&raquo;" + [u"¼"]=> + unicode(8) "&frac14;" + [u"½"]=> + unicode(8) "&frac12;" + [u"¾"]=> + unicode(8) "&frac34;" + [u"¿"]=> + unicode(8) "&iquest;" + [u"À"]=> + unicode(8) "&Agrave;" + [u"Á"]=> + unicode(8) "&Aacute;" + [u"Â"]=> + unicode(7) "&Acirc;" + [u"Ã"]=> + unicode(8) "&Atilde;" + [u"Ä"]=> + unicode(6) "&Auml;" + [u"Å"]=> + unicode(7) "&Aring;" + [u"Æ"]=> + unicode(7) "&AElig;" + [u"Ç"]=> + unicode(8) "&Ccedil;" + [u"È"]=> + unicode(8) "&Egrave;" + [u"É"]=> + unicode(8) "&Eacute;" + [u"Ê"]=> + unicode(7) "&Ecirc;" + [u"Ë"]=> + unicode(6) "&Euml;" + [u"Ì"]=> + unicode(8) "&Igrave;" + [u"Í"]=> + unicode(8) "&Iacute;" + [u"Î"]=> + unicode(7) "&Icirc;" + [u"Ï"]=> + unicode(6) "&Iuml;" + [u"Ð"]=> + unicode(5) "&ETH;" + [u"Ñ"]=> + unicode(8) "&Ntilde;" + [u"Ò"]=> + unicode(8) "&Ograve;" + [u"Ó"]=> + unicode(8) "&Oacute;" + [u"Ô"]=> + unicode(7) "&Ocirc;" + [u"Õ"]=> + unicode(8) "&Otilde;" + [u"Ö"]=> + unicode(6) "&Ouml;" + [u"×"]=> + unicode(7) "&times;" + [u"Ø"]=> + unicode(8) "&Oslash;" + [u"Ù"]=> + unicode(8) "&Ugrave;" + [u"Ú"]=> + unicode(8) "&Uacute;" + [u"Û"]=> + unicode(7) "&Ucirc;" + [u"Ü"]=> + unicode(6) "&Uuml;" + [u"Ý"]=> + unicode(8) "&Yacute;" + [u"Þ"]=> + unicode(7) "&THORN;" + [u"ß"]=> + unicode(7) "&szlig;" + [u"à"]=> + unicode(8) "&agrave;" + [u"á"]=> + unicode(8) "&aacute;" + [u"â"]=> + unicode(7) "&acirc;" + [u"ã"]=> + unicode(8) "&atilde;" + [u"ä"]=> + unicode(6) "&auml;" + [u"Ã¥"]=> + unicode(7) "&aring;" + [u"æ"]=> + unicode(7) "&aelig;" + [u"ç"]=> + unicode(8) "&ccedil;" + [u"è"]=> + unicode(8) "&egrave;" + [u"é"]=> + unicode(8) "&eacute;" + [u"ê"]=> + unicode(7) "&ecirc;" + [u"ë"]=> + unicode(6) "&euml;" + [u"ì"]=> + unicode(8) "&igrave;" + [u"í"]=> + unicode(8) "&iacute;" + [u"î"]=> + unicode(7) "&icirc;" + [u"ï"]=> + unicode(6) "&iuml;" + [u"ð"]=> + unicode(5) "&eth;" + [u"ñ"]=> + unicode(8) "&ntilde;" + [u"ò"]=> + unicode(8) "&ograve;" + [u"ó"]=> + unicode(8) "&oacute;" + [u"ô"]=> + unicode(7) "&ocirc;" + [u"õ"]=> + unicode(8) "&otilde;" + [u"ö"]=> + unicode(6) "&ouml;" + [u"÷"]=> + unicode(8) "&divide;" + [u"ø"]=> + unicode(8) "&oslash;" + [u"ù"]=> + unicode(8) "&ugrave;" + [u"ú"]=> + unicode(8) "&uacute;" + [u"û"]=> + unicode(7) "&ucirc;" + [u"ü"]=> + unicode(6) "&uuml;" + [u"ý"]=> + unicode(8) "&yacute;" + [u"þ"]=> + unicode(7) "&thorn;" + [u"ÿ"]=> + unicode(6) "&yuml;" + [u"Œ"]=> + unicode(7) "&OElig;" + [u"œ"]=> + unicode(7) "&oelig;" + [u"Å "]=> + unicode(8) "&Scaron;" + [u"Å¡"]=> + unicode(8) "&scaron;" + [u"Ÿ"]=> + unicode(6) "&Yuml;" + [u"ƒ"]=> + unicode(6) "&fnof;" + [u"ˆ"]=> + unicode(6) "&circ;" + [u"˜"]=> + unicode(7) "&tilde;" + [u"Α"]=> + unicode(7) "&Alpha;" + [u"Β"]=> + unicode(6) "&Beta;" + [u"Γ"]=> + unicode(7) "&Gamma;" + [u"Δ"]=> + unicode(7) "&Delta;" + [u"Ε"]=> + unicode(9) "&Epsilon;" + [u"Ζ"]=> + unicode(6) "&Zeta;" + [u"Η"]=> + unicode(5) "&Eta;" + [u"Θ"]=> + unicode(7) "&Theta;" + [u"Ι"]=> + unicode(6) "&Iota;" + [u"Κ"]=> + unicode(7) "&Kappa;" + [u"Λ"]=> + unicode(8) "&Lambda;" + [u"Μ"]=> + unicode(4) "&Mu;" + [u"Ν"]=> + unicode(4) "&Nu;" + [u"Ξ"]=> + unicode(4) "&Xi;" + [u"Ο"]=> + unicode(9) "&Omicron;" + [u"Π"]=> + unicode(4) "&Pi;" + [u"Ρ"]=> + unicode(5) "&Rho;" + [u"Σ"]=> + unicode(7) "&Sigma;" + [u"Τ"]=> + unicode(5) "&Tau;" + [u"Î¥"]=> + unicode(9) "&Upsilon;" + [u"Φ"]=> + unicode(5) "&Phi;" + [u"Χ"]=> + unicode(5) "&Chi;" + [u"Ψ"]=> + unicode(5) "&Psi;" + [u"Ω"]=> + unicode(7) "&Omega;" + [u"α"]=> + unicode(7) "&alpha;" + [u"β"]=> + unicode(6) "&beta;" + [u"γ"]=> + unicode(7) "&gamma;" + [u"δ"]=> + unicode(7) "&delta;" + [u"ε"]=> + unicode(9) "&epsilon;" + [u"ζ"]=> + unicode(6) "&zeta;" + [u"η"]=> + unicode(5) "&eta;" + [u"θ"]=> + unicode(7) "&theta;" + [u"ι"]=> + unicode(6) "&iota;" + [u"κ"]=> + unicode(7) "&kappa;" + [u"λ"]=> + unicode(8) "&lambda;" + [u"μ"]=> + unicode(4) "&mu;" + [u"ν"]=> + unicode(4) "&nu;" + [u"ξ"]=> + unicode(4) "&xi;" + [u"ο"]=> + unicode(9) "&omicron;" + [u"π"]=> + unicode(4) "&pi;" + [u"ρ"]=> + unicode(5) "&rho;" + [u"ς"]=> + unicode(8) "&sigmaf;" + [u"σ"]=> + unicode(7) "&sigma;" + [u"τ"]=> + unicode(5) "&tau;" + [u"υ"]=> + unicode(9) "&upsilon;" + [u"φ"]=> + unicode(5) "&phi;" + [u"χ"]=> + unicode(5) "&chi;" + [u"ψ"]=> + unicode(5) "&psi;" + [u"ω"]=> + unicode(7) "&omega;" + [u"ϑ"]=> + unicode(10) "&thetasym;" + [u"ϒ"]=> + unicode(7) "&upsih;" + [u"ϖ"]=> + unicode(5) "&piv;" + [u" "]=> + unicode(6) "&ensp;" + [u" "]=> + unicode(6) "&emsp;" + [u" "]=> + unicode(8) "&thinsp;" + [u"‌"]=> + unicode(6) "&zwnj;" + [u"‍"]=> + unicode(5) "&zwj;" + [u"‎"]=> + unicode(5) "&lrm;" + [u"‏"]=> + unicode(5) "&rlm;" + [u"–"]=> + unicode(7) "&ndash;" + [u"—"]=> + unicode(7) "&mdash;" + [u"‘"]=> + unicode(7) "&lsquo;" + [u"’"]=> + unicode(7) "&rsquo;" + [u"‚"]=> + unicode(7) "&sbquo;" + [u"“"]=> + unicode(7) "&ldquo;" + [u"”"]=> + unicode(7) "&rdquo;" + [u"„"]=> + unicode(7) "&bdquo;" + [u"†"]=> + unicode(8) "&dagger;" + [u"‡"]=> + unicode(8) "&Dagger;" + [u"•"]=> + unicode(6) "&bull;" + [u"…"]=> + unicode(8) "&hellip;" + [u"‰"]=> + unicode(8) "&permil;" + [u"′"]=> + unicode(7) "&prime;" + [u"″"]=> + unicode(7) "&Prime;" + [u"‹"]=> + unicode(8) "&lsaquo;" + [u"›"]=> + unicode(8) "&rsaquo;" + [u"‾"]=> + unicode(7) "&oline;" + [u"⁄"]=> + unicode(7) "&frasl;" + [u"€"]=> + unicode(6) "&euro;" + [u"ℑ"]=> + unicode(7) "&image;" + [u"℘"]=> + unicode(8) "&weierp;" + [u"ℜ"]=> + unicode(6) "&real;" + [u"™"]=> + unicode(7) "&trade;" + [u"ℵ"]=> + unicode(9) "&alefsym;" + [u"←"]=> + unicode(6) "&larr;" + [u"↑"]=> + unicode(6) "&uarr;" + [u"→"]=> + unicode(6) "&rarr;" + [u"↓"]=> + unicode(6) "&darr;" + [u"↔"]=> + unicode(6) "&harr;" + [u"↵"]=> + unicode(7) "&crarr;" + [u"⇐"]=> + unicode(6) "&lArr;" + [u"⇑"]=> + unicode(6) "&uArr;" + [u"⇒"]=> + unicode(6) "&rArr;" + [u"⇓"]=> + unicode(6) "&dArr;" + [u"⇔"]=> + unicode(6) "&hArr;" + [u"⇕"]=> + unicode(6) "&vArr;" + [u"⇚"]=> + unicode(7) "&lAarr;" + [u"⇛"]=> + unicode(7) "&rAarr;" + [u"⇝"]=> + unicode(7) "&rarrw;" + [u"∀"]=> + unicode(8) "&forall;" + [u"∁"]=> + unicode(6) "&comp;" + [u"∂"]=> + unicode(6) "&part;" + [u"∃"]=> + unicode(7) "&exist;" + [u"∄"]=> + unicode(8) "&nexist;" + [u"∅"]=> + unicode(7) "&empty;" + [u"∇"]=> + unicode(7) "&nabla;" + [u"∈"]=> + unicode(6) "&isin;" + [u"∉"]=> + unicode(7) "&notin;" + [u"∊"]=> + unicode(7) "&epsis;" + [u"∋"]=> + unicode(4) "&ni;" + [u"∌"]=> + unicode(7) "&notni;" + [u"∍"]=> + unicode(7) "&bepsi;" + [u"∏"]=> + unicode(6) "&prod;" + [u"∐"]=> + unicode(8) "&coprod;" + [u"∑"]=> + unicode(5) "&sum;" + [u"−"]=> + unicode(7) "&minus;" + [u"∓"]=> + unicode(8) "&mnplus;" + [u"∔"]=> + unicode(8) "&plusdo;" + [u"∖"]=> + unicode(7) "&setmn;" + [u"∗"]=> + unicode(8) "&lowast;" + [u"∘"]=> + unicode(8) "&compfn;" + [u"√"]=> + unicode(7) "&radic;" + [u"∝"]=> + unicode(6) "&prop;" + [u"∞"]=> + unicode(7) "&infin;" + [u"∟"]=> + unicode(7) "&ang90;" + [u"∠"]=> + unicode(5) "&ang;" + [u"∡"]=> + unicode(8) "&angmsd;" + [u"∢"]=> + unicode(8) "&angsph;" + [u"∣"]=> + unicode(5) "&mid;" + [u"∤"]=> + unicode(6) "&nmid;" + [u"∥"]=> + unicode(5) "&par;" + [u"∦"]=> + unicode(6) "&npar;" + [u"∧"]=> + unicode(5) "&and;" + [u"∨"]=> + unicode(4) "&or;" + [u"∩"]=> + unicode(5) "&cap;" + [u"∪"]=> + unicode(5) "&cup;" + [u"∫"]=> + unicode(5) "&int;" + [u"∮"]=> + unicode(8) "&conint;" + [u"∴"]=> + unicode(8) "&there4;" + [u"∵"]=> + unicode(8) "&becaus;" + [u"∼"]=> + unicode(5) "&sim;" + [u"∽"]=> + unicode(6) "&bsim;" + [u"≀"]=> + unicode(8) "&wreath;" + [u"≁"]=> + unicode(6) "&nsim;" + [u"≃"]=> + unicode(6) "&sime;" + [u"≄"]=> + unicode(7) "&nsime;" + [u"≅"]=> + unicode(6) "&cong;" + [u"≇"]=> + unicode(7) "&ncong;" + [u"≈"]=> + unicode(7) "&asymp;" + [u"≉"]=> + unicode(5) "&nap;" + [u"≊"]=> + unicode(5) "&ape;" + [u"≌"]=> + unicode(7) "&bcong;" + [u"≍"]=> + unicode(7) "&asymp;" + [u"≎"]=> + unicode(6) "&bump;" + [u"≏"]=> + unicode(7) "&bumpe;" + [u"≠"]=> + unicode(4) "&ne;" + [u"≡"]=> + unicode(7) "&equiv;" + [u"≤"]=> + unicode(4) "&le;" + [u"≥"]=> + unicode(4) "&ge;" + [u"≦"]=> + unicode(4) "&lE;" + [u"≧"]=> + unicode(4) "&gE;" + [u"≨"]=> + unicode(5) "&lnE;" + [u"≩"]=> + unicode(5) "&gnE;" + [u"≪"]=> + unicode(4) "&Lt;" + [u"≫"]=> + unicode(4) "&Gt;" + [u"≬"]=> + unicode(7) "&twixt;" + [u"≮"]=> + unicode(5) "&nlt;" + [u"≯"]=> + unicode(5) "&ngt;" + [u"≰"]=> + unicode(6) "&nles;" + [u"≱"]=> + unicode(6) "&nges;" + [u"≲"]=> + unicode(6) "&lsim;" + [u"≳"]=> + unicode(6) "&gsim;" + [u"≶"]=> + unicode(4) "&lg;" + [u"≷"]=> + unicode(4) "&gl;" + [u"≺"]=> + unicode(4) "&pr;" + [u"≻"]=> + unicode(4) "&sc;" + [u"≼"]=> + unicode(7) "&cupre;" + [u"≽"]=> + unicode(7) "&sscue;" + [u"≾"]=> + unicode(7) "&prsim;" + [u"≿"]=> + unicode(7) "&scsim;" + [u"⊀"]=> + unicode(5) "&npr;" + [u"⊁"]=> + unicode(5) "&nsc;" + [u"⊂"]=> + unicode(5) "&sub;" + [u"⊃"]=> + unicode(5) "&sup;" + [u"⊄"]=> + unicode(6) "&nsub;" + [u"⊅"]=> + unicode(6) "&nsup;" + [u"⊆"]=> + unicode(6) "&sube;" + [u"⊇"]=> + unicode(6) "&supe;" + [u"⊕"]=> + unicode(7) "&oplus;" + [u"⊗"]=> + unicode(8) "&otimes;" + [u"⊥"]=> + unicode(6) "&perp;" + [u"⋅"]=> + unicode(6) "&sdot;" + [u"⌈"]=> + unicode(7) "&lceil;" + [u"⌉"]=> + unicode(7) "&rceil;" + [u"⌊"]=> + unicode(8) "&lfloor;" + [u"⌋"]=> + unicode(8) "&rfloor;" + [u"〈"]=> + unicode(6) "&lang;" + [u"〉"]=> + unicode(6) "&rang;" + [u"◊"]=> + unicode(5) "&loz;" + [u"♠"]=> + unicode(8) "&spades;" + [u"♣"]=> + unicode(7) "&clubs;" + [u"♥"]=> + unicode(8) "&hearts;" + [u"♦"]=> + unicode(7) "&diams;" + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +array(311) { + [u" "]=> + unicode(6) "&nbsp;" + [u"¡"]=> + unicode(7) "&iexcl;" + [u"¢"]=> + unicode(6) "&cent;" + [u"£"]=> + unicode(7) "&pound;" + [u"¤"]=> + unicode(8) "&curren;" + [u"Â¥"]=> + unicode(5) "&yen;" + [u"¦"]=> + unicode(8) "&brvbar;" + [u"§"]=> + unicode(6) "&sect;" + [u"¨"]=> + unicode(5) "&uml;" + [u"©"]=> + unicode(6) "&copy;" + [u"ª"]=> + unicode(6) "&ordf;" + [u"«"]=> + unicode(7) "&laquo;" + [u"¬"]=> + unicode(5) "&not;" + [u"­"]=> + unicode(5) "&shy;" + [u"®"]=> + unicode(5) "&reg;" + [u"¯"]=> + unicode(6) "&macr;" + [u"°"]=> + unicode(5) "&deg;" + [u"±"]=> + unicode(8) "&plusmn;" + [u"²"]=> + unicode(6) "&sup2;" + [u"³"]=> + unicode(6) "&sup3;" + [u"´"]=> + unicode(7) "&acute;" + [u"µ"]=> + unicode(7) "&micro;" + [u"¶"]=> + unicode(6) "&para;" + [u"·"]=> + unicode(8) "&middot;" + [u"¸"]=> + unicode(7) "&cedil;" + [u"¹"]=> + unicode(6) "&sup1;" + [u"º"]=> + unicode(6) "&ordm;" + [u"»"]=> + unicode(7) "&raquo;" + [u"¼"]=> + unicode(8) "&frac14;" + [u"½"]=> + unicode(8) "&frac12;" + [u"¾"]=> + unicode(8) "&frac34;" + [u"¿"]=> + unicode(8) "&iquest;" + [u"À"]=> + unicode(8) "&Agrave;" + [u"Á"]=> + unicode(8) "&Aacute;" + [u"Â"]=> + unicode(7) "&Acirc;" + [u"Ã"]=> + unicode(8) "&Atilde;" + [u"Ä"]=> + unicode(6) "&Auml;" + [u"Å"]=> + unicode(7) "&Aring;" + [u"Æ"]=> + unicode(7) "&AElig;" + [u"Ç"]=> + unicode(8) "&Ccedil;" + [u"È"]=> + unicode(8) "&Egrave;" + [u"É"]=> + unicode(8) "&Eacute;" + [u"Ê"]=> + unicode(7) "&Ecirc;" + [u"Ë"]=> + unicode(6) "&Euml;" + [u"Ì"]=> + unicode(8) "&Igrave;" + [u"Í"]=> + unicode(8) "&Iacute;" + [u"Î"]=> + unicode(7) "&Icirc;" + [u"Ï"]=> + unicode(6) "&Iuml;" + [u"Ð"]=> + unicode(5) "&ETH;" + [u"Ñ"]=> + unicode(8) "&Ntilde;" + [u"Ò"]=> + unicode(8) "&Ograve;" + [u"Ó"]=> + unicode(8) "&Oacute;" + [u"Ô"]=> + unicode(7) "&Ocirc;" + [u"Õ"]=> + unicode(8) "&Otilde;" + [u"Ö"]=> + unicode(6) "&Ouml;" + [u"×"]=> + unicode(7) "&times;" + [u"Ø"]=> + unicode(8) "&Oslash;" + [u"Ù"]=> + unicode(8) "&Ugrave;" + [u"Ú"]=> + unicode(8) "&Uacute;" + [u"Û"]=> + unicode(7) "&Ucirc;" + [u"Ü"]=> + unicode(6) "&Uuml;" + [u"Ý"]=> + unicode(8) "&Yacute;" + [u"Þ"]=> + unicode(7) "&THORN;" + [u"ß"]=> + unicode(7) "&szlig;" + [u"à"]=> + unicode(8) "&agrave;" + [u"á"]=> + unicode(8) "&aacute;" + [u"â"]=> + unicode(7) "&acirc;" + [u"ã"]=> + unicode(8) "&atilde;" + [u"ä"]=> + unicode(6) "&auml;" + [u"Ã¥"]=> + unicode(7) "&aring;" + [u"æ"]=> + unicode(7) "&aelig;" + [u"ç"]=> + unicode(8) "&ccedil;" + [u"è"]=> + unicode(8) "&egrave;" + [u"é"]=> + unicode(8) "&eacute;" + [u"ê"]=> + unicode(7) "&ecirc;" + [u"ë"]=> + unicode(6) "&euml;" + [u"ì"]=> + unicode(8) "&igrave;" + [u"í"]=> + unicode(8) "&iacute;" + [u"î"]=> + unicode(7) "&icirc;" + [u"ï"]=> + unicode(6) "&iuml;" + [u"ð"]=> + unicode(5) "&eth;" + [u"ñ"]=> + unicode(8) "&ntilde;" + [u"ò"]=> + unicode(8) "&ograve;" + [u"ó"]=> + unicode(8) "&oacute;" + [u"ô"]=> + unicode(7) "&ocirc;" + [u"õ"]=> + unicode(8) "&otilde;" + [u"ö"]=> + unicode(6) "&ouml;" + [u"÷"]=> + unicode(8) "&divide;" + [u"ø"]=> + unicode(8) "&oslash;" + [u"ù"]=> + unicode(8) "&ugrave;" + [u"ú"]=> + unicode(8) "&uacute;" + [u"û"]=> + unicode(7) "&ucirc;" + [u"ü"]=> + unicode(6) "&uuml;" + [u"ý"]=> + unicode(8) "&yacute;" + [u"þ"]=> + unicode(7) "&thorn;" + [u"ÿ"]=> + unicode(6) "&yuml;" + [u"Œ"]=> + unicode(7) "&OElig;" + [u"œ"]=> + unicode(7) "&oelig;" + [u"Å "]=> + unicode(8) "&Scaron;" + [u"Å¡"]=> + unicode(8) "&scaron;" + [u"Ÿ"]=> + unicode(6) "&Yuml;" + [u"ƒ"]=> + unicode(6) "&fnof;" + [u"ˆ"]=> + unicode(6) "&circ;" + [u"˜"]=> + unicode(7) "&tilde;" + [u"Α"]=> + unicode(7) "&Alpha;" + [u"Β"]=> + unicode(6) "&Beta;" + [u"Γ"]=> + unicode(7) "&Gamma;" + [u"Δ"]=> + unicode(7) "&Delta;" + [u"Ε"]=> + unicode(9) "&Epsilon;" + [u"Ζ"]=> + unicode(6) "&Zeta;" + [u"Η"]=> + unicode(5) "&Eta;" + [u"Θ"]=> + unicode(7) "&Theta;" + [u"Ι"]=> + unicode(6) "&Iota;" + [u"Κ"]=> + unicode(7) "&Kappa;" + [u"Λ"]=> + unicode(8) "&Lambda;" + [u"Μ"]=> + unicode(4) "&Mu;" + [u"Ν"]=> + unicode(4) "&Nu;" + [u"Ξ"]=> + unicode(4) "&Xi;" + [u"Ο"]=> + unicode(9) "&Omicron;" + [u"Π"]=> + unicode(4) "&Pi;" + [u"Ρ"]=> + unicode(5) "&Rho;" + [u"Σ"]=> + unicode(7) "&Sigma;" + [u"Τ"]=> + unicode(5) "&Tau;" + [u"Î¥"]=> + unicode(9) "&Upsilon;" + [u"Φ"]=> + unicode(5) "&Phi;" + [u"Χ"]=> + unicode(5) "&Chi;" + [u"Ψ"]=> + unicode(5) "&Psi;" + [u"Ω"]=> + unicode(7) "&Omega;" + [u"α"]=> + unicode(7) "&alpha;" + [u"β"]=> + unicode(6) "&beta;" + [u"γ"]=> + unicode(7) "&gamma;" + [u"δ"]=> + unicode(7) "&delta;" + [u"ε"]=> + unicode(9) "&epsilon;" + [u"ζ"]=> + unicode(6) "&zeta;" + [u"η"]=> + unicode(5) "&eta;" + [u"θ"]=> + unicode(7) "&theta;" + [u"ι"]=> + unicode(6) "&iota;" + [u"κ"]=> + unicode(7) "&kappa;" + [u"λ"]=> + unicode(8) "&lambda;" + [u"μ"]=> + unicode(4) "&mu;" + [u"ν"]=> + unicode(4) "&nu;" + [u"ξ"]=> + unicode(4) "&xi;" + [u"ο"]=> + unicode(9) "&omicron;" + [u"π"]=> + unicode(4) "&pi;" + [u"ρ"]=> + unicode(5) "&rho;" + [u"ς"]=> + unicode(8) "&sigmaf;" + [u"σ"]=> + unicode(7) "&sigma;" + [u"τ"]=> + unicode(5) "&tau;" + [u"υ"]=> + unicode(9) "&upsilon;" + [u"φ"]=> + unicode(5) "&phi;" + [u"χ"]=> + unicode(5) "&chi;" + [u"ψ"]=> + unicode(5) "&psi;" + [u"ω"]=> + unicode(7) "&omega;" + [u"ϑ"]=> + unicode(10) "&thetasym;" + [u"ϒ"]=> + unicode(7) "&upsih;" + [u"ϖ"]=> + unicode(5) "&piv;" + [u" "]=> + unicode(6) "&ensp;" + [u" "]=> + unicode(6) "&emsp;" + [u" "]=> + unicode(8) "&thinsp;" + [u"‌"]=> + unicode(6) "&zwnj;" + [u"‍"]=> + unicode(5) "&zwj;" + [u"‎"]=> + unicode(5) "&lrm;" + [u"‏"]=> + unicode(5) "&rlm;" + [u"–"]=> + unicode(7) "&ndash;" + [u"—"]=> + unicode(7) "&mdash;" + [u"‘"]=> + unicode(7) "&lsquo;" + [u"’"]=> + unicode(7) "&rsquo;" + [u"‚"]=> + unicode(7) "&sbquo;" + [u"“"]=> + unicode(7) "&ldquo;" + [u"”"]=> + unicode(7) "&rdquo;" + [u"„"]=> + unicode(7) "&bdquo;" + [u"†"]=> + unicode(8) "&dagger;" + [u"‡"]=> + unicode(8) "&Dagger;" + [u"•"]=> + unicode(6) "&bull;" + [u"…"]=> + unicode(8) "&hellip;" + [u"‰"]=> + unicode(8) "&permil;" + [u"′"]=> + unicode(7) "&prime;" + [u"″"]=> + unicode(7) "&Prime;" + [u"‹"]=> + unicode(8) "&lsaquo;" + [u"›"]=> + unicode(8) "&rsaquo;" + [u"‾"]=> + unicode(7) "&oline;" + [u"⁄"]=> + unicode(7) "&frasl;" + [u"€"]=> + unicode(6) "&euro;" + [u"ℑ"]=> + unicode(7) "&image;" + [u"℘"]=> + unicode(8) "&weierp;" + [u"ℜ"]=> + unicode(6) "&real;" + [u"™"]=> + unicode(7) "&trade;" + [u"ℵ"]=> + unicode(9) "&alefsym;" + [u"←"]=> + unicode(6) "&larr;" + [u"↑"]=> + unicode(6) "&uarr;" + [u"→"]=> + unicode(6) "&rarr;" + [u"↓"]=> + unicode(6) "&darr;" + [u"↔"]=> + unicode(6) "&harr;" + [u"↵"]=> + unicode(7) "&crarr;" + [u"⇐"]=> + unicode(6) "&lArr;" + [u"⇑"]=> + unicode(6) "&uArr;" + [u"⇒"]=> + unicode(6) "&rArr;" + [u"⇓"]=> + unicode(6) "&dArr;" + [u"⇔"]=> + unicode(6) "&hArr;" + [u"⇕"]=> + unicode(6) "&vArr;" + [u"⇚"]=> + unicode(7) "&lAarr;" + [u"⇛"]=> + unicode(7) "&rAarr;" + [u"⇝"]=> + unicode(7) "&rarrw;" + [u"∀"]=> + unicode(8) "&forall;" + [u"∁"]=> + unicode(6) "&comp;" + [u"∂"]=> + unicode(6) "&part;" + [u"∃"]=> + unicode(7) "&exist;" + [u"∄"]=> + unicode(8) "&nexist;" + [u"∅"]=> + unicode(7) "&empty;" + [u"∇"]=> + unicode(7) "&nabla;" + [u"∈"]=> + unicode(6) "&isin;" + [u"∉"]=> + unicode(7) "&notin;" + [u"∊"]=> + unicode(7) "&epsis;" + [u"∋"]=> + unicode(4) "&ni;" + [u"∌"]=> + unicode(7) "&notni;" + [u"∍"]=> + unicode(7) "&bepsi;" + [u"∏"]=> + unicode(6) "&prod;" + [u"∐"]=> + unicode(8) "&coprod;" + [u"∑"]=> + unicode(5) "&sum;" + [u"−"]=> + unicode(7) "&minus;" + [u"∓"]=> + unicode(8) "&mnplus;" + [u"∔"]=> + unicode(8) "&plusdo;" + [u"∖"]=> + unicode(7) "&setmn;" + [u"∗"]=> + unicode(8) "&lowast;" + [u"∘"]=> + unicode(8) "&compfn;" + [u"√"]=> + unicode(7) "&radic;" + [u"∝"]=> + unicode(6) "&prop;" + [u"∞"]=> + unicode(7) "&infin;" + [u"∟"]=> + unicode(7) "&ang90;" + [u"∠"]=> + unicode(5) "&ang;" + [u"∡"]=> + unicode(8) "&angmsd;" + [u"∢"]=> + unicode(8) "&angsph;" + [u"∣"]=> + unicode(5) "&mid;" + [u"∤"]=> + unicode(6) "&nmid;" + [u"∥"]=> + unicode(5) "&par;" + [u"∦"]=> + unicode(6) "&npar;" + [u"∧"]=> + unicode(5) "&and;" + [u"∨"]=> + unicode(4) "&or;" + [u"∩"]=> + unicode(5) "&cap;" + [u"∪"]=> + unicode(5) "&cup;" + [u"∫"]=> + unicode(5) "&int;" + [u"∮"]=> + unicode(8) "&conint;" + [u"∴"]=> + unicode(8) "&there4;" + [u"∵"]=> + unicode(8) "&becaus;" + [u"∼"]=> + unicode(5) "&sim;" + [u"∽"]=> + unicode(6) "&bsim;" + [u"≀"]=> + unicode(8) "&wreath;" + [u"≁"]=> + unicode(6) "&nsim;" + [u"≃"]=> + unicode(6) "&sime;" + [u"≄"]=> + unicode(7) "&nsime;" + [u"≅"]=> + unicode(6) "&cong;" + [u"≇"]=> + unicode(7) "&ncong;" + [u"≈"]=> + unicode(7) "&asymp;" + [u"≉"]=> + unicode(5) "&nap;" + [u"≊"]=> + unicode(5) "&ape;" + [u"≌"]=> + unicode(7) "&bcong;" + [u"≍"]=> + unicode(7) "&asymp;" + [u"≎"]=> + unicode(6) "&bump;" + [u"≏"]=> + unicode(7) "&bumpe;" + [u"≠"]=> + unicode(4) "&ne;" + [u"≡"]=> + unicode(7) "&equiv;" + [u"≤"]=> + unicode(4) "&le;" + [u"≥"]=> + unicode(4) "&ge;" + [u"≦"]=> + unicode(4) "&lE;" + [u"≧"]=> + unicode(4) "&gE;" + [u"≨"]=> + unicode(5) "&lnE;" + [u"≩"]=> + unicode(5) "&gnE;" + [u"≪"]=> + unicode(4) "&Lt;" + [u"≫"]=> + unicode(4) "&Gt;" + [u"≬"]=> + unicode(7) "&twixt;" + [u"≮"]=> + unicode(5) "&nlt;" + [u"≯"]=> + unicode(5) "&ngt;" + [u"≰"]=> + unicode(6) "&nles;" + [u"≱"]=> + unicode(6) "&nges;" + [u"≲"]=> + unicode(6) "&lsim;" + [u"≳"]=> + unicode(6) "&gsim;" + [u"≶"]=> + unicode(4) "&lg;" + [u"≷"]=> + unicode(4) "&gl;" + [u"≺"]=> + unicode(4) "&pr;" + [u"≻"]=> + unicode(4) "&sc;" + [u"≼"]=> + unicode(7) "&cupre;" + [u"≽"]=> + unicode(7) "&sscue;" + [u"≾"]=> + unicode(7) "&prsim;" + [u"≿"]=> + unicode(7) "&scsim;" + [u"⊀"]=> + unicode(5) "&npr;" + [u"⊁"]=> + unicode(5) "&nsc;" + [u"⊂"]=> + unicode(5) "&sub;" + [u"⊃"]=> + unicode(5) "&sup;" + [u"⊄"]=> + unicode(6) "&nsub;" + [u"⊅"]=> + unicode(6) "&nsup;" + [u"⊆"]=> + unicode(6) "&sube;" + [u"⊇"]=> + unicode(6) "&supe;" + [u"⊕"]=> + unicode(7) "&oplus;" + [u"⊗"]=> + unicode(8) "&otimes;" + [u"⊥"]=> + unicode(6) "&perp;" + [u"⋅"]=> + unicode(6) "&sdot;" + [u"⌈"]=> + unicode(7) "&lceil;" + [u"⌉"]=> + unicode(7) "&rceil;" + [u"⌊"]=> + unicode(8) "&lfloor;" + [u"⌋"]=> + unicode(8) "&rfloor;" + [u"〈"]=> + unicode(6) "&lang;" + [u"〉"]=> + unicode(6) "&rang;" + [u"◊"]=> + unicode(5) "&loz;" + [u"♠"]=> + unicode(8) "&spades;" + [u"♣"]=> + unicode(7) "&clubs;" + [u"♥"]=> + unicode(8) "&hearts;" + [u"♦"]=> + unicode(7) "&diams;" + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 7 -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 8 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 9 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 10 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, object given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, object given in %s on line %d +NULL +-- Iteration 11 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 12 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 13 -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 14 -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 15 -- + +Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %d +NULL + +Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %d +NULL +-- Iteration 16 -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 17 -- +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +array(4) { + [u"""]=> + unicode(6) "&quot;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/get_html_translation_table_variation2.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/strings/get_html_translation_table_variation2.phpt diff -u /dev/null php-src/ext/standard/tests/strings/get_html_translation_table_variation2.phpt:1.2 --- /dev/null Mon Oct 8 15:30:38 2007 +++ php-src/ext/standard/tests/strings/get_html_translation_table_variation2.phpt Mon Oct 8 15:30:38 2007 @@ -0,0 +1,305 @@ +--TEST-- +Test get_html_translation_table() function : usage variations - unexpected quote_style values +--SKIPIF-- +<?php +if( substr(PHP_OS, 0, 3) == "WIN"){ + die('skip Not for Windows'); +} + +if( ini_get("unicode.semantics") == "1") + die('skip do not run when unicode on'); + +if( !setlocale(LC_ALL, "en_US.UTF-8") ) { + die('skip failed to set locale settings to "en-US.UTF-8"'); +} +?> +--FILE-- +<?php +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) + * Description: Returns the internal translation table used by htmlspecialchars and htmlentities + * Source code: ext/standard/html.c +*/ + +/* + * test get_html_translation_table() with unexpteced value for argument $quote_style +*/ + +//set locale to en_US.UTF-8 +setlocale(LC_ALL, "en_US.UTF-8"); + +echo "*** Testing get_html_translation_table() : usage variations ***\n"; +// initialize all required variables +$table = HTML_SPECIALCHARS; + +// get an unset variable +$unset_var = 10; +unset($unset_var); + +// a resource var +$fp = fopen(__FILE__, "r"); + +// array with different values +$values = array ( + + // array values + array(), + array(0), + array(1), + array(1, 2), + array('color' => 'red', 'item' => 'pen'), + + // boolean values + true, + FALSE, + + // string values + "string", + 'string', + + // objects + new stdclass(), + + // empty string + "", + '', + + // null vlaues + NULL, + null, + + // resource var + $fp, + + // undefined variable + @$undefined_var, + + // unset variable + @$unset_var +); + + +// loop through each element of the array and check the working of get_html_translation_table() +// when $quote_style arugment is supplied with different values +echo "\n--- Testing get_html_translation_table() by supplying different values for 'quote_style' argument ---\n"; +$counter = 1; +for($index = 0; $index < count($values); $index ++) { + echo "-- Iteration $counter --\n"; + $quote_style = $values [$index]; + + var_dump( get_html_translation_table($table, $quote_style) ); + + $counter ++; +} + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing get_html_translation_table() : usage variations *** + +--- Testing get_html_translation_table() by supplying different values for 'quote_style' argument --- +-- Iteration 1 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 2 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 3 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 4 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 5 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 6 -- +array(4) { + ["'"]=> + string(5) "&#39;" + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 7 -- +array(3) { + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 8 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %d +NULL +-- Iteration 9 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %d +NULL +-- Iteration 10 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, object given in %s on line %d +NULL +-- Iteration 11 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %d +NULL +-- Iteration 12 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %d +NULL +-- Iteration 13 -- +array(3) { + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 14 -- +array(3) { + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 15 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, resource given in %s on line %d +NULL +-- Iteration 16 -- +array(3) { + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +-- Iteration 17 -- +array(3) { + ["<"]=> + string(4) "&lt;" + [">"]=> + string(4) "&gt;" + ["&"]=> + string(5) "&amp;" +} +Done +--UEXPECTF-- +*** Testing get_html_translation_table() : usage variations *** + +--- Testing get_html_translation_table() by supplying different values for 'quote_style' argument --- +-- Iteration 1 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 2 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 3 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 4 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 5 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %d +NULL +-- Iteration 6 -- +array(4) { + [u"'"]=> + unicode(5) "&#39;" + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 7 -- +array(3) { + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 8 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 9 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 10 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, object given in %s on line %d +NULL +-- Iteration 11 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 12 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, Unicode string given in %s on line %d +NULL +-- Iteration 13 -- +array(3) { + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 14 -- +array(3) { + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 15 -- + +Warning: get_html_translation_table() expects parameter 2 to be long, resource given in %s on line %d +NULL +-- Iteration 16 -- +array(3) { + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +-- Iteration 17 -- +array(3) { + [u"<"]=> + unicode(4) "&lt;" + [u">"]=> + unicode(4) "&gt;" + [u"&"]=> + unicode(5) "&amp;" +} +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/get_html_translation_table_basic4.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/get_html_translation_table_basic4.phpt +++ php-src/ext/standard/tests/strings/get_html_translation_table_basic4.phpt --TEST-- Test get_html_translation_table() function : basic functionality - table as HTML_SPECIALCHARS --SKIPIF-- <?php if( substr(PHP_OS, 0, 3) == "WIN"){ die('skip Not for Windows'); } if( ini_get("unicode.semantics") == "1") die('skip do not run when unicode on'); if( !setlocale(LC_ALL, "en_US.UTF-8") ) { die('skip failed to set locale settings to "en-US.UTF-8"'); } ?> --FILE-- <?php /* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) * Description: Returns the internal translation table used by htmlspecialchars and htmlentities * Source code: ext/standard/html.c */ /* test get_html_translation_table() when $table argument is specified as HTML_SPECIALCHARS */ //set locale to en_US.UTF-8 setlocale(LC_ALL, "en_US.UTF-8"); echo "*** Testing get_html_translation_table() : basic functionality ***\n"; // $table as HTML_SEPCIALCHARS and different quote style echo "-- with table = HTML_SPECIALCHARS & quote_style = ENT_COMPAT --\n"; $table = HTML_SPECIALCHARS; $quote_style = ENT_COMPAT; var_dump( get_html_translation_table($table, $quote_style) ); echo "-- with table = HTML_SPECIALCHARS & quote_style = ENT_QUOTE --\n"; $quote_style = ENT_QUOTES; var_dump( get_html_translation_table($table, $quote_style) ); echo "-- with table = HTML_SPECIALCHARS & quote_style = ENT_NOQUOTE --\n"; $quote_style = ENT_NOQUOTES; var_dump( get_html_translation_table($table, $quote_style) ); echo "Done\n"; ?> --EXPECTF-- *** Testing get_html_translation_table() : basic functionality *** -- with table = HTML_SPECIALCHARS & quote_style = ENT_COMPAT -- array(4) { ["""]=> string(6) "&quot;" ["<"]=> string(4) "&lt;" [">"]=> string(4) "&gt;" ["&"]=> string(5) "&amp;" } -- with table = HTML_SPECIALCHARS & quote_style = ENT_QUOTE -- array(5) { ["""]=> string(6) "&quot;" ["'"]=> string(5) "&#39;" ["<"]=> string(4) "&lt;" [">"]=> string(4) "&gt;" ["&"]=> string(5) "&amp;" } -- with table = HTML_SPECIALCHARS & quote_style = ENT_NOQUOTE -- array(3) { ["<"]=> string(4) "&lt;" [">"]=> string(4) "&gt;" ["&"]=> string(5) "&amp;" } Done --UEXPECT-- *** Testing get_html_translation_table() : basic functionality *** -- with table = HTML_SPECIALCHARS & quote_style = ENT_COMPAT -- array(4) { [u"""]=> unicode(6) "&quot;" [u"<"]=> unicode(4) "&lt;" [u">"]=> unicode(4) "&gt;" [u"&"]=> unicode(5) "&amp;" } -- with table = HTML_SPECIALCHARS & quote_style = ENT_QUOTE -- array(5) { [u"""]=> unicode(6) "&quot;" [u"'"]=> unicode(5) "&#39;" [u"<"]=> unicode(4) "&lt;" [u">"]=> unicode(4) "&gt;" [u"&"]=> unicode(5) "&amp;" } -- with table = HTML_SPECIALCHARS & quote_style = ENT_NOQUOTE -- array(3) { [u"<"]=> unicode(4) "&lt;" [u">"]=> unicode(4) "&gt;" [u"&"]=> unicode(5) "&amp;" } Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/get_html_translation_table_basic4-win32.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/get_html_translation_table_basic4-win32.phpt +++ php-src/ext/standard/tests/strings/get_html_translation_table_basic4-win32.phpt --TEST-- Test get_html_translation_table() function : basic functionality - table as HTML_SPECIALCHARS --SKIPIF-- <?php if( substr(PHP_OS, 0, 3) != "WIN"){ die('skip only for Windows'); } if( ini_get("unicode.semantics") == "1") die('skip do not run when unicode on'); if( !setlocale(LC_ALL, "English_United States.1252") ) { die('skip failed to set locale settings to "English_United States.1252"'); } ?> --FILE-- <?php /* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) * Description: Returns the internal translation table used by htmlspecialchars and htmlentities * Source code: ext/standard/html.c */ /* test get_html_translation_table() when $table argument is specified as HTML_SPECIALCHARS */ //set locale setlocale(LC_ALL, "English_United States.1252"); echo "*** Testing get_html_translation_table() : basic functionality ***\n"; // $table as HTML_SEPCIALCHARS and different quote style echo "-- with table = HTML_SPECIALCHARS & quote_style = ENT_COMPAT --\n"; $table = HTML_SPECIALCHARS; $quote_style = ENT_COMPAT; var_dump( get_html_translation_table($table, $quote_style) ); echo "-- with table = HTML_SPECIALCHARS & quote_style = ENT_QUOTE --\n"; $quote_style = ENT_QUOTES; var_dump( get_html_translation_table($table, $quote_style) ); echo "-- with table = HTML_SPECIALCHARS & quote_style = ENT_NOQUOTE --\n"; $quote_style = ENT_NOQUOTES; var_dump( get_html_translation_table($table, $quote_style) ); echo "Done\n"; ?> --EXPECTF-- *** Testing get_html_translation_table() : basic functionality *** -- with table = HTML_SPECIALCHARS & quote_style = ENT_COMPAT -- array(4) { ["""]=> string(6) "&quot;" ["<"]=> string(4) "&lt;" [">"]=> string(4) "&gt;" ["&"]=> string(5) "&amp;" } -- with table = HTML_SPECIALCHARS & quote_style = ENT_QUOTE -- array(5) { ["""]=> string(6) "&quot;" ["'"]=> string(5) "&#39;" ["<"]=> string(4) "&lt;" [">"]=> string(4) "&gt;" ["&"]=> string(5) "&amp;" } -- with table = HTML_SPECIALCHARS & quote_style = ENT_NOQUOTE -- array(3) { ["<"]=> string(4) "&lt;" [">"]=> string(4) "&gt;" ["&"]=> string(5) "&amp;" } Done --UEXPECT-- *** Testing get_html_translation_table() : basic functionality *** -- with table = HTML_SPECIALCHARS & quote_style = ENT_COMPAT -- array(4) { [u"""]=> unicode(6) "&quot;" [u"<"]=> unicode(4) "&lt;" [u">"]=> unicode(4) "&gt;" [u"&"]=> unicode(5) "&amp;" } -- with table = HTML_SPECIALCHARS & quote_style = ENT_QUOTE -- array(5) { [u"""]=> unicode(6) "&quot;" [u"'"]=> unicode(5) "&#39;" [u"<"]=> unicode(4) "&lt;" [u">"]=> unicode(4) "&gt;" [u"&"]=> unicode(5) "&amp;" } -- with table = HTML_SPECIALCHARS & quote_style = ENT_NOQUOTE -- array(3) { [u"<"]=> unicode(4) "&lt;" [u">"]=> unicode(4) "&gt;" [u"&"]=> unicode(5) "&amp;" } Done
« previous php.cvs (#46538) next »