diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-02-16 10:13:02 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-02-16 10:13:02 +0100 |
| commit | fd5a0b31640419ca63d1ddeaffd6d3cf2a741814 (patch) | |
| tree | bfd17d84c5181d7b98d7d66f56573f4fc897e31c /ext/standard/tests | |
| parent | 01fcdff3849c3691d9aaeaab735846ab6d8895ca (diff) | |
| download | php-fd5a0b31640419ca63d1ddeaffd6d3cf2a741814.tar.gz | |
Imported Upstream version 5.3.5upstream/5.3.5
Diffstat (limited to 'ext/standard/tests')
63 files changed, 2247 insertions, 3642 deletions
diff --git a/ext/standard/tests/array/bug52534.phpt b/ext/standard/tests/array/bug52534.phpt new file mode 100644 index 000000000..dfff3fdb4 --- /dev/null +++ b/ext/standard/tests/array/bug52534.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #52534 (var_export array with negative key) +--FILE-- +<?php + +$aArray = array ( -1 => 'Hello'); + +var_export($aArray); + +?> +--EXPECT-- +array ( + -1 => 'Hello', +) diff --git a/ext/standard/tests/array/extract_safety.phpt b/ext/standard/tests/array/extract_safety.phpt new file mode 100644 index 000000000..d5d0763be --- /dev/null +++ b/ext/standard/tests/array/extract_safety.phpt @@ -0,0 +1,24 @@ +--TEST-- +Test extract() for overwrite of GLOBALS +--FILE-- +<?php +$str = "John"; +debug_zval_dump($GLOBALS["str"]); + +/* Extracting Global Variables */ +$splat = array("foo" => "bar"); +var_dump(extract(array("GLOBALS" => $splat, EXTR_OVERWRITE))); + +unset ($splat); + +debug_zval_dump($GLOBALS["str"]); + +echo "\nDone"; +?> + +--EXPECTF-- +string(4) "John" refcount(2) +int(0) +string(4) "John" refcount(2) + +Done
\ No newline at end of file diff --git a/ext/standard/tests/assert/assert02.phpt b/ext/standard/tests/assert/assert02.phpt index 8f986d543..723eeb956 100644 --- a/ext/standard/tests/assert/assert02.phpt +++ b/ext/standard/tests/assert/assert02.phpt @@ -4,7 +4,7 @@ catch assert() errors assert.active=1 assert.warning=1 assert.callback= -assert.bbail=0 +assert.bail=0 assert.quiet_eval=0 --FILE-- <?php diff --git a/ext/standard/tests/file/bug52820.phpt b/ext/standard/tests/file/bug52820.phpt new file mode 100644 index 000000000..b398cc4b8 --- /dev/null +++ b/ext/standard/tests/file/bug52820.phpt @@ -0,0 +1,49 @@ +--TEST--
+Bug #52820 (writes to fopencookie FILE* not commited when seeking the stream)
+--SKIPIF--
+<?php
+/* unfortunately no standard function does a cast to FILE*, so we need
+ * curl to test this */
+if (!extension_loaded("curl")) exit("skip curl extension not loaded");
+$handle=curl_init('http://127.0.0.1:37349/');
+curl_setopt($handle, CURLOPT_VERBOSE, true);
+curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
+if (!curl_setopt($handle, CURLOPT_STDERR, fopen("php://memory", "w+")))
+ die("skip fopencookie not supported on this platform");
+--FILE--
+<?php
+function do_stuff($url) {
+ $handle=curl_init('http://127.0.0.1:37349/');
+ curl_setopt($handle, CURLOPT_VERBOSE, true);
+ curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
+ curl_setopt($handle, CURLOPT_STDERR, $o = fopen($url, "w+"));
+ curl_exec($handle);
+ echo "About to rewind!\n";
+ rewind($o);
+ echo stream_get_contents($o);
+ return $o;
+}
+
+echo "temp stream (close after):\n";
+fclose(do_stuff("php://temp"));
+
+echo "\nmemory stream (close after):\n";
+fclose(do_stuff("php://memory"));
+
+echo "\nDone.\n";
+--EXPECT--
+temp stream (close after):
+About to rewind!
+* About to connect() to 127.0.0.1 port 37349 (#0)
+* Trying 127.0.0.1... * Connection refused
+* couldn't connect to host
+* Closing connection #0
+
+memory stream (close after):
+About to rewind!
+* About to connect() to 127.0.0.1 port 37349 (#0)
+* Trying 127.0.0.1... * Connection refused
+* couldn't connect to host
+* Closing connection #0
+
+Done.
diff --git a/ext/standard/tests/file/bug53241.phpt b/ext/standard/tests/file/bug53241.phpt new file mode 100644 index 000000000..685bf1462 --- /dev/null +++ b/ext/standard/tests/file/bug53241.phpt @@ -0,0 +1,23 @@ +--TEST--
+Bug #53241 (stream casting that relies on fdopen/fopencookie fails with 'xb' mode)
+--SKIPIF--
+<?php
+/* unfortunately no standard function does a cast to FILE*, so we need
+ * curl to test this */
+if (!extension_loaded("curl")) exit("skip curl extension not loaded");
+--FILE--
+<?php
+$fn = __DIR__ . "/test.tmp";
+@unlink($fn);
+$fh = fopen($fn, 'xb');
+$ch = curl_init('http://www.yahoo.com/');
+var_dump(curl_setopt($ch, CURLOPT_FILE, $fh));
+echo "Done.\n";
+--CLEAN--
+<?php
+$fn = __DIR__ . "/test.tmp";
+@unlink($fn);
+?>
+--EXPECT--
+bool(true)
+Done.
diff --git a/ext/standard/tests/file/copy_variation12.phpt b/ext/standard/tests/file/copy_variation12.phpt index 34667ba79..7f96fd050 100644 --- a/ext/standard/tests/file/copy_variation12.phpt +++ b/ext/standard/tests/file/copy_variation12.phpt @@ -41,11 +41,11 @@ rmdir(dirname(__FILE__)."/copy_variation12"); --EXPECTF-- *** Test copy() function: Trying to create a copy of an existing dir *** -Warning: copy(): The first argument to copy() function cannot be a directory in %s/copy_variation12.php on line %d +Warning: copy(): The first argument to copy() function cannot be a directory in %scopy_variation12.php on line %d bool(false) bool(false) int(%d) -Warning: filesize(): stat failed for %s/copy_copy_variation12 in %s/copy_variation12.php on line %d +Warning: filesize(): stat failed for %scopy_copy_variation12 in %scopy_variation12.php on line %d bool(false) *** Done *** diff --git a/ext/standard/tests/file/copy_variation4.phpt b/ext/standard/tests/file/copy_variation4.phpt Binary files differindex 48386743f..32756c1ed 100644 --- a/ext/standard/tests/file/copy_variation4.phpt +++ b/ext/standard/tests/file/copy_variation4.phpt diff --git a/ext/standard/tests/file/disk_free_space_variation.phpt b/ext/standard/tests/file/disk_free_space_variation.phpt index c1809986f..178f857ab 100644 --- a/ext/standard/tests/file/disk_free_space_variation.phpt +++ b/ext/standard/tests/file/disk_free_space_variation.phpt @@ -105,19 +105,19 @@ float(%d) float(%d) -- Iteration 9 -- -float(%d) -float(%d) +bool(false) +bool(false) -- Iteration 10 -- -float(%d) -float(%d) +bool(false) +bool(false) -- Iteration 11 -- -float(%d) -float(%d) +bool(false) +bool(false) -- Iteration 12 -- -float(%d) -float(%d) +bool(false) +bool(false) --- Done --- diff --git a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt index 43d742a67..c0074ff38 100644 --- a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt +++ b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt @@ -76,8 +76,6 @@ Warning: file_get_contents( ): failed to open stream: Permission denied in %s on bool(false) -- Filename: \0 -- - -Warning: file_get_contents(): Filename cannot be empty in %s on line %d bool(false) -- Filename: array() -- diff --git a/ext/standard/tests/file/file_get_contents_variation8.phpt b/ext/standard/tests/file/file_get_contents_variation8.phpt index dca75a02e..84621e1bd 100644 --- a/ext/standard/tests/file/file_get_contents_variation8.phpt +++ b/ext/standard/tests/file/file_get_contents_variation8.phpt @@ -68,8 +68,6 @@ bool(false) Warning: file_get_contents( ): failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 6 -- - -Warning: file_get_contents(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 7 -- diff --git a/ext/standard/tests/file/file_put_contents_variation8.phpt b/ext/standard/tests/file/file_put_contents_variation8.phpt Binary files differindex 1e27e7133..c35ace47b 100644 --- a/ext/standard/tests/file/file_put_contents_variation8.phpt +++ b/ext/standard/tests/file/file_put_contents_variation8.phpt diff --git a/ext/standard/tests/file/filegroup_variation3.phpt b/ext/standard/tests/file/filegroup_variation3.phpt index dd875a082..c41f38363 100644 --- a/ext/standard/tests/file/filegroup_variation3.phpt +++ b/ext/standard/tests/file/filegroup_variation3.phpt @@ -74,8 +74,8 @@ bool(false) Warning: filegroup(): stat failed for %s/filegroup_variation3/filegroup*.tmp in %s on line %d bool(false) - Iteration 7 - -int(%d) +bool(false) - Iteration 8 - -int(%d) +bool(false) *** Done *** diff --git a/ext/standard/tests/file/fileinode_variation3.phpt b/ext/standard/tests/file/fileinode_variation3.phpt index c81b57324..23cf3c7c7 100644 --- a/ext/standard/tests/file/fileinode_variation3.phpt +++ b/ext/standard/tests/file/fileinode_variation3.phpt @@ -75,8 +75,8 @@ bool(false) Warning: fileinode(): stat failed for %s/fileinode_variation3/fileinode*.tmp in %s on line %d bool(false) - Iteration 7 - -int(%d) +bool(false) - Iteration 8 - -int(%d) +bool(false) *** Done *** diff --git a/ext/standard/tests/file/fileowner_variation3.phpt b/ext/standard/tests/file/fileowner_variation3.phpt index 2a322b6db..b2691e923 100644 --- a/ext/standard/tests/file/fileowner_variation3.phpt +++ b/ext/standard/tests/file/fileowner_variation3.phpt @@ -75,8 +75,8 @@ bool(false) Warning: fileowner(): stat failed for %s/fileowner_variation3/fileowner*.tmp in %s on line %d bool(false) - Iteration 7 - -int(%d) +bool(false) - Iteration 8 - -int(%d) +bool(false) *** Done *** diff --git a/ext/standard/tests/file/fileperms_variation3.phpt b/ext/standard/tests/file/fileperms_variation3.phpt index 38101e363..1e7396a50 100644 --- a/ext/standard/tests/file/fileperms_variation3.phpt +++ b/ext/standard/tests/file/fileperms_variation3.phpt @@ -74,8 +74,8 @@ bool(false) Warning: fileperms(): stat failed for %s/fileperms_variation3/fileperms*.tmp in %s on line %d bool(false) - Iteration 7 - -int(%d) +bool(false) - Iteration 8 - -int(%d) +bool(false) *** Done *** diff --git a/ext/standard/tests/file/fnmatch_variation.phpt b/ext/standard/tests/file/fnmatch_variation.phpt index e65bdd055..13afebb6f 100644 --- a/ext/standard/tests/file/fnmatch_variation.phpt +++ b/ext/standard/tests/file/fnmatch_variation.phpt @@ -259,21 +259,21 @@ bool(true) --- With Strings --- -- Iteration 0 -- bool(true) -bool(true) +bool(false) bool(true) bool(false) bool(false) bool(true) -- Iteration 1 -- -bool(true) -bool(true) -bool(true) bool(false) bool(false) -bool(true) +bool(false) +bool(false) +bool(false) +bool(false) -- Iteration 2 -- bool(true) -bool(true) +bool(false) bool(true) bool(false) bool(false) @@ -282,7 +282,7 @@ bool(true) bool(false) bool(false) bool(false) -bool(true) +bool(false) bool(false) bool(false) -- Iteration 4 -- @@ -294,7 +294,7 @@ bool(true) bool(false) -- Iteration 5 -- bool(true) -bool(true) +bool(false) bool(true) bool(false) bool(false) @@ -397,28 +397,28 @@ bool(true) bool(true) bool(true) bool(true) -bool(true) +bool(false) bool(false) bool(false) -- Iteration 1 -- bool(true) bool(true) bool(true) -bool(true) +bool(false) bool(false) bool(false) -- Iteration 2 -- bool(true) bool(true) bool(true) -bool(true) +bool(false) bool(false) bool(false) -- Iteration 3 -- -bool(true) -bool(true) -bool(true) -bool(true) +bool(false) +bool(false) +bool(false) +bool(false) bool(false) bool(false) -- Iteration 4 -- diff --git a/ext/standard/tests/file/glob_variation.phpt b/ext/standard/tests/file/glob_variation.phpt index 52c0dc8e4..64d3d8a2d 100755 --- a/ext/standard/tests/file/glob_variation.phpt +++ b/ext/standard/tests/file/glob_variation.phpt @@ -325,20 +325,12 @@ array(0) { } -- Iteration 8 -- -array(0) { -} -array(0) { -} -array(0) { -} -array(1) { - [0]=> - string(%d) "%s/glob_variation/WONDER5" -} -array(0) { -} -array(0) { -} +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) -- Iteration 9 -- array(0) { @@ -441,8 +433,7 @@ array(1) { array(0) { } -- Iteration 8 -- -array(0) { -} +bool(false) -- Iteration 9 -- array(0) { } diff --git a/ext/standard/tests/file/is_dir_variation4.phpt b/ext/standard/tests/file/is_dir_variation4.phpt index a68fe0b00..b83d185b6 100644 --- a/ext/standard/tests/file/is_dir_variation4.phpt +++ b/ext/standard/tests/file/is_dir_variation4.phpt @@ -77,9 +77,9 @@ bool(true) bool(false) -- Iteration 9 -- -bool(true) +bool(false) -- Iteration 10 -- -bool(true) +bool(false) *** Done *** diff --git a/ext/standard/tests/file/is_executable_variation1.phpt b/ext/standard/tests/file/is_executable_variation1.phpt index 9969911ee..bc826b949 100644 --- a/ext/standard/tests/file/is_executable_variation1.phpt +++ b/ext/standard/tests/file/is_executable_variation1.phpt @@ -76,9 +76,9 @@ bool(false) -- Iteration 5 -- bool(false) -- Iteration 6 -- -bool(true) +bool(false) -- Iteration 7 -- -bool(true) +bool(false) -- Iteration 8 -- bool(false) -- Iteration 9 -- diff --git a/ext/standard/tests/file/is_file_variation4.phpt b/ext/standard/tests/file/is_file_variation4.phpt index 55aeedfaa..fbdf43894 100644 --- a/ext/standard/tests/file/is_file_variation4.phpt +++ b/ext/standard/tests/file/is_file_variation4.phpt @@ -67,8 +67,8 @@ bool(false) - Iteration 6 - bool(false) - Iteration 7 - -bool(true) +bool(false) - Iteration 8 - -bool(true) +bool(false) *** Done *** diff --git a/ext/standard/tests/file/is_readable_variation1.phpt b/ext/standard/tests/file/is_readable_variation1.phpt index a1310327b..74935743c 100644 --- a/ext/standard/tests/file/is_readable_variation1.phpt +++ b/ext/standard/tests/file/is_readable_variation1.phpt @@ -87,11 +87,11 @@ bool(false) -- Iteration 6 -- bool(false) -- Iteration 7 -- -bool(true) +bool(false) -- Iteration 8 -- -bool(true) +bool(false) -- Iteration 9 -- -bool(true) +bool(false) -- Iteration 10 -- bool(true) -- Iteration 11 -- diff --git a/ext/standard/tests/file/is_writable_variation1.phpt b/ext/standard/tests/file/is_writable_variation1.phpt index bf3e7e117..1f3cbf599 100644 --- a/ext/standard/tests/file/is_writable_variation1.phpt +++ b/ext/standard/tests/file/is_writable_variation1.phpt @@ -96,14 +96,14 @@ bool(false) bool(false) bool(false) -- Iteration 7 -- -bool(true) -bool(true) +bool(false) +bool(false) -- Iteration 8 -- -bool(true) -bool(true) +bool(false) +bool(false) -- Iteration 9 -- -bool(true) -bool(true) +bool(false) +bool(false) -- Iteration 10 -- bool(true) bool(true) diff --git a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt index e7c41c4a9..101e89041 100644 --- a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt +++ b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt @@ -64,8 +64,8 @@ Warning: rmdir(%s/mkdir_variation2/): %s on line %d bool(false) *** Testing mkdir() and rmdir() for binary safe functionality *** -bool(true) -bool(true) +bool(false) +bool(false) *** Testing mkdir() with miscelleneous input *** bool(true) diff --git a/ext/standard/tests/file/readfile_variation10-win32.phpt b/ext/standard/tests/file/readfile_variation10-win32.phpt index 6453b9808..162419489 100644 --- a/ext/standard/tests/file/readfile_variation10-win32.phpt +++ b/ext/standard/tests/file/readfile_variation10-win32.phpt @@ -37,7 +37,7 @@ $names_arr = array( foreach($names_arr as $key => $value) { echo "\n-- Filename: $key --\n"; - readfile($value); + var_dump(readfile($value)); }; ?> @@ -48,40 +48,48 @@ foreach($names_arr as $key => $value) { -- Filename: -1 -- Warning: readfile(-1): failed to open stream: No such file or directory in %s on line %d +bool(false) -- Filename: TRUE -- Warning: readfile(1): failed to open stream: No such file or directory in %s on line %d +bool(false) -- Filename: FALSE -- Warning: readfile(): Filename cannot be empty in %s on line %d +bool(false) -- Filename: NULL -- Warning: readfile(): Filename cannot be empty in %s on line %d +bool(false) -- Filename: "" -- Warning: readfile(): Filename cannot be empty in %s on line %d +bool(false) -- Filename: " " -- Warning: readfile( ): failed to open stream: Permission denied in %s on line %d +bool(false) -- Filename: \0 -- - -Warning: readfile(): Filename cannot be empty in %s on line %d +bool(false) -- Filename: array() -- Warning: readfile() expects parameter 1 to be string, array given in %s on line %d +bool(false) -- Filename: /no/such/file/dir -- Warning: readfile(/no/such/file/dir): failed to open stream: No such file or directory in %s on line %d +bool(false) -- Filename: php/php -- Warning: readfile(php/php): failed to open stream: No such file or directory in %s on line %d +bool(false) ===Done===
\ No newline at end of file diff --git a/ext/standard/tests/file/readfile_variation10.phpt b/ext/standard/tests/file/readfile_variation10.phpt Binary files differindex a48150aee..2caa2de1d 100644 --- a/ext/standard/tests/file/readfile_variation10.phpt +++ b/ext/standard/tests/file/readfile_variation10.phpt diff --git a/ext/standard/tests/file/rename_variation13-win32.phpt b/ext/standard/tests/file/rename_variation13-win32.phpt Binary files differindex a86025889..2cd9dbdd9 100644 --- a/ext/standard/tests/file/rename_variation13-win32.phpt +++ b/ext/standard/tests/file/rename_variation13-win32.phpt diff --git a/ext/standard/tests/file/rename_variation13.phpt b/ext/standard/tests/file/rename_variation13.phpt index 24697d510..2c35198a1 100644 --- a/ext/standard/tests/file/rename_variation13.phpt +++ b/ext/standard/tests/file/rename_variation13.phpt @@ -98,11 +98,7 @@ bool(true) Warning: rename( ,%s/renameVar13/afile.tmp): No such file or directory in %s on line %d bool(false) -- testing '%s' -- - -Warning: rename(%s/renameVar13/afile.tmp,): %s in %s on line %d bool(false) - -Warning: rename(,%s/renameVar13/afile.tmp): %s in %s on line %d bool(false) -- testing 'Array' -- diff --git a/ext/standard/tests/file/stream_rfc2397_006.phpt b/ext/standard/tests/file/stream_rfc2397_006.phpt index dab6cd561..b1b3111cf 100755 --- a/ext/standard/tests/file/stream_rfc2397_006.phpt +++ b/ext/standard/tests/file/stream_rfc2397_006.phpt @@ -21,8 +21,8 @@ foreach($streams as $stream) ===DONE=== <?php exit(0); ?> --EXPECTF-- -string(0) "" -string(6) "foobar" +bool(false) +bool(false) string(13) "foobar foobar" Warning: file_get_contents(data:;base64,#Zm9vYmFyIGZvb2Jhc=): failed to open stream: rfc2397: unable to decode in %sstream_rfc2397_006.php on line %d diff --git a/ext/standard/tests/file/tempnam_variation3-win32.phpt b/ext/standard/tests/file/tempnam_variation3-win32.phpt index fb457cb6a..a51a10ab2 100644 --- a/ext/standard/tests/file/tempnam_variation3-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation3-win32.phpt @@ -31,8 +31,8 @@ $names_arr = array( NULL, "", " ", - "\0", /* Invalid args */ + "\0", array(), /* Valid args*/ @@ -102,7 +102,8 @@ OK Failed, not created in the correct directory %s vs %s 0 -- Iteration 6 -- -OK +Failed, not created in the correct directory %s vs %s +0 -- Iteration 7 -- Warning: tempnam() expects parameter 2 to be string, array given in %s\ext\standard\tests\file\tempnam_variation3-win32.php on line %d diff --git a/ext/standard/tests/file/tempnam_variation3.phpt b/ext/standard/tests/file/tempnam_variation3.phpt index 69ab16c89..4a0e86173 100644 --- a/ext/standard/tests/file/tempnam_variation3.phpt +++ b/ext/standard/tests/file/tempnam_variation3.phpt @@ -100,9 +100,9 @@ File name is => %s/%s File permissions are => 100600 File created in => directory specified -- Iteration 6 -- -File name is => %s/%s -File permissions are => 100600 -File created in => directory specified +-- File is not created -- + +Warning: unlink(): %s in %s on line %d -- Iteration 7 -- Warning: tempnam() expects parameter 2 to be string, array given in %s on line %d diff --git a/ext/standard/tests/file/tempnam_variation7-win32.phpt b/ext/standard/tests/file/tempnam_variation7-win32.phpt index 34e352a49..8ea839e2a 100644 --- a/ext/standard/tests/file/tempnam_variation7-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation7-win32.phpt @@ -89,9 +89,9 @@ File name is => %s%et%s File permissions are => 100666 File created in => temp dir -- Iteration 6 -- -File name is => %s%et%s -File permissions are => 100666 -File created in => temp dir +-- File is not created -- + +Warning: unlink(): %s in %s on line %d -- Iteration 7 -- Warning: tempnam() expects parameter 1 to be string, array given in %s on line %d diff --git a/ext/standard/tests/file/tempnam_variation7.phpt b/ext/standard/tests/file/tempnam_variation7.phpt index 18d074d28..16f94f0a1 100644 --- a/ext/standard/tests/file/tempnam_variation7.phpt +++ b/ext/standard/tests/file/tempnam_variation7.phpt @@ -94,9 +94,9 @@ File name is => %s%etempnam_variation3.tmp%s File permissions are => 100600 File created in => temp dir -- Iteration 6 -- -File name is => %s%etempnam_variation3.tmp%s -File permissions are => 100600 -File created in => temp dir +-- File is not created -- + +Warning: unlink(): %s in %s on line %d -- Iteration 7 -- Warning: tempnam() expects parameter 1 to be string, array given in %s on line %d diff --git a/ext/standard/tests/general_functions/bug44394_2.phpt b/ext/standard/tests/general_functions/bug44394_2.phpt index 161483e87..3ca53974e 100644 --- a/ext/standard/tests/general_functions/bug44394_2.phpt +++ b/ext/standard/tests/general_functions/bug44394_2.phpt @@ -4,6 +4,7 @@ Bug #44394 (Last two bytes missing from output) with session.use_trans_id <?php if (!extension_loaded("session")) print "skip"; ?> --INI-- session.name=PHPSESSID +session.use_only_cookies=0 --FILE-- <?php diff --git a/ext/standard/tests/general_functions/bug46587.phpt b/ext/standard/tests/general_functions/bug46587.phpt new file mode 100644 index 000000000..becbde964 --- /dev/null +++ b/ext/standard/tests/general_functions/bug46587.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #46587 (mt_rand() does not check that max is greater than min). +--FILE-- +<?php + +var_dump(mt_rand(3,8)); +var_dump(mt_rand(8,3)); + +echo "Done.\n"; +?> +--EXPECTF-- +int(%d) + +Warning: mt_rand(): max(3) is smaller than min(8) in %s on line %d +bool(false) +Done. diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation8.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation8.phpt index 31bcb80fc..f679a41eb 100644 --- a/ext/standard/tests/general_functions/get_cfg_var_variation8.phpt +++ b/ext/standard/tests/general_functions/get_cfg_var_variation8.phpt @@ -1,20 +1,20 @@ ---TEST-- -Test function get_cfg_var() by calling deprecated option ---CREDITS-- -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---INI-- -register_globals=1 ---SKIPIF-- -<?php if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or greater"); ?> ---FILE-- -<?php -echo "*** Test by calling method or function with deprecated option ***\n"; -var_dump(get_cfg_var( 'register_globals' ) ); - -?> ---EXPECTF-- -Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in %s on line 0 -*** Test by calling method or function with deprecated option *** -string(1) "1" - +--TEST--
+Test function get_cfg_var() by calling deprecated option
+--CREDITS--
+Francesco Fullone ff@ideato.it
+#PHPTestFest Cesena Italia on 2009-06-20
+--INI--
+register_globals=1
+--SKIPIF--
+<?php if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or greater"); ?>
+--FILE--
+<?php
+echo "*** Test by calling method or function with deprecated option ***\n";
+var_dump(get_cfg_var( 'register_globals' ) );
+
+?>
+--EXPECTF--
+Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in %s on line 0
+*** Test by calling method or function with deprecated option ***
+string(1) "1"
+
diff --git a/ext/standard/tests/general_functions/putenv_error1.phpt b/ext/standard/tests/general_functions/putenv_error1.phpt index c4b49f3f8..0fd0640bf 100644 --- a/ext/standard/tests/general_functions/putenv_error1.phpt +++ b/ext/standard/tests/general_functions/putenv_error1.phpt @@ -16,7 +16,7 @@ print ($set ? 'it worked' : 'boo') . "\n"; ?> ==DONE== --EXPECTF-- -Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 +Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 Warning: putenv(): Safe Mode warning: Cannot set environment variable 'FOO' - it's not in the allowed list in %s on line %d diff --git a/ext/standard/tests/general_functions/putenv_error2.phpt b/ext/standard/tests/general_functions/putenv_error2.phpt index 456a7ab69..b8f306c79 100644 --- a/ext/standard/tests/general_functions/putenv_error2.phpt +++ b/ext/standard/tests/general_functions/putenv_error2.phpt @@ -12,7 +12,7 @@ putenv('BAZ=bop'); ?> ==DONE== --EXPECTF-- -Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 +Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 Warning: putenv(): Safe Mode warning: Cannot override protected environment variable 'FOO' in %s on line %d diff --git a/ext/standard/tests/http/bug53198.phpt b/ext/standard/tests/http/bug53198.phpt new file mode 100644 index 000000000..fe26bc952 --- /dev/null +++ b/ext/standard/tests/http/bug53198.phpt @@ -0,0 +1,56 @@ +--TEST--
+Bug #53198 (From: header cannot be changed with ini_set)
+--SKIPIF--
+<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
+--INI--
+from=teste@teste.pt
+--FILE--
+<?php
+require 'server.inc';
+
+function do_test() {
+
+ $responses = array(
+ "data://text/plain,HTTP/1.0 200 OK\r\n\r\n",
+ );
+
+ $pid = http_server("tcp://127.0.0.1:12342", $responses, $output);
+
+ foreach($responses as $r) {
+
+ $fd = fopen('http://127.0.0.1:12342/', 'rb', false);
+
+ fseek($output, 0, SEEK_SET);
+ var_dump(stream_get_contents($output));
+ fseek($output, 0, SEEK_SET);
+ }
+
+ http_server_kill($pid);
+
+}
+
+echo "-- Test: leave default --\n";
+
+do_test();
+
+echo "-- Test: after ini_set --\n";
+
+ini_set('from', 'junk@junk.com');
+
+do_test();
+
+?>
+--EXPECT--
+-- Test: leave default --
+string(63) "GET / HTTP/1.0
+From: teste@teste.pt
+Host: 127.0.0.1:12342
+
+"
+-- Test: after ini_set --
+string(62) "GET / HTTP/1.0
+From: junk@junk.com
+Host: 127.0.0.1:12342
+
+"
+
diff --git a/ext/standard/tests/math/log_variation2.phpt b/ext/standard/tests/math/log_variation2.phpt index 00b3b316d..327e7c5b9 100644 --- a/ext/standard/tests/math/log_variation2.phpt +++ b/ext/standard/tests/math/log_variation2.phpt @@ -94,7 +94,7 @@ Warning: log(): base must be greater than 0 in %s on line %d bool(false) -- Iteration 2 -- -float(INF) +float(NAN) -- Iteration 3 -- float(0.12145441273706) @@ -135,7 +135,7 @@ Warning: log(): base must be greater than 0 in %s on line %d bool(false) -- Iteration 13 -- -float(INF) +float(NAN) -- Iteration 14 -- @@ -143,7 +143,7 @@ Warning: log(): base must be greater than 0 in %s on line %d bool(false) -- Iteration 15 -- -float(INF) +float(NAN) -- Iteration 16 -- diff --git a/ext/standard/tests/misc/syslog_vars_variation1.phpt b/ext/standard/tests/misc/syslog_vars_variation1.phpt index ae53a57bc..0237830df 100644 --- a/ext/standard/tests/misc/syslog_vars_variation1.phpt +++ b/ext/standard/tests/misc/syslog_vars_variation1.phpt @@ -7,5 +7,5 @@ define_syslog_variables=On var_dump(isset($LOG_ERR)); ?> --EXPECTF-- -Warning: Directive 'define_syslog_variables' is deprecated in PHP 5.3 and greater in Unknown on line 0 +Deprecated: Directive 'define_syslog_variables' is deprecated in PHP 5.3 and greater in Unknown on line 0 bool(true) diff --git a/ext/standard/tests/streams/bug46024.phpt b/ext/standard/tests/streams/bug46024.phpt index 34407cdc8..3f2a5f836 100644 --- a/ext/standard/tests/streams/bug46024.phpt +++ b/ext/standard/tests/streams/bug46024.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #46024 stream_select() doesn't return the correct number --SKIPIF-- -<?php if (!getenv('TEST_PHP_EXECUTABLE')) die("TEST_PHP_EXECUTABLE not defined"); ?> +<?php if (!getenv('TEST_PHP_EXECUTABLE')) die("skip TEST_PHP_EXECUTABLE not defined"); ?> --FILE-- <?php $php = getenv('TEST_PHP_EXECUTABLE'); diff --git a/ext/standard/tests/strings/bug47168.phpt b/ext/standard/tests/strings/bug47168.phpt new file mode 100644 index 000000000..4cca36256 --- /dev/null +++ b/ext/standard/tests/strings/bug47168.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #47168 (printf of floating point variable prints maximum of 40 decimal places) +--FILE-- +<?php + +$dyadic = 0.00000000000045474735088646411895751953125; +var_dump(printf ("%1.41f\n",unserialize(serialize($dyadic)))); + +?> +--EXPECT-- +0.00000000000045474735088646411895751953125 +int(44) diff --git a/ext/standard/tests/strings/bug49785.phpt b/ext/standard/tests/strings/bug49785.phpt index fa42dacd6..3c38afd8f 100644 --- a/ext/standard/tests/strings/bug49785.phpt +++ b/ext/standard/tests/strings/bug49785.phpt @@ -156,7 +156,7 @@ string(0) "" string(0) "" string(0) "" string(8) "f0908080" -string(8) "f7bfbfbf" +string(0) "" string(0) "" string(0) "" string(0) "" diff --git a/ext/standard/tests/strings/bug53021.phpt b/ext/standard/tests/strings/bug53021.phpt new file mode 100644 index 000000000..4a8fbe4f7 --- /dev/null +++ b/ext/standard/tests/strings/bug53021.phpt @@ -0,0 +1,34 @@ +--TEST--
+Bug #53021 (Failure to convert numeric entities with ENT_NOQUOTES and ISO-8859-1)
+--FILE--
+<?php
+var_dump(unpack("H*",html_entity_decode("é", ENT_QUOTES, "ISO-8859-1")));
+echo "double quotes variations:", "\n";
+echo html_entity_decode(""", ENT_NOQUOTES, 'UTF-8'), "\n";
+echo html_entity_decode(""", ENT_NOQUOTES, 'UTF-8'), "\n";
+echo html_entity_decode(""", ENT_QUOTES, 'UTF-8'), "\n";
+echo html_entity_decode(""", ENT_QUOTES, 'UTF-8'), "\n";
+echo html_entity_decode(""", ENT_COMPAT, 'UTF-8'), "\n";
+echo html_entity_decode(""", ENT_COMPAT, 'UTF-8'), "\n";
+
+echo "\nsingle quotes variations:", "\n";
+echo html_entity_decode("'", ENT_NOQUOTES, 'UTF-8'), "\n";
+echo html_entity_decode("'", ENT_QUOTES, 'UTF-8'), "\n";
+echo html_entity_decode("'", ENT_COMPAT, 'UTF-8'), "\n";
+--EXPECT--
+array(1) {
+ [1]=>
+ string(2) "e9"
+}
+double quotes variations:
+"
+"
+"
+"
+"
+"
+
+single quotes variations:
+'
+'
+'
diff --git a/ext/standard/tests/strings/bug53319.phpt b/ext/standard/tests/strings/bug53319.phpt new file mode 100644 index 000000000..0bcc06d5e --- /dev/null +++ b/ext/standard/tests/strings/bug53319.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #53319 (Strip_tags() may strip '<br />' incorrectly) +--FILE-- +<?php + +$str = '<br /><br />USD<input type="text"/><br/>CDN<br><input type="text" />'; +var_dump(strip_tags($str, '<input>')); +var_dump(strip_tags($str, '<br><input>') === $str); +var_dump(strip_tags($str)); +var_dump(strip_tags('<a/b>', '<a>')); + +?> +--EXPECTF-- +string(47) "USD<input type="text"/>CDN<input type="text" />" +bool(true) +string(6) "USDCDN" +string(0) "" diff --git a/ext/standard/tests/strings/get_html_translation_table_basic1.phpt b/ext/standard/tests/strings/get_html_translation_table_basic1.phpt index a3dd50712..0adafa338 100644 --- a/ext/standard/tests/strings/get_html_translation_table_basic1.phpt +++ b/ext/standard/tests/strings/get_html_translation_table_basic1.phpt @@ -1,269 +1,545 @@ --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( !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]] ) +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style [, string charset_hint]]] ) * 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) ); +var_dump( get_html_translation_table($table, ENT_COMPAT, "UTF-8") ); echo "-- with table = HTML_SPECIALCHARS --\n"; $table = HTML_SPECIALCHARS; -var_dump( get_html_translation_table($table) ); +var_dump( get_html_translation_table($table, ENT_COMPAT, "UTF-8") ); echo "Done\n"; ?> --EXPECTF-- *** Testing get_html_translation_table() : basic functionality *** --- with default arguments -- -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -- with table = HTML_ENTITIES -- -array(100) { - [""]=> +array(252) { + [" "]=> string(6) " " - [""]=> + ["¡"]=> string(7) "¡" - [""]=> + ["¢"]=> string(6) "¢" - [""]=> + ["£"]=> string(7) "£" - [""]=> + ["¤"]=> string(8) "¤" - [""]=> + ["¥"]=> string(5) "¥" - [""]=> + ["¦"]=> string(8) "¦" - [""]=> + ["§"]=> string(6) "§" - [""]=> + ["¨"]=> string(5) "¨" - [""]=> + ["©"]=> string(6) "©" - [""]=> + ["ª"]=> string(6) "ª" - [""]=> + ["«"]=> string(7) "«" - [""]=> + ["¬"]=> string(5) "¬" - [""]=> + [""]=> string(5) "­" - [""]=> + ["®"]=> string(5) "®" - [""]=> + ["¯"]=> string(6) "¯" - [""]=> + ["°"]=> string(5) "°" - [""]=> + ["±"]=> string(8) "±" - [""]=> + ["²"]=> string(6) "²" - [""]=> + ["³"]=> string(6) "³" - [""]=> + ["´"]=> string(7) "´" - [""]=> + ["µ"]=> string(7) "µ" - [""]=> + ["¶"]=> string(6) "¶" - [""]=> + ["·"]=> string(8) "·" - [""]=> + ["¸"]=> string(7) "¸" - [""]=> + ["¹"]=> string(6) "¹" - [""]=> + ["º"]=> string(6) "º" - [""]=> + ["»"]=> string(7) "»" - [""]=> + ["¼"]=> string(8) "¼" - [""]=> + ["½"]=> string(8) "½" - [""]=> + ["¾"]=> string(8) "¾" - [""]=> + ["¿"]=> string(8) "¿" - [""]=> + ["À"]=> string(8) "À" - [""]=> + ["Á"]=> string(8) "Á" - [""]=> + ["Â"]=> string(7) "Â" - [""]=> + ["Ã"]=> string(8) "Ã" - [""]=> + ["Ä"]=> string(6) "Ä" - [""]=> + ["Å"]=> string(7) "Å" - [""]=> + ["Æ"]=> string(7) "Æ" - [""]=> + ["Ç"]=> string(8) "Ç" - [""]=> + ["È"]=> string(8) "È" - [""]=> + ["É"]=> string(8) "É" - [""]=> + ["Ê"]=> string(7) "Ê" - [""]=> + ["Ë"]=> string(6) "Ë" - [""]=> + ["Ì"]=> string(8) "Ì" - [""]=> + ["Í"]=> string(8) "Í" - [""]=> + ["Î"]=> string(7) "Î" - [""]=> + ["Ï"]=> string(6) "Ï" - [""]=> + ["Ð"]=> string(5) "Ð" - [""]=> + ["Ñ"]=> string(8) "Ñ" - [""]=> + ["Ò"]=> string(8) "Ò" - [""]=> + ["Ó"]=> string(8) "Ó" - [""]=> + ["Ô"]=> string(7) "Ô" - [""]=> + ["Õ"]=> string(8) "Õ" - [""]=> + ["Ö"]=> string(6) "Ö" - [""]=> + ["×"]=> string(7) "×" - [""]=> + ["Ø"]=> string(8) "Ø" - [""]=> + ["Ù"]=> string(8) "Ù" - [""]=> + ["Ú"]=> string(8) "Ú" - [""]=> + ["Û"]=> string(7) "Û" - [""]=> + ["Ü"]=> string(6) "Ü" - [""]=> + ["Ý"]=> string(8) "Ý" - [""]=> + ["Þ"]=> string(7) "Þ" - [""]=> + ["ß"]=> string(7) "ß" - [""]=> + ["à"]=> string(8) "à" - [""]=> + ["á"]=> string(8) "á" - [""]=> + ["â"]=> string(7) "â" - [""]=> + ["ã"]=> string(8) "ã" - [""]=> + ["ä"]=> string(6) "ä" - [""]=> + ["å"]=> string(7) "å" - [""]=> + ["æ"]=> string(7) "æ" - [""]=> + ["ç"]=> string(8) "ç" - [""]=> + ["è"]=> string(8) "è" - [""]=> + ["é"]=> string(8) "é" - [""]=> + ["ê"]=> string(7) "ê" - [""]=> + ["ë"]=> string(6) "ë" - [""]=> + ["ì"]=> string(8) "ì" - [""]=> + ["í"]=> string(8) "í" - [""]=> + ["î"]=> string(7) "î" - [""]=> + ["ï"]=> string(6) "ï" - [""]=> + ["ð"]=> string(5) "ð" - [""]=> + ["ñ"]=> string(8) "ñ" - [""]=> + ["ò"]=> string(8) "ò" - [""]=> + ["ó"]=> string(8) "ó" - [""]=> + ["ô"]=> string(7) "ô" - [""]=> + ["õ"]=> string(8) "õ" - [""]=> + ["ö"]=> string(6) "ö" - [""]=> + ["÷"]=> string(8) "÷" - [""]=> + ["ø"]=> string(8) "ø" - [""]=> + ["ù"]=> string(8) "ù" - [""]=> + ["ú"]=> string(8) "ú" - [""]=> + ["û"]=> string(7) "û" - [""]=> + ["ü"]=> string(6) "ü" - [""]=> + ["ý"]=> string(8) "ý" - [""]=> + ["þ"]=> string(7) "þ" - [""]=> + ["ÿ"]=> string(6) "ÿ" + ["Œ"]=> + string(7) "Œ" + ["œ"]=> + string(7) "œ" + ["Š"]=> + string(8) "Š" + ["š"]=> + string(8) "š" + ["Ÿ"]=> + string(6) "Ÿ" + ["ƒ"]=> + string(6) "ƒ" + ["ˆ"]=> + string(6) "ˆ" + ["˜"]=> + string(7) "˜" + ["Α"]=> + string(7) "Α" + ["Β"]=> + string(6) "Β" + ["Γ"]=> + string(7) "Γ" + ["Δ"]=> + string(7) "Δ" + ["Ε"]=> + string(9) "Ε" + ["Ζ"]=> + string(6) "Ζ" + ["Η"]=> + string(5) "Η" + ["Θ"]=> + string(7) "Θ" + ["Ι"]=> + string(6) "Ι" + ["Κ"]=> + string(7) "Κ" + ["Λ"]=> + string(8) "Λ" + ["Μ"]=> + string(4) "Μ" + ["Ν"]=> + string(4) "Ν" + ["Ξ"]=> + string(4) "Ξ" + ["Ο"]=> + string(9) "Ο" + ["Π"]=> + string(4) "Π" + ["Ρ"]=> + string(5) "Ρ" + ["Σ"]=> + string(7) "Σ" + ["Τ"]=> + string(5) "Τ" + ["Υ"]=> + string(9) "Υ" + ["Φ"]=> + string(5) "Φ" + ["Χ"]=> + string(5) "Χ" + ["Ψ"]=> + string(5) "Ψ" + ["Ω"]=> + string(7) "Ω" + ["α"]=> + string(7) "α" + ["β"]=> + string(6) "β" + ["γ"]=> + string(7) "γ" + ["δ"]=> + string(7) "δ" + ["ε"]=> + string(9) "ε" + ["ζ"]=> + string(6) "ζ" + ["η"]=> + string(5) "η" + ["θ"]=> + string(7) "θ" + ["ι"]=> + string(6) "ι" + ["κ"]=> + string(7) "κ" + ["λ"]=> + string(8) "λ" + ["μ"]=> + string(4) "μ" + ["ν"]=> + string(4) "ν" + ["ξ"]=> + string(4) "ξ" + ["ο"]=> + string(9) "ο" + ["π"]=> + string(4) "π" + ["ρ"]=> + string(5) "ρ" + ["ς"]=> + string(8) "ς" + ["σ"]=> + string(7) "σ" + ["τ"]=> + string(5) "τ" + ["υ"]=> + string(9) "υ" + ["φ"]=> + string(5) "φ" + ["χ"]=> + string(5) "χ" + ["ψ"]=> + string(5) "ψ" + ["ω"]=> + string(7) "ω" + ["ϑ"]=> + string(10) "ϑ" + ["ϒ"]=> + string(7) "ϒ" + ["ϖ"]=> + string(5) "ϖ" + [" "]=> + string(6) " " + [" "]=> + string(6) " " + [" "]=> + string(8) " " + [""]=> + string(6) "‌" + [""]=> + string(5) "‍" + [""]=> + string(5) "‎" + [""]=> + string(5) "‏" + ["–"]=> + string(7) "–" + ["—"]=> + string(7) "—" + ["‘"]=> + string(7) "‘" + ["’"]=> + string(7) "’" + ["‚"]=> + string(7) "‚" + ["“"]=> + string(7) "“" + ["”"]=> + string(7) "”" + ["„"]=> + string(7) "„" + ["†"]=> + string(8) "†" + ["‡"]=> + string(8) "‡" + ["•"]=> + string(6) "•" + ["…"]=> + string(8) "…" + ["‰"]=> + string(8) "‰" + ["′"]=> + string(7) "′" + ["″"]=> + string(7) "″" + ["‹"]=> + string(8) "‹" + ["›"]=> + string(8) "›" + ["‾"]=> + string(7) "‾" + ["⁄"]=> + string(7) "⁄" + ["€"]=> + string(6) "€" + ["ℑ"]=> + string(7) "ℑ" + ["℘"]=> + string(8) "℘" + ["ℜ"]=> + string(6) "ℜ" + ["™"]=> + string(7) "™" + ["ℵ"]=> + string(9) "ℵ" + ["←"]=> + string(6) "←" + ["↑"]=> + string(6) "↑" + ["→"]=> + string(6) "→" + ["↓"]=> + string(6) "↓" + ["↔"]=> + string(6) "↔" + ["↵"]=> + string(7) "↵" + ["⇐"]=> + string(6) "⇐" + ["⇑"]=> + string(6) "⇑" + ["⇒"]=> + string(6) "⇒" + ["⇓"]=> + string(6) "⇓" + ["⇔"]=> + string(6) "⇔" + ["∀"]=> + string(8) "∀" + ["∂"]=> + string(6) "∂" + ["∃"]=> + string(7) "∃" + ["∅"]=> + string(7) "∅" + ["∇"]=> + string(7) "∇" + ["∈"]=> + string(6) "∈" + ["∉"]=> + string(7) "∉" + ["∋"]=> + string(4) "∋" + ["∏"]=> + string(6) "∏" + ["∑"]=> + string(5) "∑" + ["−"]=> + string(7) "−" + ["∗"]=> + string(8) "∗" + ["√"]=> + string(7) "√" + ["∝"]=> + string(6) "∝" + ["∞"]=> + string(7) "∞" + ["∠"]=> + string(5) "∠" + ["∧"]=> + string(5) "∧" + ["∨"]=> + string(4) "∨" + ["∩"]=> + string(5) "∩" + ["∪"]=> + string(5) "∪" + ["∫"]=> + string(5) "∫" + ["∴"]=> + string(8) "∴" + ["∼"]=> + string(5) "∼" + ["≅"]=> + string(6) "≅" + ["≈"]=> + string(7) "≈" + ["≠"]=> + string(4) "≠" + ["≡"]=> + string(7) "≡" + ["≤"]=> + string(4) "≤" + ["≥"]=> + string(4) "≥" + ["⊂"]=> + string(5) "⊂" + ["⊃"]=> + string(5) "⊃" + ["⊄"]=> + string(6) "⊄" + ["⊆"]=> + string(6) "⊆" + ["⊇"]=> + string(6) "⊇" + ["⊕"]=> + string(7) "⊕" + ["⊗"]=> + string(8) "⊗" + ["⊥"]=> + string(6) "⊥" + ["⋅"]=> + string(6) "⋅" + ["⌈"]=> + string(7) "⌈" + ["⌉"]=> + string(7) "⌉" + ["⌊"]=> + string(8) "⌊" + ["⌋"]=> + string(8) "⌋" + ["〈"]=> + string(6) "⟨" + ["〉"]=> + string(6) "⟩" + ["◊"]=> + string(5) "◊" + ["♠"]=> + string(8) "♠" + ["♣"]=> + string(7) "♣" + ["♥"]=> + string(8) "♥" + ["♦"]=> + string(7) "♦" + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- with table = HTML_SPECIALCHARS -- array(4) { + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } Done diff --git a/ext/standard/tests/strings/get_html_translation_table_basic2-win32.phpt b/ext/standard/tests/strings/get_html_translation_table_basic2-win32.phpt deleted file mode 100644 index 1b1a53a41..000000000 --- a/ext/standard/tests/strings/get_html_translation_table_basic2-win32.phpt +++ /dev/null @@ -1,673 +0,0 @@ ---TEST-- -Test get_html_translation_table() function : basic functionality - table as HTML_ENTITIES & diff quote_style ---SKIPIF-- -<?php -if( substr(PHP_OS, 0, 3) != "WIN"){ - die('skip only for Windows'); -} - -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 "-- with table = HTML_ENTITIES & quote_style = ENT_NOQUOTES --\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 default arguments -- -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- with table = HTML_ENTITIES & quote_style = ENT_COMPAT -- -array(100) { - [""]=> - string(6) " " - [""]=> - string(7) "¡" - [""]=> - string(6) "¢" - [""]=> - string(7) "£" - [""]=> - string(8) "¤" - [""]=> - string(5) "¥" - [""]=> - string(8) "¦" - [""]=> - string(6) "§" - [""]=> - string(5) "¨" - [""]=> - string(6) "©" - [""]=> - string(6) "ª" - [""]=> - string(7) "«" - [""]=> - string(5) "¬" - [""]=> - string(5) "­" - [""]=> - string(5) "®" - [""]=> - string(6) "¯" - [""]=> - string(5) "°" - [""]=> - string(8) "±" - [""]=> - string(6) "²" - [""]=> - string(6) "³" - [""]=> - string(7) "´" - [""]=> - string(7) "µ" - [""]=> - string(6) "¶" - [""]=> - string(8) "·" - [""]=> - string(7) "¸" - [""]=> - string(6) "¹" - [""]=> - string(6) "º" - [""]=> - string(7) "»" - [""]=> - string(8) "¼" - [""]=> - string(8) "½" - [""]=> - string(8) "¾" - [""]=> - string(8) "¿" - [""]=> - string(8) "À" - [""]=> - string(8) "Á" - [""]=> - string(7) "Â" - [""]=> - string(8) "Ã" - [""]=> - string(6) "Ä" - [""]=> - string(7) "Å" - [""]=> - string(7) "Æ" - [""]=> - string(8) "Ç" - [""]=> - string(8) "È" - [""]=> - string(8) "É" - [""]=> - string(7) "Ê" - [""]=> - string(6) "Ë" - [""]=> - string(8) "Ì" - [""]=> - string(8) "Í" - [""]=> - string(7) "Î" - [""]=> - string(6) "Ï" - [""]=> - string(5) "Ð" - [""]=> - string(8) "Ñ" - [""]=> - string(8) "Ò" - [""]=> - string(8) "Ó" - [""]=> - string(7) "Ô" - [""]=> - string(8) "Õ" - [""]=> - string(6) "Ö" - [""]=> - string(7) "×" - [""]=> - string(8) "Ø" - [""]=> - string(8) "Ù" - [""]=> - string(8) "Ú" - [""]=> - string(7) "Û" - [""]=> - string(6) "Ü" - [""]=> - string(8) "Ý" - [""]=> - string(7) "Þ" - [""]=> - string(7) "ß" - [""]=> - string(8) "à" - [""]=> - string(8) "á" - [""]=> - string(7) "â" - [""]=> - string(8) "ã" - [""]=> - string(6) "ä" - [""]=> - string(7) "å" - [""]=> - string(7) "æ" - [""]=> - string(8) "ç" - [""]=> - string(8) "è" - [""]=> - string(8) "é" - [""]=> - string(7) "ê" - [""]=> - string(6) "ë" - [""]=> - string(8) "ì" - [""]=> - string(8) "í" - [""]=> - string(7) "î" - [""]=> - string(6) "ï" - [""]=> - string(5) "ð" - [""]=> - string(8) "ñ" - [""]=> - string(8) "ò" - [""]=> - string(8) "ó" - [""]=> - string(7) "ô" - [""]=> - string(8) "õ" - [""]=> - string(6) "ö" - [""]=> - string(8) "÷" - [""]=> - string(8) "ø" - [""]=> - string(8) "ù" - [""]=> - string(8) "ú" - [""]=> - string(7) "û" - [""]=> - string(6) "ü" - [""]=> - string(8) "ý" - [""]=> - string(7) "þ" - [""]=> - string(6) "ÿ" - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- with table = HTML_ENTITIES & quote_style = ENT_QUOTES -- -array(101) { - [""]=> - string(6) " " - [""]=> - string(7) "¡" - [""]=> - string(6) "¢" - [""]=> - string(7) "£" - [""]=> - string(8) "¤" - [""]=> - string(5) "¥" - [""]=> - string(8) "¦" - [""]=> - string(6) "§" - [""]=> - string(5) "¨" - [""]=> - string(6) "©" - [""]=> - string(6) "ª" - [""]=> - string(7) "«" - [""]=> - string(5) "¬" - [""]=> - string(5) "­" - [""]=> - string(5) "®" - [""]=> - string(6) "¯" - [""]=> - string(5) "°" - [""]=> - string(8) "±" - [""]=> - string(6) "²" - [""]=> - string(6) "³" - [""]=> - string(7) "´" - [""]=> - string(7) "µ" - [""]=> - string(6) "¶" - [""]=> - string(8) "·" - [""]=> - string(7) "¸" - [""]=> - string(6) "¹" - [""]=> - string(6) "º" - [""]=> - string(7) "»" - [""]=> - string(8) "¼" - [""]=> - string(8) "½" - [""]=> - string(8) "¾" - [""]=> - string(8) "¿" - [""]=> - string(8) "À" - [""]=> - string(8) "Á" - [""]=> - string(7) "Â" - [""]=> - string(8) "Ã" - [""]=> - string(6) "Ä" - [""]=> - string(7) "Å" - [""]=> - string(7) "Æ" - [""]=> - string(8) "Ç" - [""]=> - string(8) "È" - [""]=> - string(8) "É" - [""]=> - string(7) "Ê" - [""]=> - string(6) "Ë" - [""]=> - string(8) "Ì" - [""]=> - string(8) "Í" - [""]=> - string(7) "Î" - [""]=> - string(6) "Ï" - [""]=> - string(5) "Ð" - [""]=> - string(8) "Ñ" - [""]=> - string(8) "Ò" - [""]=> - string(8) "Ó" - [""]=> - string(7) "Ô" - [""]=> - string(8) "Õ" - [""]=> - string(6) "Ö" - [""]=> - string(7) "×" - [""]=> - string(8) "Ø" - [""]=> - string(8) "Ù" - [""]=> - string(8) "Ú" - [""]=> - string(7) "Û" - [""]=> - string(6) "Ü" - [""]=> - string(8) "Ý" - [""]=> - string(7) "Þ" - [""]=> - string(7) "ß" - [""]=> - string(8) "à" - [""]=> - string(8) "á" - [""]=> - string(7) "â" - [""]=> - string(8) "ã" - [""]=> - string(6) "ä" - [""]=> - string(7) "å" - [""]=> - string(7) "æ" - [""]=> - string(8) "ç" - [""]=> - string(8) "è" - [""]=> - string(8) "é" - [""]=> - string(7) "ê" - [""]=> - string(6) "ë" - [""]=> - string(8) "ì" - [""]=> - string(8) "í" - [""]=> - string(7) "î" - [""]=> - string(6) "ï" - [""]=> - string(5) "ð" - [""]=> - string(8) "ñ" - [""]=> - string(8) "ò" - [""]=> - string(8) "ó" - [""]=> - string(7) "ô" - [""]=> - string(8) "õ" - [""]=> - string(6) "ö" - [""]=> - string(8) "÷" - [""]=> - string(8) "ø" - [""]=> - string(8) "ù" - [""]=> - string(8) "ú" - [""]=> - string(7) "û" - [""]=> - string(6) "ü" - [""]=> - string(8) "ý" - [""]=> - string(7) "þ" - [""]=> - string(6) "ÿ" - ["""]=> - string(6) """ - ["'"]=> - string(5) "'" - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- with table = HTML_ENTITIES & quote_style = ENT_NOQUOTES -- -array(99) { - [""]=> - string(6) " " - [""]=> - string(7) "¡" - [""]=> - string(6) "¢" - [""]=> - string(7) "£" - [""]=> - string(8) "¤" - [""]=> - string(5) "¥" - [""]=> - string(8) "¦" - [""]=> - string(6) "§" - [""]=> - string(5) "¨" - [""]=> - string(6) "©" - [""]=> - string(6) "ª" - [""]=> - string(7) "«" - [""]=> - string(5) "¬" - [""]=> - string(5) "­" - [""]=> - string(5) "®" - [""]=> - string(6) "¯" - [""]=> - string(5) "°" - [""]=> - string(8) "±" - [""]=> - string(6) "²" - [""]=> - string(6) "³" - [""]=> - string(7) "´" - [""]=> - string(7) "µ" - [""]=> - string(6) "¶" - [""]=> - string(8) "·" - [""]=> - string(7) "¸" - [""]=> - string(6) "¹" - [""]=> - string(6) "º" - [""]=> - string(7) "»" - [""]=> - string(8) "¼" - [""]=> - string(8) "½" - [""]=> - string(8) "¾" - [""]=> - string(8) "¿" - [""]=> - string(8) "À" - [""]=> - string(8) "Á" - [""]=> - string(7) "Â" - [""]=> - string(8) "Ã" - [""]=> - string(6) "Ä" - [""]=> - string(7) "Å" - [""]=> - string(7) "Æ" - [""]=> - string(8) "Ç" - [""]=> - string(8) "È" - [""]=> - string(8) "É" - [""]=> - string(7) "Ê" - [""]=> - string(6) "Ë" - [""]=> - string(8) "Ì" - [""]=> - string(8) "Í" - [""]=> - string(7) "Î" - [""]=> - string(6) "Ï" - [""]=> - string(5) "Ð" - [""]=> - string(8) "Ñ" - [""]=> - string(8) "Ò" - [""]=> - string(8) "Ó" - [""]=> - string(7) "Ô" - [""]=> - string(8) "Õ" - [""]=> - string(6) "Ö" - [""]=> - string(7) "×" - [""]=> - string(8) "Ø" - [""]=> - string(8) "Ù" - [""]=> - string(8) "Ú" - [""]=> - string(7) "Û" - [""]=> - string(6) "Ü" - [""]=> - string(8) "Ý" - [""]=> - string(7) "Þ" - [""]=> - string(7) "ß" - [""]=> - string(8) "à" - [""]=> - string(8) "á" - [""]=> - string(7) "â" - [""]=> - string(8) "ã" - [""]=> - string(6) "ä" - [""]=> - string(7) "å" - [""]=> - string(7) "æ" - [""]=> - string(8) "ç" - [""]=> - string(8) "è" - [""]=> - string(8) "é" - [""]=> - string(7) "ê" - [""]=> - string(6) "ë" - [""]=> - string(8) "ì" - [""]=> - string(8) "í" - [""]=> - string(7) "î" - [""]=> - string(6) "ï" - [""]=> - string(5) "ð" - [""]=> - string(8) "ñ" - [""]=> - string(8) "ò" - [""]=> - string(8) "ó" - [""]=> - string(7) "ô" - [""]=> - string(8) "õ" - [""]=> - string(6) "ö" - [""]=> - string(8) "÷" - [""]=> - string(8) "ø" - [""]=> - string(8) "ù" - [""]=> - string(8) "ú" - [""]=> - string(7) "û" - [""]=> - string(6) "ü" - [""]=> - string(8) "ý" - [""]=> - string(7) "þ" - [""]=> - string(6) "ÿ" - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -Done diff --git a/ext/standard/tests/strings/get_html_translation_table_basic2.phpt b/ext/standard/tests/strings/get_html_translation_table_basic2.phpt index 3e04638cc..8d27e15ed 100644 --- a/ext/standard/tests/strings/get_html_translation_table_basic2.phpt +++ b/ext/standard/tests/strings/get_html_translation_table_basic2.phpt @@ -1,18 +1,8 @@ --TEST-- Test get_html_translation_table() function : basic functionality - table as HTML_ENTITIES & diff quote_style ---SKIPIF-- -<?php -if( substr(PHP_OS, 0, 3) == "WIN"){ - die('skip Not for Windows'); -} - -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]] ) +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style [, string charset_hint]]] ) * Description: Returns the internal translation table used by htmlspecialchars and htmlentities * Source code: ext/standard/html.c */ @@ -25,648 +15,1545 @@ 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) ); +var_dump( get_html_translation_table($table, $quote_style, "UTF-8") ); echo "-- with table = HTML_ENTITIES & quote_style = ENT_QUOTES --\n"; $quote_style = ENT_QUOTES; -var_dump( get_html_translation_table($table, $quote_style) ); +var_dump( get_html_translation_table($table, $quote_style, "UTF-8") ); echo "-- with table = HTML_ENTITIES & quote_style = ENT_NOQUOTES --\n"; $quote_style = ENT_NOQUOTES; -var_dump( get_html_translation_table($table, $quote_style) ); +var_dump( get_html_translation_table($table, $quote_style, "UTF-8") ); echo "Done\n"; ?> --EXPECTF-- *** Testing get_html_translation_table() : basic functionality *** --- with default arguments -- -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -- with table = HTML_ENTITIES & quote_style = ENT_COMPAT -- -array(100) { - [""]=> +array(252) { + [" "]=> string(6) " " - [""]=> + ["¡"]=> string(7) "¡" - [""]=> + ["¢"]=> string(6) "¢" - [""]=> + ["£"]=> string(7) "£" - [""]=> + ["¤"]=> string(8) "¤" - [""]=> + ["¥"]=> string(5) "¥" - [""]=> + ["¦"]=> string(8) "¦" - [""]=> + ["§"]=> string(6) "§" - [""]=> + ["¨"]=> string(5) "¨" - [""]=> + ["©"]=> string(6) "©" - [""]=> + ["ª"]=> string(6) "ª" - [""]=> + ["«"]=> string(7) "«" - [""]=> + ["¬"]=> string(5) "¬" - [""]=> + [""]=> string(5) "­" - [""]=> + ["®"]=> string(5) "®" - [""]=> + ["¯"]=> string(6) "¯" - [""]=> + ["°"]=> string(5) "°" - [""]=> + ["±"]=> string(8) "±" - [""]=> + ["²"]=> string(6) "²" - [""]=> + ["³"]=> string(6) "³" - [""]=> + ["´"]=> string(7) "´" - [""]=> + ["µ"]=> string(7) "µ" - [""]=> + ["¶"]=> string(6) "¶" - [""]=> + ["·"]=> string(8) "·" - [""]=> + ["¸"]=> string(7) "¸" - [""]=> + ["¹"]=> string(6) "¹" - [""]=> + ["º"]=> string(6) "º" - [""]=> + ["»"]=> string(7) "»" - [""]=> + ["¼"]=> string(8) "¼" - [""]=> + ["½"]=> string(8) "½" - [""]=> + ["¾"]=> string(8) "¾" - [""]=> + ["¿"]=> string(8) "¿" - [""]=> + ["À"]=> string(8) "À" - [""]=> + ["Á"]=> string(8) "Á" - [""]=> + ["Â"]=> string(7) "Â" - [""]=> + ["Ã"]=> string(8) "Ã" - [""]=> + ["Ä"]=> string(6) "Ä" - [""]=> + ["Å"]=> string(7) "Å" - [""]=> + ["Æ"]=> string(7) "Æ" - [""]=> + ["Ç"]=> string(8) "Ç" - [""]=> + ["È"]=> string(8) "È" - [""]=> + ["É"]=> string(8) "É" - [""]=> + ["Ê"]=> string(7) "Ê" - [""]=> + ["Ë"]=> string(6) "Ë" - [""]=> + ["Ì"]=> string(8) "Ì" - [""]=> + ["Í"]=> string(8) "Í" - [""]=> + ["Î"]=> string(7) "Î" - [""]=> + ["Ï"]=> string(6) "Ï" - [""]=> + ["Ð"]=> string(5) "Ð" - [""]=> + ["Ñ"]=> string(8) "Ñ" - [""]=> + ["Ò"]=> string(8) "Ò" - [""]=> + ["Ó"]=> string(8) "Ó" - [""]=> + ["Ô"]=> string(7) "Ô" - [""]=> + ["Õ"]=> string(8) "Õ" - [""]=> + ["Ö"]=> string(6) "Ö" - [""]=> + ["×"]=> string(7) "×" - [""]=> + ["Ø"]=> string(8) "Ø" - [""]=> + ["Ù"]=> string(8) "Ù" - [""]=> + ["Ú"]=> string(8) "Ú" - [""]=> + ["Û"]=> string(7) "Û" - [""]=> + ["Ü"]=> string(6) "Ü" - [""]=> + ["Ý"]=> string(8) "Ý" - [""]=> + ["Þ"]=> string(7) "Þ" - [""]=> + ["ß"]=> string(7) "ß" - [""]=> + ["à"]=> string(8) "à" - [""]=> + ["á"]=> string(8) "á" - [""]=> + ["â"]=> string(7) "â" - [""]=> + ["ã"]=> string(8) "ã" - [""]=> + ["ä"]=> string(6) "ä" - [""]=> + ["å"]=> string(7) "å" - [""]=> + ["æ"]=> string(7) "æ" - [""]=> + ["ç"]=> string(8) "ç" - [""]=> + ["è"]=> string(8) "è" - [""]=> + ["é"]=> string(8) "é" - [""]=> + ["ê"]=> string(7) "ê" - [""]=> + ["ë"]=> string(6) "ë" - [""]=> + ["ì"]=> string(8) "ì" - [""]=> + ["í"]=> string(8) "í" - [""]=> + ["î"]=> string(7) "î" - [""]=> + ["ï"]=> string(6) "ï" - [""]=> + ["ð"]=> string(5) "ð" - [""]=> + ["ñ"]=> string(8) "ñ" - [""]=> + ["ò"]=> string(8) "ò" - [""]=> + ["ó"]=> string(8) "ó" - [""]=> + ["ô"]=> string(7) "ô" - [""]=> + ["õ"]=> string(8) "õ" - [""]=> + ["ö"]=> string(6) "ö" - [""]=> + ["÷"]=> string(8) "÷" - [""]=> + ["ø"]=> string(8) "ø" - [""]=> + ["ù"]=> string(8) "ù" - [""]=> + ["ú"]=> string(8) "ú" - [""]=> + ["û"]=> string(7) "û" - [""]=> + ["ü"]=> string(6) "ü" - [""]=> + ["ý"]=> string(8) "ý" - [""]=> + ["þ"]=> string(7) "þ" - [""]=> + ["ÿ"]=> string(6) "ÿ" + ["Œ"]=> + string(7) "Œ" + ["œ"]=> + string(7) "œ" + ["Š"]=> + string(8) "Š" + ["š"]=> + string(8) "š" + ["Ÿ"]=> + string(6) "Ÿ" + ["ƒ"]=> + string(6) "ƒ" + ["ˆ"]=> + string(6) "ˆ" + ["˜"]=> + string(7) "˜" + ["Α"]=> + string(7) "Α" + ["Β"]=> + string(6) "Β" + ["Γ"]=> + string(7) "Γ" + ["Δ"]=> + string(7) "Δ" + ["Ε"]=> + string(9) "Ε" + ["Ζ"]=> + string(6) "Ζ" + ["Η"]=> + string(5) "Η" + ["Θ"]=> + string(7) "Θ" + ["Ι"]=> + string(6) "Ι" + ["Κ"]=> + string(7) "Κ" + ["Λ"]=> + string(8) "Λ" + ["Μ"]=> + string(4) "Μ" + ["Ν"]=> + string(4) "Ν" + ["Ξ"]=> + string(4) "Ξ" + ["Ο"]=> + string(9) "Ο" + ["Π"]=> + string(4) "Π" + ["Ρ"]=> + string(5) "Ρ" + ["Σ"]=> + string(7) "Σ" + ["Τ"]=> + string(5) "Τ" + ["Υ"]=> + string(9) "Υ" + ["Φ"]=> + string(5) "Φ" + ["Χ"]=> + string(5) "Χ" + ["Ψ"]=> + string(5) "Ψ" + ["Ω"]=> + string(7) "Ω" + ["α"]=> + string(7) "α" + ["β"]=> + string(6) "β" + ["γ"]=> + string(7) "γ" + ["δ"]=> + string(7) "δ" + ["ε"]=> + string(9) "ε" + ["ζ"]=> + string(6) "ζ" + ["η"]=> + string(5) "η" + ["θ"]=> + string(7) "θ" + ["ι"]=> + string(6) "ι" + ["κ"]=> + string(7) "κ" + ["λ"]=> + string(8) "λ" + ["μ"]=> + string(4) "μ" + ["ν"]=> + string(4) "ν" + ["ξ"]=> + string(4) "ξ" + ["ο"]=> + string(9) "ο" + ["π"]=> + string(4) "π" + ["ρ"]=> + string(5) "ρ" + ["ς"]=> + string(8) "ς" + ["σ"]=> + string(7) "σ" + ["τ"]=> + string(5) "τ" + ["υ"]=> + string(9) "υ" + ["φ"]=> + string(5) "φ" + ["χ"]=> + string(5) "χ" + ["ψ"]=> + string(5) "ψ" + ["ω"]=> + string(7) "ω" + ["ϑ"]=> + string(10) "ϑ" + ["ϒ"]=> + string(7) "ϒ" + ["ϖ"]=> + string(5) "ϖ" + [" "]=> + string(6) " " + [" "]=> + string(6) " " + [" "]=> + string(8) " " + [""]=> + string(6) "‌" + [""]=> + string(5) "‍" + [""]=> + string(5) "‎" + [""]=> + string(5) "‏" + ["–"]=> + string(7) "–" + ["—"]=> + string(7) "—" + ["‘"]=> + string(7) "‘" + ["’"]=> + string(7) "’" + ["‚"]=> + string(7) "‚" + ["“"]=> + string(7) "“" + ["”"]=> + string(7) "”" + ["„"]=> + string(7) "„" + ["†"]=> + string(8) "†" + ["‡"]=> + string(8) "‡" + ["•"]=> + string(6) "•" + ["…"]=> + string(8) "…" + ["‰"]=> + string(8) "‰" + ["′"]=> + string(7) "′" + ["″"]=> + string(7) "″" + ["‹"]=> + string(8) "‹" + ["›"]=> + string(8) "›" + ["‾"]=> + string(7) "‾" + ["⁄"]=> + string(7) "⁄" + ["€"]=> + string(6) "€" + ["ℑ"]=> + string(7) "ℑ" + ["℘"]=> + string(8) "℘" + ["ℜ"]=> + string(6) "ℜ" + ["™"]=> + string(7) "™" + ["ℵ"]=> + string(9) "ℵ" + ["←"]=> + string(6) "←" + ["↑"]=> + string(6) "↑" + ["→"]=> + string(6) "→" + ["↓"]=> + string(6) "↓" + ["↔"]=> + string(6) "↔" + ["↵"]=> + string(7) "↵" + ["⇐"]=> + string(6) "⇐" + ["⇑"]=> + string(6) "⇑" + ["⇒"]=> + string(6) "⇒" + ["⇓"]=> + string(6) "⇓" + ["⇔"]=> + string(6) "⇔" + ["∀"]=> + string(8) "∀" + ["∂"]=> + string(6) "∂" + ["∃"]=> + string(7) "∃" + ["∅"]=> + string(7) "∅" + ["∇"]=> + string(7) "∇" + ["∈"]=> + string(6) "∈" + ["∉"]=> + string(7) "∉" + ["∋"]=> + string(4) "∋" + ["∏"]=> + string(6) "∏" + ["∑"]=> + string(5) "∑" + ["−"]=> + string(7) "−" + ["∗"]=> + string(8) "∗" + ["√"]=> + string(7) "√" + ["∝"]=> + string(6) "∝" + ["∞"]=> + string(7) "∞" + ["∠"]=> + string(5) "∠" + ["∧"]=> + string(5) "∧" + ["∨"]=> + string(4) "∨" + ["∩"]=> + string(5) "∩" + ["∪"]=> + string(5) "∪" + ["∫"]=> + string(5) "∫" + ["∴"]=> + string(8) "∴" + ["∼"]=> + string(5) "∼" + ["≅"]=> + string(6) "≅" + ["≈"]=> + string(7) "≈" + ["≠"]=> + string(4) "≠" + ["≡"]=> + string(7) "≡" + ["≤"]=> + string(4) "≤" + ["≥"]=> + string(4) "≥" + ["⊂"]=> + string(5) "⊂" + ["⊃"]=> + string(5) "⊃" + ["⊄"]=> + string(6) "⊄" + ["⊆"]=> + string(6) "⊆" + ["⊇"]=> + string(6) "⊇" + ["⊕"]=> + string(7) "⊕" + ["⊗"]=> + string(8) "⊗" + ["⊥"]=> + string(6) "⊥" + ["⋅"]=> + string(6) "⋅" + ["⌈"]=> + string(7) "⌈" + ["⌉"]=> + string(7) "⌉" + ["⌊"]=> + string(8) "⌊" + ["⌋"]=> + string(8) "⌋" + ["〈"]=> + string(6) "⟨" + ["〉"]=> + string(6) "⟩" + ["◊"]=> + string(5) "◊" + ["♠"]=> + string(8) "♠" + ["♣"]=> + string(7) "♣" + ["♥"]=> + string(8) "♥" + ["♦"]=> + string(7) "♦" + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- with table = HTML_ENTITIES & quote_style = ENT_QUOTES -- -array(101) { - [""]=> +array(253) { + [" "]=> string(6) " " - [""]=> + ["¡"]=> string(7) "¡" - [""]=> + ["¢"]=> string(6) "¢" - [""]=> + ["£"]=> string(7) "£" - [""]=> + ["¤"]=> string(8) "¤" - [""]=> + ["¥"]=> string(5) "¥" - [""]=> + ["¦"]=> string(8) "¦" - [""]=> + ["§"]=> string(6) "§" - [""]=> + ["¨"]=> string(5) "¨" - [""]=> + ["©"]=> string(6) "©" - [""]=> + ["ª"]=> string(6) "ª" - [""]=> + ["«"]=> string(7) "«" - [""]=> + ["¬"]=> string(5) "¬" - [""]=> + [""]=> string(5) "­" - [""]=> + ["®"]=> string(5) "®" - [""]=> + ["¯"]=> string(6) "¯" - [""]=> + ["°"]=> string(5) "°" - [""]=> + ["±"]=> string(8) "±" - [""]=> + ["²"]=> string(6) "²" - [""]=> + ["³"]=> string(6) "³" - [""]=> + ["´"]=> string(7) "´" - [""]=> + ["µ"]=> string(7) "µ" - [""]=> + ["¶"]=> string(6) "¶" - [""]=> + ["·"]=> string(8) "·" - [""]=> + ["¸"]=> string(7) "¸" - [""]=> + ["¹"]=> string(6) "¹" - [""]=> + ["º"]=> string(6) "º" - [""]=> + ["»"]=> string(7) "»" - [""]=> + ["¼"]=> string(8) "¼" - [""]=> + ["½"]=> string(8) "½" - [""]=> + ["¾"]=> string(8) "¾" - [""]=> + ["¿"]=> string(8) "¿" - [""]=> + ["À"]=> string(8) "À" - [""]=> + ["Á"]=> string(8) "Á" - [""]=> + ["Â"]=> string(7) "Â" - [""]=> + ["Ã"]=> string(8) "Ã" - [""]=> + ["Ä"]=> string(6) "Ä" - [""]=> + ["Å"]=> string(7) "Å" - [""]=> + ["Æ"]=> string(7) "Æ" - [""]=> + ["Ç"]=> string(8) "Ç" - [""]=> + ["È"]=> string(8) "È" - [""]=> + ["É"]=> string(8) "É" - [""]=> + ["Ê"]=> string(7) "Ê" - [""]=> + ["Ë"]=> string(6) "Ë" - [""]=> + ["Ì"]=> string(8) "Ì" - [""]=> + ["Í"]=> string(8) "Í" - [""]=> + ["Î"]=> string(7) "Î" - [""]=> + ["Ï"]=> string(6) "Ï" - [""]=> + ["Ð"]=> string(5) "Ð" - [""]=> + ["Ñ"]=> string(8) "Ñ" - [""]=> + ["Ò"]=> string(8) "Ò" - [""]=> + ["Ó"]=> string(8) "Ó" - [""]=> + ["Ô"]=> string(7) "Ô" - [""]=> + ["Õ"]=> string(8) "Õ" - [""]=> + ["Ö"]=> string(6) "Ö" - [""]=> + ["×"]=> string(7) "×" - [""]=> + ["Ø"]=> string(8) "Ø" - [""]=> + ["Ù"]=> string(8) "Ù" - [""]=> + ["Ú"]=> string(8) "Ú" - [""]=> + ["Û"]=> string(7) "Û" - [""]=> + ["Ü"]=> string(6) "Ü" - [""]=> + ["Ý"]=> string(8) "Ý" - [""]=> + ["Þ"]=> string(7) "Þ" - [""]=> + ["ß"]=> string(7) "ß" - [""]=> + ["à"]=> string(8) "à" - [""]=> + ["á"]=> string(8) "á" - [""]=> + ["â"]=> string(7) "â" - [""]=> + ["ã"]=> string(8) "ã" - [""]=> + ["ä"]=> string(6) "ä" - [""]=> + ["å"]=> string(7) "å" - [""]=> + ["æ"]=> string(7) "æ" - [""]=> + ["ç"]=> string(8) "ç" - [""]=> + ["è"]=> string(8) "è" - [""]=> + ["é"]=> string(8) "é" - [""]=> + ["ê"]=> string(7) "ê" - [""]=> + ["ë"]=> string(6) "ë" - [""]=> + ["ì"]=> string(8) "ì" - [""]=> + ["í"]=> string(8) "í" - [""]=> + ["î"]=> string(7) "î" - [""]=> + ["ï"]=> string(6) "ï" - [""]=> + ["ð"]=> string(5) "ð" - [""]=> + ["ñ"]=> string(8) "ñ" - [""]=> + ["ò"]=> string(8) "ò" - [""]=> + ["ó"]=> string(8) "ó" - [""]=> + ["ô"]=> string(7) "ô" - [""]=> + ["õ"]=> string(8) "õ" - [""]=> + ["ö"]=> string(6) "ö" - [""]=> + ["÷"]=> string(8) "÷" - [""]=> + ["ø"]=> string(8) "ø" - [""]=> + ["ù"]=> string(8) "ù" - [""]=> + ["ú"]=> string(8) "ú" - [""]=> + ["û"]=> string(7) "û" - [""]=> + ["ü"]=> string(6) "ü" - [""]=> + ["ý"]=> string(8) "ý" - [""]=> + ["þ"]=> string(7) "þ" - [""]=> + ["ÿ"]=> string(6) "ÿ" + ["Œ"]=> + string(7) "Œ" + ["œ"]=> + string(7) "œ" + ["Š"]=> + string(8) "Š" + ["š"]=> + string(8) "š" + ["Ÿ"]=> + string(6) "Ÿ" + ["ƒ"]=> + string(6) "ƒ" + ["ˆ"]=> + string(6) "ˆ" + ["˜"]=> + string(7) "˜" + ["Α"]=> + string(7) "Α" + ["Β"]=> + string(6) "Β" + ["Γ"]=> + string(7) "Γ" + ["Δ"]=> + string(7) "Δ" + ["Ε"]=> + string(9) "Ε" + ["Ζ"]=> + string(6) "Ζ" + ["Η"]=> + string(5) "Η" + ["Θ"]=> + string(7) "Θ" + ["Ι"]=> + string(6) "Ι" + ["Κ"]=> + string(7) "Κ" + ["Λ"]=> + string(8) "Λ" + ["Μ"]=> + string(4) "Μ" + ["Ν"]=> + string(4) "Ν" + ["Ξ"]=> + string(4) "Ξ" + ["Ο"]=> + string(9) "Ο" + ["Π"]=> + string(4) "Π" + ["Ρ"]=> + string(5) "Ρ" + ["Σ"]=> + string(7) "Σ" + ["Τ"]=> + string(5) "Τ" + ["Υ"]=> + string(9) "Υ" + ["Φ"]=> + string(5) "Φ" + ["Χ"]=> + string(5) "Χ" + ["Ψ"]=> + string(5) "Ψ" + ["Ω"]=> + string(7) "Ω" + ["α"]=> + string(7) "α" + ["β"]=> + string(6) "β" + ["γ"]=> + string(7) "γ" + ["δ"]=> + string(7) "δ" + ["ε"]=> + string(9) "ε" + ["ζ"]=> + string(6) "ζ" + ["η"]=> + string(5) "η" + ["θ"]=> + string(7) "θ" + ["ι"]=> + string(6) "ι" + ["κ"]=> + string(7) "κ" + ["λ"]=> + string(8) "λ" + ["μ"]=> + string(4) "μ" + ["ν"]=> + string(4) "ν" + ["ξ"]=> + string(4) "ξ" + ["ο"]=> + string(9) "ο" + ["π"]=> + string(4) "π" + ["ρ"]=> + string(5) "ρ" + ["ς"]=> + string(8) "ς" + ["σ"]=> + string(7) "σ" + ["τ"]=> + string(5) "τ" + ["υ"]=> + string(9) "υ" + ["φ"]=> + string(5) "φ" + ["χ"]=> + string(5) "χ" + ["ψ"]=> + string(5) "ψ" + ["ω"]=> + string(7) "ω" + ["ϑ"]=> + string(10) "ϑ" + ["ϒ"]=> + string(7) "ϒ" + ["ϖ"]=> + string(5) "ϖ" + [" "]=> + string(6) " " + [" "]=> + string(6) " " + [" "]=> + string(8) " " + [""]=> + string(6) "‌" + [""]=> + string(5) "‍" + [""]=> + string(5) "‎" + [""]=> + string(5) "‏" + ["–"]=> + string(7) "–" + ["—"]=> + string(7) "—" + ["‘"]=> + string(7) "‘" + ["’"]=> + string(7) "’" + ["‚"]=> + string(7) "‚" + ["“"]=> + string(7) "“" + ["”"]=> + string(7) "”" + ["„"]=> + string(7) "„" + ["†"]=> + string(8) "†" + ["‡"]=> + string(8) "‡" + ["•"]=> + string(6) "•" + ["…"]=> + string(8) "…" + ["‰"]=> + string(8) "‰" + ["′"]=> + string(7) "′" + ["″"]=> + string(7) "″" + ["‹"]=> + string(8) "‹" + ["›"]=> + string(8) "›" + ["‾"]=> + string(7) "‾" + ["⁄"]=> + string(7) "⁄" + ["€"]=> + string(6) "€" + ["ℑ"]=> + string(7) "ℑ" + ["℘"]=> + string(8) "℘" + ["ℜ"]=> + string(6) "ℜ" + ["™"]=> + string(7) "™" + ["ℵ"]=> + string(9) "ℵ" + ["←"]=> + string(6) "←" + ["↑"]=> + string(6) "↑" + ["→"]=> + string(6) "→" + ["↓"]=> + string(6) "↓" + ["↔"]=> + string(6) "↔" + ["↵"]=> + string(7) "↵" + ["⇐"]=> + string(6) "⇐" + ["⇑"]=> + string(6) "⇑" + ["⇒"]=> + string(6) "⇒" + ["⇓"]=> + string(6) "⇓" + ["⇔"]=> + string(6) "⇔" + ["∀"]=> + string(8) "∀" + ["∂"]=> + string(6) "∂" + ["∃"]=> + string(7) "∃" + ["∅"]=> + string(7) "∅" + ["∇"]=> + string(7) "∇" + ["∈"]=> + string(6) "∈" + ["∉"]=> + string(7) "∉" + ["∋"]=> + string(4) "∋" + ["∏"]=> + string(6) "∏" + ["∑"]=> + string(5) "∑" + ["−"]=> + string(7) "−" + ["∗"]=> + string(8) "∗" + ["√"]=> + string(7) "√" + ["∝"]=> + string(6) "∝" + ["∞"]=> + string(7) "∞" + ["∠"]=> + string(5) "∠" + ["∧"]=> + string(5) "∧" + ["∨"]=> + string(4) "∨" + ["∩"]=> + string(5) "∩" + ["∪"]=> + string(5) "∪" + ["∫"]=> + string(5) "∫" + ["∴"]=> + string(8) "∴" + ["∼"]=> + string(5) "∼" + ["≅"]=> + string(6) "≅" + ["≈"]=> + string(7) "≈" + ["≠"]=> + string(4) "≠" + ["≡"]=> + string(7) "≡" + ["≤"]=> + string(4) "≤" + ["≥"]=> + string(4) "≥" + ["⊂"]=> + string(5) "⊂" + ["⊃"]=> + string(5) "⊃" + ["⊄"]=> + string(6) "⊄" + ["⊆"]=> + string(6) "⊆" + ["⊇"]=> + string(6) "⊇" + ["⊕"]=> + string(7) "⊕" + ["⊗"]=> + string(8) "⊗" + ["⊥"]=> + string(6) "⊥" + ["⋅"]=> + string(6) "⋅" + ["⌈"]=> + string(7) "⌈" + ["⌉"]=> + string(7) "⌉" + ["⌊"]=> + string(8) "⌊" + ["⌋"]=> + string(8) "⌋" + ["〈"]=> + string(6) "⟨" + ["〉"]=> + string(6) "⟩" + ["◊"]=> + string(5) "◊" + ["♠"]=> + string(8) "♠" + ["♣"]=> + string(7) "♣" + ["♥"]=> + string(8) "♥" + ["♦"]=> + string(7) "♦" + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["'"]=> - string(5) "'" + string(6) "'" ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- with table = HTML_ENTITIES & quote_style = ENT_NOQUOTES -- -array(99) { - [""]=> +array(251) { + [" "]=> string(6) " " - [""]=> + ["¡"]=> string(7) "¡" - [""]=> + ["¢"]=> string(6) "¢" - [""]=> + ["£"]=> string(7) "£" - [""]=> + ["¤"]=> string(8) "¤" - [""]=> + ["¥"]=> string(5) "¥" - [""]=> + ["¦"]=> string(8) "¦" - [""]=> + ["§"]=> string(6) "§" - [""]=> + ["¨"]=> string(5) "¨" - [""]=> + ["©"]=> string(6) "©" - [""]=> + ["ª"]=> string(6) "ª" - [""]=> + ["«"]=> string(7) "«" - [""]=> + ["¬"]=> string(5) "¬" - [""]=> + [""]=> string(5) "­" - [""]=> + ["®"]=> string(5) "®" - [""]=> + ["¯"]=> string(6) "¯" - [""]=> + ["°"]=> string(5) "°" - [""]=> + ["±"]=> string(8) "±" - [""]=> + ["²"]=> string(6) "²" - [""]=> + ["³"]=> string(6) "³" - [""]=> + ["´"]=> string(7) "´" - [""]=> + ["µ"]=> string(7) "µ" - [""]=> + ["¶"]=> string(6) "¶" - [""]=> + ["·"]=> string(8) "·" - [""]=> + ["¸"]=> string(7) "¸" - [""]=> + ["¹"]=> string(6) "¹" - [""]=> + ["º"]=> string(6) "º" - [""]=> + ["»"]=> string(7) "»" - [""]=> + ["¼"]=> string(8) "¼" - [""]=> + ["½"]=> string(8) "½" - [""]=> + ["¾"]=> string(8) "¾" - [""]=> + ["¿"]=> string(8) "¿" - [""]=> + ["À"]=> string(8) "À" - [""]=> + ["Á"]=> string(8) "Á" - [""]=> + ["Â"]=> string(7) "Â" - [""]=> + ["Ã"]=> string(8) "Ã" - [""]=> + ["Ä"]=> string(6) "Ä" - [""]=> + ["Å"]=> string(7) "Å" - [""]=> + ["Æ"]=> string(7) "Æ" - [""]=> + ["Ç"]=> string(8) "Ç" - [""]=> + ["È"]=> string(8) "È" - [""]=> + ["É"]=> string(8) "É" - [""]=> + ["Ê"]=> string(7) "Ê" - [""]=> + ["Ë"]=> string(6) "Ë" - [""]=> + ["Ì"]=> string(8) "Ì" - [""]=> + ["Í"]=> string(8) "Í" - [""]=> + ["Î"]=> string(7) "Î" - [""]=> + ["Ï"]=> string(6) "Ï" - [""]=> + ["Ð"]=> string(5) "Ð" - [""]=> + ["Ñ"]=> string(8) "Ñ" - [""]=> + ["Ò"]=> string(8) "Ò" - [""]=> + ["Ó"]=> string(8) "Ó" - [""]=> + ["Ô"]=> string(7) "Ô" - [""]=> + ["Õ"]=> string(8) "Õ" - [""]=> + ["Ö"]=> string(6) "Ö" - [""]=> + ["×"]=> string(7) "×" - [""]=> + ["Ø"]=> string(8) "Ø" - [""]=> + ["Ù"]=> string(8) "Ù" - [""]=> + ["Ú"]=> string(8) "Ú" - [""]=> + ["Û"]=> string(7) "Û" - [""]=> + ["Ü"]=> string(6) "Ü" - [""]=> + ["Ý"]=> string(8) "Ý" - [""]=> + ["Þ"]=> string(7) "Þ" - [""]=> + ["ß"]=> string(7) "ß" - [""]=> + ["à"]=> string(8) "à" - [""]=> + ["á"]=> string(8) "á" - [""]=> + ["â"]=> string(7) "â" - [""]=> + ["ã"]=> string(8) "ã" - [""]=> + ["ä"]=> string(6) "ä" - [""]=> + ["å"]=> string(7) "å" - [""]=> + ["æ"]=> string(7) "æ" - [""]=> + ["ç"]=> string(8) "ç" - [""]=> + ["è"]=> string(8) "è" - [""]=> + ["é"]=> string(8) "é" - [""]=> + ["ê"]=> string(7) "ê" - [""]=> + ["ë"]=> string(6) "ë" - [""]=> + ["ì"]=> string(8) "ì" - [""]=> + ["í"]=> string(8) "í" - [""]=> + ["î"]=> string(7) "î" - [""]=> + ["ï"]=> string(6) "ï" - [""]=> + ["ð"]=> string(5) "ð" - [""]=> + ["ñ"]=> string(8) "ñ" - [""]=> + ["ò"]=> string(8) "ò" - [""]=> + ["ó"]=> string(8) "ó" - [""]=> + ["ô"]=> string(7) "ô" - [""]=> + ["õ"]=> string(8) "õ" - [""]=> + ["ö"]=> string(6) "ö" - [""]=> + ["÷"]=> string(8) "÷" - [""]=> + ["ø"]=> string(8) "ø" - [""]=> + ["ù"]=> string(8) "ù" - [""]=> + ["ú"]=> string(8) "ú" - [""]=> + ["û"]=> string(7) "û" - [""]=> + ["ü"]=> string(6) "ü" - [""]=> + ["ý"]=> string(8) "ý" - [""]=> + ["þ"]=> string(7) "þ" - [""]=> + ["ÿ"]=> string(6) "ÿ" + ["Œ"]=> + string(7) "Œ" + ["œ"]=> + string(7) "œ" + ["Š"]=> + string(8) "Š" + ["š"]=> + string(8) "š" + ["Ÿ"]=> + string(6) "Ÿ" + ["ƒ"]=> + string(6) "ƒ" + ["ˆ"]=> + string(6) "ˆ" + ["˜"]=> + string(7) "˜" + ["Α"]=> + string(7) "Α" + ["Β"]=> + string(6) "Β" + ["Γ"]=> + string(7) "Γ" + ["Δ"]=> + string(7) "Δ" + ["Ε"]=> + string(9) "Ε" + ["Ζ"]=> + string(6) "Ζ" + ["Η"]=> + string(5) "Η" + ["Θ"]=> + string(7) "Θ" + ["Ι"]=> + string(6) "Ι" + ["Κ"]=> + string(7) "Κ" + ["Λ"]=> + string(8) "Λ" + ["Μ"]=> + string(4) "Μ" + ["Ν"]=> + string(4) "Ν" + ["Ξ"]=> + string(4) "Ξ" + ["Ο"]=> + string(9) "Ο" + ["Π"]=> + string(4) "Π" + ["Ρ"]=> + string(5) "Ρ" + ["Σ"]=> + string(7) "Σ" + ["Τ"]=> + string(5) "Τ" + ["Υ"]=> + string(9) "Υ" + ["Φ"]=> + string(5) "Φ" + ["Χ"]=> + string(5) "Χ" + ["Ψ"]=> + string(5) "Ψ" + ["Ω"]=> + string(7) "Ω" + ["α"]=> + string(7) "α" + ["β"]=> + string(6) "β" + ["γ"]=> + string(7) "γ" + ["δ"]=> + string(7) "δ" + ["ε"]=> + string(9) "ε" + ["ζ"]=> + string(6) "ζ" + ["η"]=> + string(5) "η" + ["θ"]=> + string(7) "θ" + ["ι"]=> + string(6) "ι" + ["κ"]=> + string(7) "κ" + ["λ"]=> + string(8) "λ" + ["μ"]=> + string(4) "μ" + ["ν"]=> + string(4) "ν" + ["ξ"]=> + string(4) "ξ" + ["ο"]=> + string(9) "ο" + ["π"]=> + string(4) "π" + ["ρ"]=> + string(5) "ρ" + ["ς"]=> + string(8) "ς" + ["σ"]=> + string(7) "σ" + ["τ"]=> + string(5) "τ" + ["υ"]=> + string(9) "υ" + ["φ"]=> + string(5) "φ" + ["χ"]=> + string(5) "χ" + ["ψ"]=> + string(5) "ψ" + ["ω"]=> + string(7) "ω" + ["ϑ"]=> + string(10) "ϑ" + ["ϒ"]=> + string(7) "ϒ" + ["ϖ"]=> + string(5) "ϖ" + [" "]=> + string(6) " " + [" "]=> + string(6) " " + [" "]=> + string(8) " " + [""]=> + string(6) "‌" + [""]=> + string(5) "‍" + [""]=> + string(5) "‎" + [""]=> + string(5) "‏" + ["–"]=> + string(7) "–" + ["—"]=> + string(7) "—" + ["‘"]=> + string(7) "‘" + ["’"]=> + string(7) "’" + ["‚"]=> + string(7) "‚" + ["“"]=> + string(7) "“" + ["”"]=> + string(7) "”" + ["„"]=> + string(7) "„" + ["†"]=> + string(8) "†" + ["‡"]=> + string(8) "‡" + ["•"]=> + string(6) "•" + ["…"]=> + string(8) "…" + ["‰"]=> + string(8) "‰" + ["′"]=> + string(7) "′" + ["″"]=> + string(7) "″" + ["‹"]=> + string(8) "‹" + ["›"]=> + string(8) "›" + ["‾"]=> + string(7) "‾" + ["⁄"]=> + string(7) "⁄" + ["€"]=> + string(6) "€" + ["ℑ"]=> + string(7) "ℑ" + ["℘"]=> + string(8) "℘" + ["ℜ"]=> + string(6) "ℜ" + ["™"]=> + string(7) "™" + ["ℵ"]=> + string(9) "ℵ" + ["←"]=> + string(6) "←" + ["↑"]=> + string(6) "↑" + ["→"]=> + string(6) "→" + ["↓"]=> + string(6) "↓" + ["↔"]=> + string(6) "↔" + ["↵"]=> + string(7) "↵" + ["⇐"]=> + string(6) "⇐" + ["⇑"]=> + string(6) "⇑" + ["⇒"]=> + string(6) "⇒" + ["⇓"]=> + string(6) "⇓" + ["⇔"]=> + string(6) "⇔" + ["∀"]=> + string(8) "∀" + ["∂"]=> + string(6) "∂" + ["∃"]=> + string(7) "∃" + ["∅"]=> + string(7) "∅" + ["∇"]=> + string(7) "∇" + ["∈"]=> + string(6) "∈" + ["∉"]=> + string(7) "∉" + ["∋"]=> + string(4) "∋" + ["∏"]=> + string(6) "∏" + ["∑"]=> + string(5) "∑" + ["−"]=> + string(7) "−" + ["∗"]=> + string(8) "∗" + ["√"]=> + string(7) "√" + ["∝"]=> + string(6) "∝" + ["∞"]=> + string(7) "∞" + ["∠"]=> + string(5) "∠" + ["∧"]=> + string(5) "∧" + ["∨"]=> + string(4) "∨" + ["∩"]=> + string(5) "∩" + ["∪"]=> + string(5) "∪" + ["∫"]=> + string(5) "∫" + ["∴"]=> + string(8) "∴" + ["∼"]=> + string(5) "∼" + ["≅"]=> + string(6) "≅" + ["≈"]=> + string(7) "≈" + ["≠"]=> + string(4) "≠" + ["≡"]=> + string(7) "≡" + ["≤"]=> + string(4) "≤" + ["≥"]=> + string(4) "≥" + ["⊂"]=> + string(5) "⊂" + ["⊃"]=> + string(5) "⊃" + ["⊄"]=> + string(6) "⊄" + ["⊆"]=> + string(6) "⊆" + ["⊇"]=> + string(6) "⊇" + ["⊕"]=> + string(7) "⊕" + ["⊗"]=> + string(8) "⊗" + ["⊥"]=> + string(6) "⊥" + ["⋅"]=> + string(6) "⋅" + ["⌈"]=> + string(7) "⌈" + ["⌉"]=> + string(7) "⌉" + ["⌊"]=> + string(8) "⌊" + ["⌋"]=> + string(8) "⌋" + ["〈"]=> + string(6) "⟨" + ["〉"]=> + string(6) "⟩" + ["◊"]=> + string(5) "◊" + ["♠"]=> + string(8) "♠" + ["♣"]=> + string(7) "♣" + ["♥"]=> + string(8) "♥" + ["♦"]=> + string(7) "♦" + ["&"]=> + string(5) "&" ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } Done diff --git a/ext/standard/tests/strings/get_html_translation_table_basic3-win32.phpt b/ext/standard/tests/strings/get_html_translation_table_basic3-win32.phpt deleted file mode 100644 index f3fb8b433..000000000 --- a/ext/standard/tests/strings/get_html_translation_table_basic3-win32.phpt +++ /dev/null @@ -1,79 +0,0 @@ ---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( !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) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- with table = HTML_SPECIALCHARS & quote_style = ENT_QUOTE -- -array(5) { - ["""]=> - string(6) """ - ["'"]=> - string(5) "'" - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- with table = HTML_SPECIALCHARS & quote_style = ENT_NOQUOTE -- -array(3) { - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -Done diff --git a/ext/standard/tests/strings/get_html_translation_table_basic3.phpt b/ext/standard/tests/strings/get_html_translation_table_basic3.phpt index 58394eb9c..e7c66b5b0 100644 --- a/ext/standard/tests/strings/get_html_translation_table_basic3.phpt +++ b/ext/standard/tests/strings/get_html_translation_table_basic3.phpt @@ -1,42 +1,29 @@ --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( !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]] ) +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style [, string charset_hint]]] ) * 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) ); +var_dump( get_html_translation_table($table, $quote_style, "UTF-8") ); -echo "-- with table = HTML_SPECIALCHARS & quote_style = ENT_QUOTE --\n"; +echo "-- with table = HTML_SPECIALCHARS & quote_style = ENT_QUOTES --\n"; $quote_style = ENT_QUOTES; -var_dump( get_html_translation_table($table, $quote_style) ); +var_dump( get_html_translation_table($table, $quote_style, "UTF-8") ); -echo "-- with table = HTML_SPECIALCHARS & quote_style = ENT_NOQUOTE --\n"; +echo "-- with table = HTML_SPECIALCHARS & quote_style = ENT_NOQUOTES --\n"; $quote_style = ENT_NOQUOTES; -var_dump( get_html_translation_table($table, $quote_style) ); +var_dump( get_html_translation_table($table, $quote_style, "UTF-8") ); echo "Done\n"; ?> @@ -44,35 +31,35 @@ echo "Done\n"; *** Testing get_html_translation_table() : basic functionality *** -- with table = HTML_SPECIALCHARS & quote_style = ENT_COMPAT -- array(4) { + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } --- with table = HTML_SPECIALCHARS & quote_style = ENT_QUOTE -- +-- with table = HTML_SPECIALCHARS & quote_style = ENT_QUOTES -- array(5) { + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["'"]=> - string(5) "'" + string(6) "'" ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } --- with table = HTML_SPECIALCHARS & quote_style = ENT_NOQUOTE -- +-- with table = HTML_SPECIALCHARS & quote_style = ENT_NOQUOTES -- array(3) { + ["&"]=> + string(5) "&" ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } Done diff --git a/ext/standard/tests/strings/get_html_translation_table_basic1-win32.phpt b/ext/standard/tests/strings/get_html_translation_table_basic4.phpt index 700b8e335..938fff4f5 100644 --- a/ext/standard/tests/strings/get_html_translation_table_basic1-win32.phpt +++ b/ext/standard/tests/strings/get_html_translation_table_basic4.phpt @@ -1,59 +1,79 @@ --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( !setlocale(LC_ALL, "English_United States.1252") ) { - die('skip failed to set locale settings to "English_United States.1252"'); -} -?> +Test get_html_translation_table() function : basic functionality - charset WINDOWS-1252 --FILE-- <?php -/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style [, string charset_hint]]] ) * 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() ); +echo "*** Testing get_html_translation_table() : basic functionality/Windows-1252 ***\n"; -// 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) ); +var_dump( get_html_translation_table($table, ENT_COMPAT, "WINDOWS-1252") ); echo "-- with table = HTML_SPECIALCHARS --\n"; $table = HTML_SPECIALCHARS; -var_dump( get_html_translation_table($table) ); +var_dump( get_html_translation_table($table, ENT_COMPAT, "WINDOWS-1252") ); echo "Done\n"; ?> --EXPECTF-- -*** Testing get_html_translation_table() : basic functionality *** --- with default arguments -- -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} +*** Testing get_html_translation_table() : basic functionality/Windows-1252 *** -- with table = HTML_ENTITIES -- -array(100) { +array(125) { + [""]=> + string(6) "€" + [""]=> + string(7) "‚" + [""]=> + string(6) "ƒ" + [""]=> + string(7) "„" + [""]=> + string(8) "…" + [""]=> + string(8) "†" + [""]=> + string(8) "‡" + [""]=> + string(6) "ˆ" + [""]=> + string(8) "‰" + [""]=> + string(8) "Š" + [""]=> + string(8) "‹" + [""]=> + string(7) "Œ" + [""]=> + string(7) "‘" + [""]=> + string(7) "’" + [""]=> + string(7) "“" + [""]=> + string(7) "”" + [""]=> + string(6) "•" + [""]=> + string(7) "–" + [""]=> + string(7) "—" + [""]=> + string(7) "˜" + [""]=> + string(7) "™" + [""]=> + string(8) "š" + [""]=> + string(8) "›" + [""]=> + string(7) "œ" + [""]=> + string(6) "Ÿ" [""]=> string(6) " " [""]=> @@ -246,24 +266,24 @@ array(100) { string(7) "þ" [""]=> string(6) "ÿ" + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- with table = HTML_SPECIALCHARS -- array(4) { + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } Done diff --git a/ext/standard/tests/strings/get_html_translation_table_error.phpt b/ext/standard/tests/strings/get_html_translation_table_error.phpt index 5f1871448..149adbc19 100644 --- a/ext/standard/tests/strings/get_html_translation_table_error.phpt +++ b/ext/standard/tests/strings/get_html_translation_table_error.phpt @@ -2,7 +2,7 @@ Test get_html_translation_table() function : error conditions --FILE-- <?php -/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] ) +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style [, string charset_hint]]] ) * Description: Returns the internal translation table used by htmlspecialchars and htmlentities * Source code: ext/standard/html.c */ @@ -15,7 +15,7 @@ $table = HTML_ENTITIES; $quote_style = ENT_COMPAT; $extra_arg = 10; -var_dump( get_html_translation_table($table, $quote_style, $extra_arg) ); +var_dump( get_html_translation_table($table, $quote_style, "UTF-8", $extra_arg) ); echo "Done\n"; ?> @@ -24,6 +24,6 @@ echo "Done\n"; -- 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 +Warning: get_html_translation_table() expects at most 3 parameters, 4 given in %s on line %d NULL Done diff --git a/ext/standard/tests/strings/get_html_translation_table_variation1-win32.phpt b/ext/standard/tests/strings/get_html_translation_table_variation1-win32.phpt deleted file mode 100644 index 2217efb63..000000000 --- a/ext/standard/tests/strings/get_html_translation_table_variation1-win32.phpt +++ /dev/null @@ -1,1117 +0,0 @@ ---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( !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, - 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 %s -NULL - -Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %s -NULL --- Iteration 2 -- - -Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %s -NULL - -Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %s -NULL --- Iteration 3 -- - -Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %s -NULL - -Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %s -NULL --- Iteration 4 -- - -Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %s -NULL - -Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %s -NULL --- Iteration 5 -- - -Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %s -NULL - -Warning: get_html_translation_table() expects parameter 1 to be long, array given in %s on line %s -NULL --- Iteration 6 -- -array(100) { - [""]=> - string(6) " " - [""]=> - string(7) "¡" - [""]=> - string(6) "¢" - [""]=> - string(7) "£" - [""]=> - string(8) "¤" - [""]=> - string(5) "¥" - [""]=> - string(8) "¦" - [""]=> - string(6) "§" - [""]=> - string(5) "¨" - [""]=> - string(6) "©" - [""]=> - string(6) "ª" - [""]=> - string(7) "«" - [""]=> - string(5) "¬" - [""]=> - string(5) "­" - [""]=> - string(5) "®" - [""]=> - string(6) "¯" - [""]=> - string(5) "°" - [""]=> - string(8) "±" - [""]=> - string(6) "²" - [""]=> - string(6) "³" - [""]=> - string(7) "´" - [""]=> - string(7) "µ" - [""]=> - string(6) "¶" - [""]=> - string(8) "·" - [""]=> - string(7) "¸" - [""]=> - string(6) "¹" - [""]=> - string(6) "º" - [""]=> - string(7) "»" - [""]=> - string(8) "¼" - [""]=> - string(8) "½" - [""]=> - string(8) "¾" - [""]=> - string(8) "¿" - [""]=> - string(8) "À" - [""]=> - string(8) "Á" - [""]=> - string(7) "Â" - [""]=> - string(8) "Ã" - [""]=> - string(6) "Ä" - [""]=> - string(7) "Å" - [""]=> - string(7) "Æ" - [""]=> - string(8) "Ç" - [""]=> - string(8) "È" - [""]=> - string(8) "É" - [""]=> - string(7) "Ê" - [""]=> - string(6) "Ë" - [""]=> - string(8) "Ì" - [""]=> - string(8) "Í" - [""]=> - string(7) "Î" - [""]=> - string(6) "Ï" - [""]=> - string(5) "Ð" - [""]=> - string(8) "Ñ" - [""]=> - string(8) "Ò" - [""]=> - string(8) "Ó" - [""]=> - string(7) "Ô" - [""]=> - string(8) "Õ" - [""]=> - string(6) "Ö" - [""]=> - string(7) "×" - [""]=> - string(8) "Ø" - [""]=> - string(8) "Ù" - [""]=> - string(8) "Ú" - [""]=> - string(7) "Û" - [""]=> - string(6) "Ü" - [""]=> - string(8) "Ý" - [""]=> - string(7) "Þ" - [""]=> - string(7) "ß" - [""]=> - string(8) "à" - [""]=> - string(8) "á" - [""]=> - string(7) "â" - [""]=> - string(8) "ã" - [""]=> - string(6) "ä" - [""]=> - string(7) "å" - [""]=> - string(7) "æ" - [""]=> - string(8) "ç" - [""]=> - string(8) "è" - [""]=> - string(8) "é" - [""]=> - string(7) "ê" - [""]=> - string(6) "ë" - [""]=> - string(8) "ì" - [""]=> - string(8) "í" - [""]=> - string(7) "î" - [""]=> - string(6) "ï" - [""]=> - string(5) "ð" - [""]=> - string(8) "ñ" - [""]=> - string(8) "ò" - [""]=> - string(8) "ó" - [""]=> - string(7) "ô" - [""]=> - string(8) "õ" - [""]=> - string(6) "ö" - [""]=> - string(8) "÷" - [""]=> - string(8) "ø" - [""]=> - string(8) "ù" - [""]=> - string(8) "ú" - [""]=> - string(7) "û" - [""]=> - string(6) "ü" - [""]=> - string(8) "ý" - [""]=> - string(7) "þ" - [""]=> - string(6) "ÿ" - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -array(100) { - [""]=> - string(6) " " - [""]=> - string(7) "¡" - [""]=> - string(6) "¢" - [""]=> - string(7) "£" - [""]=> - string(8) "¤" - [""]=> - string(5) "¥" - [""]=> - string(8) "¦" - [""]=> - string(6) "§" - [""]=> - string(5) "¨" - [""]=> - string(6) "©" - [""]=> - string(6) "ª" - [""]=> - string(7) "«" - [""]=> - string(5) "¬" - [""]=> - string(5) "­" - [""]=> - string(5) "®" - [""]=> - string(6) "¯" - [""]=> - string(5) "°" - [""]=> - string(8) "±" - [""]=> - string(6) "²" - [""]=> - string(6) "³" - [""]=> - string(7) "´" - [""]=> - string(7) "µ" - [""]=> - string(6) "¶" - [""]=> - string(8) "·" - [""]=> - string(7) "¸" - [""]=> - string(6) "¹" - [""]=> - string(6) "º" - [""]=> - string(7) "»" - [""]=> - string(8) "¼" - [""]=> - string(8) "½" - [""]=> - string(8) "¾" - [""]=> - string(8) "¿" - [""]=> - string(8) "À" - [""]=> - string(8) "Á" - [""]=> - string(7) "Â" - [""]=> - string(8) "Ã" - [""]=> - string(6) "Ä" - [""]=> - string(7) "Å" - [""]=> - string(7) "Æ" - [""]=> - string(8) "Ç" - [""]=> - string(8) "È" - [""]=> - string(8) "É" - [""]=> - string(7) "Ê" - [""]=> - string(6) "Ë" - [""]=> - string(8) "Ì" - [""]=> - string(8) "Í" - [""]=> - string(7) "Î" - [""]=> - string(6) "Ï" - [""]=> - string(5) "Ð" - [""]=> - string(8) "Ñ" - [""]=> - string(8) "Ò" - [""]=> - string(8) "Ó" - [""]=> - string(7) "Ô" - [""]=> - string(8) "Õ" - [""]=> - string(6) "Ö" - [""]=> - string(7) "×" - [""]=> - string(8) "Ø" - [""]=> - string(8) "Ù" - [""]=> - string(8) "Ú" - [""]=> - string(7) "Û" - [""]=> - string(6) "Ü" - [""]=> - string(8) "Ý" - [""]=> - string(7) "Þ" - [""]=> - string(7) "ß" - [""]=> - string(8) "à" - [""]=> - string(8) "á" - [""]=> - string(7) "â" - [""]=> - string(8) "ã" - [""]=> - string(6) "ä" - [""]=> - string(7) "å" - [""]=> - string(7) "æ" - [""]=> - string(8) "ç" - [""]=> - string(8) "è" - [""]=> - string(8) "é" - [""]=> - string(7) "ê" - [""]=> - string(6) "ë" - [""]=> - string(8) "ì" - [""]=> - string(8) "í" - [""]=> - string(7) "î" - [""]=> - string(6) "ï" - [""]=> - string(5) "ð" - [""]=> - string(8) "ñ" - [""]=> - string(8) "ò" - [""]=> - string(8) "ó" - [""]=> - string(7) "ô" - [""]=> - string(8) "õ" - [""]=> - string(6) "ö" - [""]=> - string(8) "÷" - [""]=> - string(8) "ø" - [""]=> - string(8) "ù" - [""]=> - string(8) "ú" - [""]=> - string(7) "û" - [""]=> - string(6) "ü" - [""]=> - string(8) "ý" - [""]=> - string(7) "þ" - [""]=> - string(6) "ÿ" - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 7 -- -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 8 -- -array(100) { - [""]=> - string(6) " " - [""]=> - string(7) "¡" - [""]=> - string(6) "¢" - [""]=> - string(7) "£" - [""]=> - string(8) "¤" - [""]=> - string(5) "¥" - [""]=> - string(8) "¦" - [""]=> - string(6) "§" - [""]=> - string(5) "¨" - [""]=> - string(6) "©" - [""]=> - string(6) "ª" - [""]=> - string(7) "«" - [""]=> - string(5) "¬" - [""]=> - string(5) "­" - [""]=> - string(5) "®" - [""]=> - string(6) "¯" - [""]=> - string(5) "°" - [""]=> - string(8) "±" - [""]=> - string(6) "²" - [""]=> - string(6) "³" - [""]=> - string(7) "´" - [""]=> - string(7) "µ" - [""]=> - string(6) "¶" - [""]=> - string(8) "·" - [""]=> - string(7) "¸" - [""]=> - string(6) "¹" - [""]=> - string(6) "º" - [""]=> - string(7) "»" - [""]=> - string(8) "¼" - [""]=> - string(8) "½" - [""]=> - string(8) "¾" - [""]=> - string(8) "¿" - [""]=> - string(8) "À" - [""]=> - string(8) "Á" - [""]=> - string(7) "Â" - [""]=> - string(8) "Ã" - [""]=> - string(6) "Ä" - [""]=> - string(7) "Å" - [""]=> - string(7) "Æ" - [""]=> - string(8) "Ç" - [""]=> - string(8) "È" - [""]=> - string(8) "É" - [""]=> - string(7) "Ê" - [""]=> - string(6) "Ë" - [""]=> - string(8) "Ì" - [""]=> - string(8) "Í" - [""]=> - string(7) "Î" - [""]=> - string(6) "Ï" - [""]=> - string(5) "Ð" - [""]=> - string(8) "Ñ" - [""]=> - string(8) "Ò" - [""]=> - string(8) "Ó" - [""]=> - string(7) "Ô" - [""]=> - string(8) "Õ" - [""]=> - string(6) "Ö" - [""]=> - string(7) "×" - [""]=> - string(8) "Ø" - [""]=> - string(8) "Ù" - [""]=> - string(8) "Ú" - [""]=> - string(7) "Û" - [""]=> - string(6) "Ü" - [""]=> - string(8) "Ý" - [""]=> - string(7) "Þ" - [""]=> - string(7) "ß" - [""]=> - string(8) "à" - [""]=> - string(8) "á" - [""]=> - string(7) "â" - [""]=> - string(8) "ã" - [""]=> - string(6) "ä" - [""]=> - string(7) "å" - [""]=> - string(7) "æ" - [""]=> - string(8) "ç" - [""]=> - string(8) "è" - [""]=> - string(8) "é" - [""]=> - string(7) "ê" - [""]=> - string(6) "ë" - [""]=> - string(8) "ì" - [""]=> - string(8) "í" - [""]=> - string(7) "î" - [""]=> - string(6) "ï" - [""]=> - string(5) "ð" - [""]=> - string(8) "ñ" - [""]=> - string(8) "ò" - [""]=> - string(8) "ó" - [""]=> - string(7) "ô" - [""]=> - string(8) "õ" - [""]=> - string(6) "ö" - [""]=> - string(8) "÷" - [""]=> - string(8) "ø" - [""]=> - string(8) "ù" - [""]=> - string(8) "ú" - [""]=> - string(7) "û" - [""]=> - string(6) "ü" - [""]=> - string(8) "ý" - [""]=> - string(7) "þ" - [""]=> - string(6) "ÿ" - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -array(100) { - [""]=> - string(6) " " - [""]=> - string(7) "¡" - [""]=> - string(6) "¢" - [""]=> - string(7) "£" - [""]=> - string(8) "¤" - [""]=> - string(5) "¥" - [""]=> - string(8) "¦" - [""]=> - string(6) "§" - [""]=> - string(5) "¨" - [""]=> - string(6) "©" - [""]=> - string(6) "ª" - [""]=> - string(7) "«" - [""]=> - string(5) "¬" - [""]=> - string(5) "­" - [""]=> - string(5) "®" - [""]=> - string(6) "¯" - [""]=> - string(5) "°" - [""]=> - string(8) "±" - [""]=> - string(6) "²" - [""]=> - string(6) "³" - [""]=> - string(7) "´" - [""]=> - string(7) "µ" - [""]=> - string(6) "¶" - [""]=> - string(8) "·" - [""]=> - string(7) "¸" - [""]=> - string(6) "¹" - [""]=> - string(6) "º" - [""]=> - string(7) "»" - [""]=> - string(8) "¼" - [""]=> - string(8) "½" - [""]=> - string(8) "¾" - [""]=> - string(8) "¿" - [""]=> - string(8) "À" - [""]=> - string(8) "Á" - [""]=> - string(7) "Â" - [""]=> - string(8) "Ã" - [""]=> - string(6) "Ä" - [""]=> - string(7) "Å" - [""]=> - string(7) "Æ" - [""]=> - string(8) "Ç" - [""]=> - string(8) "È" - [""]=> - string(8) "É" - [""]=> - string(7) "Ê" - [""]=> - string(6) "Ë" - [""]=> - string(8) "Ì" - [""]=> - string(8) "Í" - [""]=> - string(7) "Î" - [""]=> - string(6) "Ï" - [""]=> - string(5) "Ð" - [""]=> - string(8) "Ñ" - [""]=> - string(8) "Ò" - [""]=> - string(8) "Ó" - [""]=> - string(7) "Ô" - [""]=> - string(8) "Õ" - [""]=> - string(6) "Ö" - [""]=> - string(7) "×" - [""]=> - string(8) "Ø" - [""]=> - string(8) "Ù" - [""]=> - string(8) "Ú" - [""]=> - string(7) "Û" - [""]=> - string(6) "Ü" - [""]=> - string(8) "Ý" - [""]=> - string(7) "Þ" - [""]=> - string(7) "ß" - [""]=> - string(8) "à" - [""]=> - string(8) "á" - [""]=> - string(7) "â" - [""]=> - string(8) "ã" - [""]=> - string(6) "ä" - [""]=> - string(7) "å" - [""]=> - string(7) "æ" - [""]=> - string(8) "ç" - [""]=> - string(8) "è" - [""]=> - string(8) "é" - [""]=> - string(7) "ê" - [""]=> - string(6) "ë" - [""]=> - string(8) "ì" - [""]=> - string(8) "í" - [""]=> - string(7) "î" - [""]=> - string(6) "ï" - [""]=> - string(5) "ð" - [""]=> - string(8) "ñ" - [""]=> - string(8) "ò" - [""]=> - string(8) "ó" - [""]=> - string(7) "ô" - [""]=> - string(8) "õ" - [""]=> - string(6) "ö" - [""]=> - string(8) "÷" - [""]=> - string(8) "ø" - [""]=> - string(8) "ù" - [""]=> - string(8) "ú" - [""]=> - string(7) "û" - [""]=> - string(6) "ü" - [""]=> - string(8) "ý" - [""]=> - string(7) "þ" - [""]=> - string(6) "ÿ" - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 9 -- -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 10 -- - -Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %s -NULL - -Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %s -NULL --- Iteration 11 -- - -Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %s -NULL - -Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %s -NULL --- Iteration 12 -- - -Warning: get_html_translation_table() expects parameter 1 to be long, object given in %s on line %s -NULL - -Warning: get_html_translation_table() expects parameter 1 to be long, object given in %s on line %s -NULL --- Iteration 13 -- - -Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %s -NULL - -Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %s -NULL --- Iteration 14 -- - -Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %s -NULL - -Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %s -NULL --- Iteration 15 -- -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 16 -- -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 17 -- - -Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %s -NULL - -Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %s -NULL --- Iteration 18 -- -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 19 -- -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -Done diff --git a/ext/standard/tests/strings/get_html_translation_table_variation1.phpt b/ext/standard/tests/strings/get_html_translation_table_variation1.phpt index 7bf919e35..edae95a2e 100644 --- a/ext/standard/tests/strings/get_html_translation_table_variation1.phpt +++ b/ext/standard/tests/strings/get_html_translation_table_variation1.phpt @@ -1,18 +1,8 @@ --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( !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]] ) +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style [, string charset_hint]]] ) * Description: Returns the internal translation table used by htmlspecialchars and htmlentities * Source code: ext/standard/html.c */ @@ -21,9 +11,6 @@ if( !setlocale(LC_ALL, "en_US.UTF-8") ) { * 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; @@ -85,8 +72,17 @@ 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) ); + $v = get_html_translation_table($table, ENT_COMPAT, "UTF-8"); + if (is_array($v) && count($v) > 100) + var_dump(count($v)); + else + var_dump($v); + + $v = get_html_translation_table($table, $quote_style, "UTF-8"); + if (is_array($v) && count($v) > 100) + var_dump(count($v)); + else + var_dump($v); $counter ++; } @@ -102,1015 +98,211 @@ echo "Done\n"; --- 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 %s +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 %s +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 %s +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 %s +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 %s +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 %s +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 %s +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 %s +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 %s +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 %s +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) " " - [""]=> - string(7) "¡" - [""]=> - string(6) "¢" - [""]=> - string(7) "£" - [""]=> - string(8) "¤" - [""]=> - string(5) "¥" - [""]=> - string(8) "¦" - [""]=> - string(6) "§" - [""]=> - string(5) "¨" - [""]=> - string(6) "©" - [""]=> - string(6) "ª" - [""]=> - string(7) "«" - [""]=> - string(5) "¬" - [""]=> - string(5) "­" - [""]=> - string(5) "®" - [""]=> - string(6) "¯" - [""]=> - string(5) "°" - [""]=> - string(8) "±" - [""]=> - string(6) "²" - [""]=> - string(6) "³" - [""]=> - string(7) "´" - [""]=> - string(7) "µ" - [""]=> - string(6) "¶" - [""]=> - string(8) "·" - [""]=> - string(7) "¸" - [""]=> - string(6) "¹" - [""]=> - string(6) "º" - [""]=> - string(7) "»" - [""]=> - string(8) "¼" - [""]=> - string(8) "½" - [""]=> - string(8) "¾" - [""]=> - string(8) "¿" - [""]=> - string(8) "À" - [""]=> - string(8) "Á" - [""]=> - string(7) "Â" - [""]=> - string(8) "Ã" - [""]=> - string(6) "Ä" - [""]=> - string(7) "Å" - [""]=> - string(7) "Æ" - [""]=> - string(8) "Ç" - [""]=> - string(8) "È" - [""]=> - string(8) "É" - [""]=> - string(7) "Ê" - [""]=> - string(6) "Ë" - [""]=> - string(8) "Ì" - [""]=> - string(8) "Í" - [""]=> - string(7) "Î" - [""]=> - string(6) "Ï" - [""]=> - string(5) "Ð" - [""]=> - string(8) "Ñ" - [""]=> - string(8) "Ò" - [""]=> - string(8) "Ó" - [""]=> - string(7) "Ô" - [""]=> - string(8) "Õ" - [""]=> - string(6) "Ö" - [""]=> - string(7) "×" - [""]=> - string(8) "Ø" - [""]=> - string(8) "Ù" - [""]=> - string(8) "Ú" - [""]=> - string(7) "Û" - [""]=> - string(6) "Ü" - [""]=> - string(8) "Ý" - [""]=> - string(7) "Þ" - [""]=> - string(7) "ß" - [""]=> - string(8) "à" - [""]=> - string(8) "á" - [""]=> - string(7) "â" - [""]=> - string(8) "ã" - [""]=> - string(6) "ä" - [""]=> - string(7) "å" - [""]=> - string(7) "æ" - [""]=> - string(8) "ç" - [""]=> - string(8) "è" - [""]=> - string(8) "é" - [""]=> - string(7) "ê" - [""]=> - string(6) "ë" - [""]=> - string(8) "ì" - [""]=> - string(8) "í" - [""]=> - string(7) "î" - [""]=> - string(6) "ï" - [""]=> - string(5) "ð" - [""]=> - string(8) "ñ" - [""]=> - string(8) "ò" - [""]=> - string(8) "ó" - [""]=> - string(7) "ô" - [""]=> - string(8) "õ" - [""]=> - string(6) "ö" - [""]=> - string(8) "÷" - [""]=> - string(8) "ø" - [""]=> - string(8) "ù" - [""]=> - string(8) "ú" - [""]=> - string(7) "û" - [""]=> - string(6) "ü" - [""]=> - string(8) "ý" - [""]=> - string(7) "þ" - [""]=> - string(6) "ÿ" - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" +int(252) +int(252) +-- Iteration 7 -- +array(4) { ["&"]=> string(5) "&" -} -array(100) { - [""]=> - string(6) " " - [""]=> - string(7) "¡" - [""]=> - string(6) "¢" - [""]=> - string(7) "£" - [""]=> - string(8) "¤" - [""]=> - string(5) "¥" - [""]=> - string(8) "¦" - [""]=> - string(6) "§" - [""]=> - string(5) "¨" - [""]=> - string(6) "©" - [""]=> - string(6) "ª" - [""]=> - string(7) "«" - [""]=> - string(5) "¬" - [""]=> - string(5) "­" - [""]=> - string(5) "®" - [""]=> - string(6) "¯" - [""]=> - string(5) "°" - [""]=> - string(8) "±" - [""]=> - string(6) "²" - [""]=> - string(6) "³" - [""]=> - string(7) "´" - [""]=> - string(7) "µ" - [""]=> - string(6) "¶" - [""]=> - string(8) "·" - [""]=> - string(7) "¸" - [""]=> - string(6) "¹" - [""]=> - string(6) "º" - [""]=> - string(7) "»" - [""]=> - string(8) "¼" - [""]=> - string(8) "½" - [""]=> - string(8) "¾" - [""]=> - string(8) "¿" - [""]=> - string(8) "À" - [""]=> - string(8) "Á" - [""]=> - string(7) "Â" - [""]=> - string(8) "Ã" - [""]=> - string(6) "Ä" - [""]=> - string(7) "Å" - [""]=> - string(7) "Æ" - [""]=> - string(8) "Ç" - [""]=> - string(8) "È" - [""]=> - string(8) "É" - [""]=> - string(7) "Ê" - [""]=> - string(6) "Ë" - [""]=> - string(8) "Ì" - [""]=> - string(8) "Í" - [""]=> - string(7) "Î" - [""]=> - string(6) "Ï" - [""]=> - string(5) "Ð" - [""]=> - string(8) "Ñ" - [""]=> - string(8) "Ò" - [""]=> - string(8) "Ó" - [""]=> - string(7) "Ô" - [""]=> - string(8) "Õ" - [""]=> - string(6) "Ö" - [""]=> - string(7) "×" - [""]=> - string(8) "Ø" - [""]=> - string(8) "Ù" - [""]=> - string(8) "Ú" - [""]=> - string(7) "Û" - [""]=> - string(6) "Ü" - [""]=> - string(8) "Ý" - [""]=> - string(7) "Þ" - [""]=> - string(7) "ß" - [""]=> - string(8) "à" - [""]=> - string(8) "á" - [""]=> - string(7) "â" - [""]=> - string(8) "ã" - [""]=> - string(6) "ä" - [""]=> - string(7) "å" - [""]=> - string(7) "æ" - [""]=> - string(8) "ç" - [""]=> - string(8) "è" - [""]=> - string(8) "é" - [""]=> - string(7) "ê" - [""]=> - string(6) "ë" - [""]=> - string(8) "ì" - [""]=> - string(8) "í" - [""]=> - string(7) "î" - [""]=> - string(6) "ï" - [""]=> - string(5) "ð" - [""]=> - string(8) "ñ" - [""]=> - string(8) "ò" - [""]=> - string(8) "ó" - [""]=> - string(7) "ô" - [""]=> - string(8) "õ" - [""]=> - string(6) "ö" - [""]=> - string(8) "÷" - [""]=> - string(8) "ø" - [""]=> - string(8) "ù" - [""]=> - string(8) "ú" - [""]=> - string(7) "û" - [""]=> - string(6) "ü" - [""]=> - string(8) "ý" - [""]=> - string(7) "þ" - [""]=> - string(6) "ÿ" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } --- Iteration 7 -- array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" ["&"]=> string(5) "&" -} -array(4) { ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- Iteration 8 -- -array(100) { - [""]=> - string(6) " " - [""]=> - string(7) "¡" - [""]=> - string(6) "¢" - [""]=> - string(7) "£" - [""]=> - string(8) "¤" - [""]=> - string(5) "¥" - [""]=> - string(8) "¦" - [""]=> - string(6) "§" - [""]=> - string(5) "¨" - [""]=> - string(6) "©" - [""]=> - string(6) "ª" - [""]=> - string(7) "«" - [""]=> - string(5) "¬" - [""]=> - string(5) "­" - [""]=> - string(5) "®" - [""]=> - string(6) "¯" - [""]=> - string(5) "°" - [""]=> - string(8) "±" - [""]=> - string(6) "²" - [""]=> - string(6) "³" - [""]=> - string(7) "´" - [""]=> - string(7) "µ" - [""]=> - string(6) "¶" - [""]=> - string(8) "·" - [""]=> - string(7) "¸" - [""]=> - string(6) "¹" - [""]=> - string(6) "º" - [""]=> - string(7) "»" - [""]=> - string(8) "¼" - [""]=> - string(8) "½" - [""]=> - string(8) "¾" - [""]=> - string(8) "¿" - [""]=> - string(8) "À" - [""]=> - string(8) "Á" - [""]=> - string(7) "Â" - [""]=> - string(8) "Ã" - [""]=> - string(6) "Ä" - [""]=> - string(7) "Å" - [""]=> - string(7) "Æ" - [""]=> - string(8) "Ç" - [""]=> - string(8) "È" - [""]=> - string(8) "É" - [""]=> - string(7) "Ê" - [""]=> - string(6) "Ë" - [""]=> - string(8) "Ì" - [""]=> - string(8) "Í" - [""]=> - string(7) "Î" - [""]=> - string(6) "Ï" - [""]=> - string(5) "Ð" - [""]=> - string(8) "Ñ" - [""]=> - string(8) "Ò" - [""]=> - string(8) "Ó" - [""]=> - string(7) "Ô" - [""]=> - string(8) "Õ" - [""]=> - string(6) "Ö" - [""]=> - string(7) "×" - [""]=> - string(8) "Ø" - [""]=> - string(8) "Ù" - [""]=> - string(8) "Ú" - [""]=> - string(7) "Û" - [""]=> - string(6) "Ü" - [""]=> - string(8) "Ý" - [""]=> - string(7) "Þ" - [""]=> - string(7) "ß" - [""]=> - string(8) "à" - [""]=> - string(8) "á" - [""]=> - string(7) "â" - [""]=> - string(8) "ã" - [""]=> - string(6) "ä" - [""]=> - string(7) "å" - [""]=> - string(7) "æ" - [""]=> - string(8) "ç" - [""]=> - string(8) "è" - [""]=> - string(8) "é" - [""]=> - string(7) "ê" - [""]=> - string(6) "ë" - [""]=> - string(8) "ì" - [""]=> - string(8) "í" - [""]=> - string(7) "î" - [""]=> - string(6) "ï" - [""]=> - string(5) "ð" - [""]=> - string(8) "ñ" - [""]=> - string(8) "ò" - [""]=> - string(8) "ó" - [""]=> - string(7) "ô" - [""]=> - string(8) "õ" - [""]=> - string(6) "ö" - [""]=> - string(8) "÷" - [""]=> - string(8) "ø" - [""]=> - string(8) "ù" - [""]=> - string(8) "ú" - [""]=> - string(7) "û" - [""]=> - string(6) "ü" - [""]=> - string(8) "ý" - [""]=> - string(7) "þ" - [""]=> - string(6) "ÿ" - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" +int(252) +int(252) +-- Iteration 9 -- +array(4) { ["&"]=> string(5) "&" -} -array(100) { - [""]=> - string(6) " " - [""]=> - string(7) "¡" - [""]=> - string(6) "¢" - [""]=> - string(7) "£" - [""]=> - string(8) "¤" - [""]=> - string(5) "¥" - [""]=> - string(8) "¦" - [""]=> - string(6) "§" - [""]=> - string(5) "¨" - [""]=> - string(6) "©" - [""]=> - string(6) "ª" - [""]=> - string(7) "«" - [""]=> - string(5) "¬" - [""]=> - string(5) "­" - [""]=> - string(5) "®" - [""]=> - string(6) "¯" - [""]=> - string(5) "°" - [""]=> - string(8) "±" - [""]=> - string(6) "²" - [""]=> - string(6) "³" - [""]=> - string(7) "´" - [""]=> - string(7) "µ" - [""]=> - string(6) "¶" - [""]=> - string(8) "·" - [""]=> - string(7) "¸" - [""]=> - string(6) "¹" - [""]=> - string(6) "º" - [""]=> - string(7) "»" - [""]=> - string(8) "¼" - [""]=> - string(8) "½" - [""]=> - string(8) "¾" - [""]=> - string(8) "¿" - [""]=> - string(8) "À" - [""]=> - string(8) "Á" - [""]=> - string(7) "Â" - [""]=> - string(8) "Ã" - [""]=> - string(6) "Ä" - [""]=> - string(7) "Å" - [""]=> - string(7) "Æ" - [""]=> - string(8) "Ç" - [""]=> - string(8) "È" - [""]=> - string(8) "É" - [""]=> - string(7) "Ê" - [""]=> - string(6) "Ë" - [""]=> - string(8) "Ì" - [""]=> - string(8) "Í" - [""]=> - string(7) "Î" - [""]=> - string(6) "Ï" - [""]=> - string(5) "Ð" - [""]=> - string(8) "Ñ" - [""]=> - string(8) "Ò" - [""]=> - string(8) "Ó" - [""]=> - string(7) "Ô" - [""]=> - string(8) "Õ" - [""]=> - string(6) "Ö" - [""]=> - string(7) "×" - [""]=> - string(8) "Ø" - [""]=> - string(8) "Ù" - [""]=> - string(8) "Ú" - [""]=> - string(7) "Û" - [""]=> - string(6) "Ü" - [""]=> - string(8) "Ý" - [""]=> - string(7) "Þ" - [""]=> - string(7) "ß" - [""]=> - string(8) "à" - [""]=> - string(8) "á" - [""]=> - string(7) "â" - [""]=> - string(8) "ã" - [""]=> - string(6) "ä" - [""]=> - string(7) "å" - [""]=> - string(7) "æ" - [""]=> - string(8) "ç" - [""]=> - string(8) "è" - [""]=> - string(8) "é" - [""]=> - string(7) "ê" - [""]=> - string(6) "ë" - [""]=> - string(8) "ì" - [""]=> - string(8) "í" - [""]=> - string(7) "î" - [""]=> - string(6) "ï" - [""]=> - string(5) "ð" - [""]=> - string(8) "ñ" - [""]=> - string(8) "ò" - [""]=> - string(8) "ó" - [""]=> - string(7) "ô" - [""]=> - string(8) "õ" - [""]=> - string(6) "ö" - [""]=> - string(8) "÷" - [""]=> - string(8) "ø" - [""]=> - string(8) "ù" - [""]=> - string(8) "ú" - [""]=> - string(7) "û" - [""]=> - string(6) "ü" - [""]=> - string(8) "ý" - [""]=> - string(7) "þ" - [""]=> - string(6) "ÿ" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } --- Iteration 9 -- array(4) { - ["""]=> - string(6) """ - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" ["&"]=> string(5) "&" -} -array(4) { ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- Iteration 10 -- -Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %s +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 %s +Warning: get_html_translation_table() expects parameter 1 to be long, string 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 %s +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 %s +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, object given in %s on line %s +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 %s +Warning: get_html_translation_table() expects parameter 1 to be long, object given in %s on line %d NULL -- Iteration 13 -- -Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %s +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 %s +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d NULL -- Iteration 14 -- -Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %s +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 %s +Warning: get_html_translation_table() expects parameter 1 to be long, string given in %s on line %d NULL -- Iteration 15 -- array(4) { + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } array(4) { + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- Iteration 16 -- array(4) { + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } array(4) { + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- Iteration 17 -- -Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %s +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 %s +Warning: get_html_translation_table() expects parameter 1 to be long, resource given in %s on line %d NULL -- Iteration 18 -- array(4) { + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } array(4) { + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- Iteration 19 -- array(4) { + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } array(4) { + ["&"]=> + string(5) "&" ["""]=> string(6) """ ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } Done diff --git a/ext/standard/tests/strings/get_html_translation_table_variation2-win32.phpt b/ext/standard/tests/strings/get_html_translation_table_variation2-win32.phpt deleted file mode 100644 index 109a40c32..000000000 --- a/ext/standard/tests/strings/get_html_translation_table_variation2-win32.phpt +++ /dev/null @@ -1,220 +0,0 @@ ---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( !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, - 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 %s -NULL --- Iteration 2 -- - -Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %s -NULL --- Iteration 3 -- - -Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %s -NULL --- Iteration 4 -- - -Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %s -NULL --- Iteration 5 -- - -Warning: get_html_translation_table() expects parameter 2 to be long, array given in %s on line %s -NULL --- Iteration 6 -- -array(4) { - ["'"]=> - string(5) "'" - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 7 -- -array(3) { - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 8 -- -array(4) { - ["'"]=> - string(5) "'" - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 9 -- -array(3) { - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 10 -- - -Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %s -NULL --- Iteration 11 -- - -Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %s -NULL --- Iteration 12 -- - -Warning: get_html_translation_table() expects parameter 2 to be long, object given in %s on line %s -NULL --- Iteration 13 -- - -Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %s -NULL --- Iteration 14 -- - -Warning: get_html_translation_table() expects parameter 2 to be long, string given in %s on line %s -NULL --- Iteration 15 -- -array(3) { - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 16 -- -array(3) { - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 17 -- - -Warning: get_html_translation_table() expects parameter 2 to be long, resource given in %s on line %s -NULL --- Iteration 18 -- -array(3) { - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} --- Iteration 19 -- -array(3) { - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" - ["&"]=> - string(5) "&" -} -Done diff --git a/ext/standard/tests/strings/get_html_translation_table_variation2.phpt b/ext/standard/tests/strings/get_html_translation_table_variation2.phpt index cc055f37f..b792a5554 100644 --- a/ext/standard/tests/strings/get_html_translation_table_variation2.phpt +++ b/ext/standard/tests/strings/get_html_translation_table_variation2.phpt @@ -1,18 +1,8 @@ --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( !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]] ) +/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style [, string charset_hint]]] ) * Description: Returns the internal translation table used by htmlspecialchars and htmlentities * Source code: ext/standard/html.c */ @@ -118,43 +108,43 @@ Warning: get_html_translation_table() expects parameter 2 to be long, array give NULL -- Iteration 6 -- array(4) { + ["&"]=> + string(5) "&" ["'"]=> - string(5) "'" + string(6) "'" ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- Iteration 7 -- array(3) { + ["&"]=> + string(5) "&" ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- Iteration 8 -- array(4) { + ["&"]=> + string(5) "&" ["'"]=> - string(5) "'" + string(6) "'" ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- Iteration 9 -- array(3) { + ["&"]=> + string(5) "&" ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- Iteration 10 -- @@ -178,21 +168,21 @@ Warning: get_html_translation_table() expects parameter 2 to be long, string giv NULL -- Iteration 15 -- array(3) { + ["&"]=> + string(5) "&" ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- Iteration 16 -- array(3) { + ["&"]=> + string(5) "&" ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- Iteration 17 -- @@ -200,20 +190,20 @@ Warning: get_html_translation_table() expects parameter 2 to be long, resource g NULL -- Iteration 18 -- array(3) { + ["&"]=> + string(5) "&" ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } -- Iteration 19 -- array(3) { + ["&"]=> + string(5) "&" ["<"]=> string(4) "<" [">"]=> string(4) ">" - ["&"]=> - string(5) "&" } Done diff --git a/ext/standard/tests/strings/htmlentities-utf-2.phpt b/ext/standard/tests/strings/htmlentities-utf-2.phpt index c5f4ac4ea..d515dc0ff 100755 --- a/ext/standard/tests/strings/htmlentities-utf-2.phpt +++ b/ext/standard/tests/strings/htmlentities-utf-2.phpt @@ -50,8 +50,8 @@ foreach($strings as $string) { %unicode|string%(16) "266561637574653b" %unicode|string%(2) "79" %unicode|string%(2) "79" -%unicode|string%(8) "f7bfbfbf" -%unicode|string%(8) "f7bfbfbf" +%unicode|string%(0) "" +%unicode|string%(0) "" %unicode|string%(0) "" %unicode|string%(0) "" %unicode|string%(0) "" diff --git a/ext/standard/tests/strings/htmlentities-utf-3.phpt b/ext/standard/tests/strings/htmlentities-utf-3.phpt new file mode 100644 index 000000000..c28917ba1 --- /dev/null +++ b/ext/standard/tests/strings/htmlentities-utf-3.phpt @@ -0,0 +1,83 @@ +--TEST--
+Test get_next_char(), used by htmlentities()/htmlspecialchars(): validity of UTF-8 sequences
+--FILE--
+<?php
+
+/* conformance to Unicode 5.2, section 3.9, D92 */
+
+$val_ranges = array(
+ array(array(0x00, 0x7F)),
+ array(array(0xC2, 0xDF), array(0x80, 0xBF)),
+ array(array(0xE0, 0xE0), array(0xA0, 0xBF), array(0x80, 0xBF)),
+ array(array(0xE1, 0xEC), array(0x80, 0xBF), array(0x80, 0xBF)),
+ array(array(0xED, 0xED), array(0x80, 0x9F), array(0x80, 0xBF)),
+ array(array(0xEE, 0xEF), array(0x80, 0xBF), array(0x80, 0xBF)),
+ array(array(0xF0, 0xF0), array(0x90, 0xBF), array(0x80, 0xBF), array(0x80, 0xBF)),
+ array(array(0xF1, 0xF3), array(0x80, 0xBF), array(0x80, 0xBF), array(0x80, 0xBF)),
+ array(array(0xF4, 0xF4), array(0x80, 0x8F), array(0x80, 0xBF), array(0x80, 0xBF)),
+);
+
+function is_valid($seq) {
+ global $val_ranges;
+ $b = ord($seq[0]);
+ foreach ($val_ranges as $l) {
+ if ($b >= $l[0][0] && $b <= $l[0][1]) {
+ if (count($l) != strlen($seq)) {
+ return false;
+ }
+ for ($n = 1; $n < strlen($seq); $n++) {
+ if (ord($seq[$n]) < $l[$n][0] || ord($seq[$n]) > $l[$n][1]) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
+function concordance($s) {
+ $vhe = strlen(htmlspecialchars($s, ENT_QUOTES, "UTF-8")) > 0;
+ $v = is_valid($s);
+ return ($vhe === $v);
+}
+
+for ($b1 = 0xC0; $b1 < 0xE0; $b1++) {
+ for ($b2 = 0x80; $b2 < 0xBF; $b2++) {
+ $s = chr($b1).chr($b2);
+ if (!concordance($s))
+ echo "Discordance for ".bin2hex($s),"\n";
+ }
+}
+
+
+for ($b1 = 0xE0; $b1 < 0xEF; $b1++) {
+ for ($b2 = 0x80; $b2 < 0xBF; $b2++) {
+ $s = chr($b1).chr($b2)."\x80";
+ if (!concordance($s))
+ echo "Discordance for ".bin2hex($s),"\n";
+ $s = chr($b1).chr($b2)."\xBF";
+ if (!concordance($s))
+ echo "Discordance for ".bin2hex($s),"\n";
+ }
+}
+
+for ($b1 = 0xF0; $b1 < 0xFF; $b1++) {
+ for ($b2 = 0x80; $b2 < 0xBF; $b2++) {
+ $s = chr($b1).chr($b2)."\x80\x80";
+ if (!concordance($s))
+ echo "Discordance for ".bin2hex($s),"\n";
+ $s = chr($b1).chr($b2)."\xBF\x80";
+ if (!concordance($s))
+ echo "Discordance for ".bin2hex($s),"\n";
+ $s = chr($b1).chr($b2)."\x80\xBF";
+ if (!concordance($s))
+ echo "Discordance for ".bin2hex($s),"\n";
+ $s = chr($b1).chr($b2)."\xBF\xBF";
+ if (!concordance($s))
+ echo "Discordance for ".bin2hex($s),"\n";
+ }
+}
+echo "Done.\n";
+--EXPECT--
+Done.
diff --git a/ext/standard/tests/strings/htmlentities-utf.phpt b/ext/standard/tests/strings/htmlentities-utf.phpt index 1daafc61d..6a66e4df4 100755 --- a/ext/standard/tests/strings/htmlentities-utf.phpt +++ b/ext/standard/tests/strings/htmlentities-utf.phpt @@ -50,8 +50,8 @@ foreach($strings as $string) { %unicode|string%(16) "266561637574653b" %unicode|string%(0) "" %unicode|string%(0) "" -%unicode|string%(8) "f7bfbfbf" -%unicode|string%(8) "f7bfbfbf" +%unicode|string%(0) "" +%unicode|string%(0) "" %unicode|string%(0) "" %unicode|string%(0) "" %unicode|string%(0) "" diff --git a/ext/standard/tests/strings/htmlentities17.phpt b/ext/standard/tests/strings/htmlentities17.phpt index b203e7c3e..d9e67a9b8 100644 --- a/ext/standard/tests/strings/htmlentities17.phpt +++ b/ext/standard/tests/strings/htmlentities17.phpt @@ -3,7 +3,6 @@ htmlentities() / html_entity_decode() #8592 - #9002 table test --FILE-- <?php $tests = array( - array(8768, '≀', "e28980"), array(8853, '⊕', "e28a95"), array(8855, '⊗', "e28a97"), array(8869, '⊥', "e28aa5"), @@ -26,7 +25,6 @@ foreach ($tests as $test) { } ?> --EXPECT-- -string(8) "≀" string(7) "⊕" string(8) "⊗" string(6) "⊥" @@ -37,7 +35,6 @@ string(8) "⌊" string(8) "⌋" string(6) "⟨" string(6) "⟩" -string(6) "e28980" string(6) "e28a95" string(6) "e28a97" string(6) "e28aa5" diff --git a/ext/standard/tests/strings/parse_str_basic3.phpt b/ext/standard/tests/strings/parse_str_basic3.phpt index 0cc761615..06e614374 100644 --- a/ext/standard/tests/strings/parse_str_basic3.phpt +++ b/ext/standard/tests/strings/parse_str_basic3.phpt @@ -91,7 +91,7 @@ var_dump($res); ?> ===DONE=== --EXPECTF-- -Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0 +Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0 *** Testing parse_str() : basic functionality *** Test string with array values diff --git a/ext/standard/tests/url/bug52327.phpt b/ext/standard/tests/url/bug52327.phpt new file mode 100644 index 000000000..fb2e0fa25 --- /dev/null +++ b/ext/standard/tests/url/bug52327.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #52327 (base64_decode() improper handling of leading padding) +--FILE-- +<?php +var_dump( + base64_decode('=VGhl=ICc9=JyBz=eW1i=b2xz=IGFy=ZW4n=dCBh=bGxv=d2Vk=IHdo=ZXJl=IGkg=cHV0=IHRo=ZW0g=by5P'), + base64_decode('=VGhl=ICc9=JyBz=eW1i=b2xz=IGFy=ZW4n=dCBh=bGxv=d2Vk=IHdo=ZXJl=IGkg=cHV0=IHRo=ZW0g=by5P', true) +); +?> +--EXPECT-- +string(51) "The '=' symbols aren't allowed where i put them o.O" +bool(false) diff --git a/ext/standard/tests/url/bug53248.phpt b/ext/standard/tests/url/bug53248.phpt new file mode 100644 index 000000000..5e31c510d --- /dev/null +++ b/ext/standard/tests/url/bug53248.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #53248 (rawurlencode RFC 3986 EBCDIC support) +--FILE-- +<?php + +var_dump(rawurlencode('A1_-.~')); +var_dump(rawurldecode('%41%31%5F%2D%2E%7E')); + +?> +--EXPECTF-- +string(6) "A1_-.~" +string(6) "A1_-.~"
\ No newline at end of file |
