mirror of
https://github.com/php/php-src.git
synced 2024-10-22 08:47:29 +00:00
51 lines
1.1 KiB
Plaintext
51 lines
1.1 KiB
Plaintext
|
--TEST--
|
||
|
htmlentities() / html_entity_decode() #8592 - #9002 table test
|
||
|
--FILE--
|
||
|
<?php
|
||
|
$tests = array(
|
||
|
array(8768, '≀', "e28980"),
|
||
|
array(8853, '⊕', "e28a95"),
|
||
|
array(8855, '⊗', "e28a97"),
|
||
|
array(8869, '⊥', "e28aa5"),
|
||
|
array(8901, '⋅', "e28b85"),
|
||
|
array(8968, '⌈', "e28c88"),
|
||
|
array(8969, '⌉', "e28c89"),
|
||
|
array(8970, '⌊', "e28c8a"),
|
||
|
array(8971, '⌋', "e28c8b"),
|
||
|
array(9001, '⟨', "e28ca9"),
|
||
|
array(9002, '⟩', "e28caa")
|
||
|
);
|
||
|
|
||
|
foreach ($tests as $test) {
|
||
|
var_dump(htmlentities(pack('H*', $test[2]), ENT_QUOTES, 'UTF-8'));
|
||
|
}
|
||
|
|
||
|
foreach ($tests as $test) {
|
||
|
list(,$result) = unpack('H6', html_entity_decode($test[1], ENT_QUOTES, 'UTF-8'));
|
||
|
var_dump($result);
|
||
|
}
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
string(8) "≀"
|
||
|
string(7) "⊕"
|
||
|
string(8) "⊗"
|
||
|
string(6) "⊥"
|
||
|
string(6) "⋅"
|
||
|
string(7) "⌈"
|
||
|
string(7) "⌉"
|
||
|
string(8) "⌊"
|
||
|
string(8) "⌋"
|
||
|
string(6) "⟨"
|
||
|
string(6) "⟩"
|
||
|
string(6) "e28980"
|
||
|
string(6) "e28a95"
|
||
|
string(6) "e28a97"
|
||
|
string(6) "e28aa5"
|
||
|
string(6) "e28b85"
|
||
|
string(6) "e28c88"
|
||
|
string(6) "e28c89"
|
||
|
string(6) "e28c8a"
|
||
|
string(6) "e28c8b"
|
||
|
string(6) "e28ca9"
|
||
|
string(6) "e28caa"
|