add string tests

pull/2/head
韩天峰 2 months ago
parent 1ec0f3a2e0
commit 10fd8fe0ce
  1. 88
      tests/std/strings/004.phpt
  2. 28
      tests/std/strings/005.phpt
  3. 21
      tests/std/strings/006.phpt
  4. 16
      tests/std/strings/007-win32.phpt
  5. 18
      tests/std/strings/007.phpt
  6. 23
      tests/std/strings/add-and-stripcslashes.phpt
  7. 20
      tests/std/strings/add-and-stripslashes.phpt
  8. 73
      tests/std/strings/addcslashes_001.phpt
  9. 37
      tests/std/strings/addcslashes_002.phpt
  10. 42
      tests/std/strings/addcslashes_003.phpt
  11. 16
      tests/std/strings/addcslashes_005.phpt
  12. 32
      tests/std/strings/addslashes_basic.phpt
  13. 189
      tests/std/strings/addslashes_variation2.phpt
  14. 51
      tests/std/strings/basename.phpt
  15. 172
      tests/std/strings/basename_basic.phpt
  16. 19
      tests/std/strings/basename_invalid_path.phpt
  17. 16
      tests/std/strings/basename_invalid_path_win.phpt
  18. 214
      tests/std/strings/basename_variation.phpt
  19. 14
      tests/std/strings/bin2hex.phpt
  20. 11
      tests/std/strings/bin2hex_001.phpt
  21. 43
      tests/std/strings/bin2hex_basic.phpt
  22. 11
      tests/std/strings/bug20108.phpt
  23. 14
      tests/std/strings/bug20169.phpt
  24. 25
      tests/std/strings/bug20261.phpt
  25. 17
      tests/std/strings/bug20927.phpt
  26. 11
      tests/std/strings/bug20934.phpt
  27. 8
      tests/std/strings/bug21338.phpt
  28. 18
      tests/std/strings/bug21453.phpt
  29. 39
      tests/std/strings/bug21730.phpt
  30. 15
      tests/std/strings/bug21744.phpt
  31. 24
      tests/std/strings/bug22008.phpt
  32. 10
      tests/std/strings/bug22187.phpt
  33. 11
      tests/std/strings/bug22207.phpt
  34. 35
      tests/std/strings/bug22224.phpt
  35. 9
      tests/std/strings/bug22227.phpt
  36. 30
      tests/std/strings/bug23650.phpt
  37. 19
      tests/std/strings/bug23894_32bit.phpt
  38. 19
      tests/std/strings/bug23894_64bit.phpt
  39. 17
      tests/std/strings/bug24098.phpt
  40. 14
      tests/std/strings/bug24281.phpt
  41. 27
      tests/std/strings/bug24312.phpt
  42. 29
      tests/std/strings/bug25671.phpt
  43. 12
      tests/std/strings/bug25707.phpt
  44. 9
      tests/std/strings/bug26878.phpt
  45. 34
      tests/std/strings/bug26973.phpt
  46. 15
      tests/std/strings/bug27276.phpt
  47. 25
      tests/std/strings/bug27278.phpt
  48. 18
      tests/std/strings/bug27295.phpt
  49. 21
      tests/std/strings/bug27457.phpt
  50. 8
      tests/std/strings/bug27675.phpt
  51. 13
      tests/std/strings/bug28386.phpt
  52. 10
      tests/std/strings/bug28633.phpt
  53. 14
      tests/std/strings/bug29075.phpt
  54. 8
      tests/std/strings/bug29119.phpt
  55. 10
      tests/std/strings/bug29538.phpt
  56. 14
      tests/std/strings/bug33076.phpt
  57. 13
      tests/std/strings/bug33605.phpt
  58. 10
      tests/std/strings/bug34214.phpt
  59. 29
      tests/std/strings/bug35817.phpt
  60. 29
      tests/std/strings/bug36148.phpt
  61. 15
      tests/std/strings/bug36306.phpt
  62. 16
      tests/std/strings/bug36392.phpt
  63. 29
      tests/std/strings/bug36944.phpt
  64. 17
      tests/std/strings/bug37244.phpt
  65. 8
      tests/std/strings/bug37262.phpt
  66. 13
      tests/std/strings/bug38322.phpt
  67. 25
      tests/std/strings/bug38770.phpt
  68. 22
      tests/std/strings/bug39032.phpt
  69. 13
      tests/std/strings/bug39350.phpt
  70. 45
      tests/std/strings/bug39621.phpt
  71. 17
      tests/std/strings/bug39873.phpt
  72. 8
      tests/std/strings/bug40432.phpt
  73. 13
      tests/std/strings/bug40637.phpt
  74. 13
      tests/std/strings/bug40704.phpt
  75. 95
      tests/std/strings/bug40754.phpt
  76. 20
      tests/std/strings/bug40915.phpt
  77. 51
      tests/std/strings/bug42107.phpt
  78. 15
      tests/std/strings/bug42208.phpt
  79. 12
      tests/std/strings/bug43927.phpt
  80. 13
      tests/std/strings/bug43957.phpt
  81. 14
      tests/std/strings/bug44242.phpt
  82. 50
      tests/std/strings/bug44703.phpt
  83. 8
      tests/std/strings/bug45166.phpt
  84. 23
      tests/std/strings/bug45485.phpt
  85. 25
      tests/std/strings/bug46578.phpt
  86. 16
      tests/std/strings/bug47168.phpt
  87. 23
      tests/std/strings/bug47322.phpt
  88. 14
      tests/std/strings/bug47443.phpt
  89. 52
      tests/std/strings/bug47481.phpt
  90. 36
      tests/std/strings/bug47842.phpt
  91. 31
      tests/std/strings/bug48709.phpt
  92. 29
      tests/std/strings/bug49687.phpt
  93. 4139
      tests/std/strings/bug49785.phpt
  94. 12
      tests/std/strings/bug50052.phpt
  95. 10
      tests/std/strings/bug50847.phpt
  96. 11
      tests/std/strings/bug51059.phpt
  97. 34
      tests/std/strings/bug51899.phpt
  98. 41
      tests/std/strings/bug53021.phpt
  99. 17
      tests/std/strings/bug53319.phpt
  100. 590
      tests/std/strings/bug54055.phpt
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,88 @@
--TEST--
Testing randomization of shuffle() and str_shuffle().
--SKIPIF--
<?php
echo 'skip AOT limitation';
?>
--FILE--
<?php
function stats($f, $a) {
$times = 90000;
print "$f\n";
ksort($a);
foreach($a as $k => $v)
print "$k: $v: " . sprintf('%0.3f', $v / $times) . "\n";
}
$a = array();
$times = 90000;
for ($i = 0; $i < $times; $i++) {
$p = range(1,4);
shuffle($p);
$s = join('', $p);
if (empty($a[$s])) $a[$s] = 0;
$a[$s]++;
}
stats('shuffle', $a);
$a = array();
$times = 90000;
for ($i = 0; $i < $times; $i++) {
$p = '1234';
$s = str_shuffle($p);
if (empty($a[$s])) $a[$s] = 0;
$a[$s]++;
}
stats('str_shuffle', $a);
?>
--EXPECTREGEX--
shuffle
1234: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
1243: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
1324: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
1342: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
1423: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
1432: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
2134: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
2143: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
2314: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
2341: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
2413: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
2431: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
3124: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
3142: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
3214: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
3241: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
3412: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
3421: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
4123: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
4132: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
4213: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
4231: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
4312: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
4321: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
str_shuffle
1234: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
1243: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
1324: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
1342: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
1423: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
1432: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
2134: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
2143: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
2314: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
2341: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
2413: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
2431: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
3124: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
3142: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
3214: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
3241: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
3412: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
3421: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
4123: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
4132: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
4213: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
4231: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
4312: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]
4321: [34][0-9][0-9][0-9]: 0.0[3-4][0-9]

@ -0,0 +1,28 @@
--TEST--
highlight_string(), output buffer and error level
--SKIPIF--
<?php
echo 'skip AOT limitation';
?>
--INI--
error_reporting=8192
--FILE--
<?php
echo "hello\n";
$string = str_repeat("A", 1024);
var_dump(error_reporting());
highlight_string($string, true);
var_dump(ob_get_contents());
var_dump(error_reporting());
echo "Done\n";
?>
--EXPECT--
hello
int(8192)
bool(false)
int(8192)
Done

@ -0,0 +1,21 @@
--TEST--
highlight_file() and output buffer
--SKIPIF--
<?php
echo 'skip AOT limitation';
?>
--FILE--
<?php
$file = str_repeat("A", 1024);
var_dump(highlight_file($file, true));
var_dump(ob_get_contents());
?>
--EXPECTF--
Warning: highlight_file(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA): Failed to open stream: %s006.php on line %d
Warning: highlight_file(): Failed opening 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' for highlighting in %s006.php on line %d
bool(false)
bool(false)

@ -0,0 +1,16 @@
--TEST--
php_strip_whitespace() and output buffer
--SKIPIF--
<?php if( substr(PHP_OS, 0, 3) != "WIN") die('skip Windows only test');?>
--FILE--
<?php
$file = str_repeat("A", PHP_MAXPATHLEN - strlen(__DIR__ . DIRECTORY_SEPARATOR . __FILE__));
var_dump(php_strip_whitespace($file));
var_dump(ob_get_contents());
?>
--EXPECTF--
Warning: php_strip_whitespace(%s): Failed to open stream: No such file or directory in %s on line %d
string(0) ""
bool(false)

@ -0,0 +1,18 @@
--TEST--
php_strip_whitespace() and output buffer
--SKIPIF--
<?php
echo 'skip AOT compilation or behavior differs';
?>
--FILE--
<?php
$file = str_repeat("A", PHP_MAXPATHLEN - strlen(__DIR__ . DIRECTORY_SEPARATOR . __FILE__));
var_dump(php_strip_whitespace($file));
var_dump(ob_get_contents());
?>
--EXPECTF--
Warning: php_strip_whitespace(%s): Failed to open stream: File%Sname too long in %s007.php on line %d
string(0) ""
bool(false)

@ -0,0 +1,23 @@
--TEST--
addcslashes() and stripcslashes() function
--FILE--
<?php
echo addcslashes("", "")."\n";
echo addcslashes("", "burp")."\n";
echo addcslashes("kaboemkara!", "")."\n";
echo addcslashes("foobarbaz", 'bar')."\n";
echo addcslashes('foo[ ]', 'A..z')."\n";
echo @addcslashes("zoo['.']", 'z..A')."\n";
echo addcslashes('abcdefghijklmnopqrstuvwxyz', "a\145..\160z")."\n";
echo "\n\r" == stripcslashes('\n\r'),"\n";
echo stripcslashes('\065\x64')."\n";
echo stripcslashes('')."\n";
?>
--EXPECT--
kaboemkara!
foo\b\a\r\b\az
\f\o\o\[ \]
\zoo['\.']
\abcd\e\f\g\h\i\j\k\l\m\n\o\pqrstuvwxy\z
1
5d

@ -0,0 +1,20 @@
--TEST--
addslashes() and stripslashes() functions
--FILE--
<?php
$input = '';
for($i=0; $i<512; $i++) {
$input .= chr($i%256);
}
echo "Normal: ";
if($input === stripslashes(addslashes($input))) {
echo "OK\n";
} else {
echo "FAILED\n";
}
?>
--EXPECT--
Normal: OK

@ -0,0 +1,73 @@
--TEST--
Test addcslashes() function (variation 1)
--INI--
precision=14
--FILE--
<?php
echo "*** Testing addcslashes() for basic operations ***\n";
/* checking normal operation of addcslashes */
$string = "goodyear12345NULL\0truefalse\a\v\f\b\n\r\t";
$charlist = array (
2,
array(5,6,7),
"a",
"\0",
"\n",
"\r",
"\t",
"\a",
"\v",
"\b",
"\f"
);
/* loop prints string with backslashes before characters
mentioned in $char using addcslashes() */
$counter = 1;
foreach($charlist as $char) {
echo "-- Iteration $counter --\n";
try {
var_dump( addcslashes($string, $char) );
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
$counter++;
}
echo "Done\n";
?>
--EXPECTF--
*** Testing addcslashes() for basic operations ***
-- Iteration 1 --
string(37) "goodyear1\2345NULL%0truefalse\a \b
"
-- Iteration 2 --
addcslashes(): Argument #2 ($characters) must be of type string, array given
-- Iteration 3 --
string(39) "goodye\ar12345NULL%0truef\alse\\a \b
"
-- Iteration 4 --
string(39) "goodyear12345NULL\000truefalse\a \b
"
-- Iteration 5 --
string(37) "goodyear12345NULL%0truefalse\a \b\n "
-- Iteration 6 --
string(37) "goodyear12345NULL%0truefalse\a \b
\r "
-- Iteration 7 --
string(37) "goodyear12345NULL%0truefalse\a \b
\t"
-- Iteration 8 --
string(41) "goodye\ar12345NULL%0truef\alse\\\a \\b
"
-- Iteration 9 --
string(37) "goodyear12345NULL%0truefalse\a\v \b
"
-- Iteration 10 --
string(39) "goodyear12345NULL%0truefalse\\a \\\b
"
-- Iteration 11 --
string(37) "goodyear12345NULL%0truefalse\a \f\b
"
Done

@ -0,0 +1,37 @@
--TEST--
Test addcslashes() function (variation 2)
--SKIPIF--
<?php
echo 'skip AOT compiler requires __toString() to have explicit :string return type';
?>
--INI--
precision=14
--FILE--
<?php
$string = "goodyear12345NULL\0truefalse\a\v\f\b\n\r\t";
/* charlist "\0..\37" would escape all characters with ASCII code between 0 and 31 */
echo "\n*** Testing addcslashes() with ASCII code between 0 and 31 ***\n";
var_dump( addcslashes($string, "\0..\37") );
/* Checking OBJECTS type */
echo "\n*** Testing addcslashes() with objects ***\n";
class string1
{
public function __toString() {
return "Object";
}
}
$obj = new string1;
var_dump( addcslashes($obj, "b") );
echo "Done\n";
?>
--EXPECT--
*** Testing addcslashes() with ASCII code between 0 and 31 ***
string(44) "goodyear12345NULL\000truefalse\a\v\f\b\n\r\t"
*** Testing addcslashes() with objects ***
string(7) "O\bject"
Done

@ -0,0 +1,42 @@
--TEST--
Test addcslashes() function (variation 3)
--INI--
precision=14
--FILE--
<?php
/* Miscellaneous input */
echo "\n*** Testing addcslashes() with miscellaneous input arguments ***\n";
var_dump( addcslashes("", "") );
var_dump( addcslashes("", "burp") );
var_dump( addcslashes("kaboemkara!", "") );
var_dump( addcslashes("foobarbaz", 'bar') );
var_dump( addcslashes('foo[ ]', 'A..z') );
var_dump( @addcslashes("zoo['.']", 'z..A') );
var_dump( addcslashes('abcdefghijklmnopqrstuvwxyz', "a\145..\160z") );
var_dump( addcslashes( 123, 123 ) );
var_dump( addcslashes( 0, 0 ) );
var_dump( addcslashes( "\0" , 0 ) );
var_dump( addcslashes( -1.234578, 3 ) );
var_dump( addcslashes( " ", " ") );
var_dump( addcslashes( "string\x00with\x00NULL", "\0") );
echo "Done\n";
?>
--EXPECTF--
*** Testing addcslashes() with miscellaneous input arguments ***
string(0) ""
string(0) ""
string(11) "kaboemkara!"
string(14) "foo\b\a\r\b\az"
string(11) "\f\o\o\[ \]"
string(10) "\zoo['\.']"
string(40) "\abcd\e\f\g\h\i\j\k\l\m\n\o\pqrstuvwxy\z"
string(6) "\1\2\3"
string(2) "\0"
string(1) "%0"
string(10) "-1.2\34578"
string(2) "\ "
string(22) "string\000with\000NULL"
Done

@ -0,0 +1,16 @@
--TEST--
addcslashes(); function test with warning
--SKIPIF--
<?php
echo 'skip AOT limitation';
?>
--CREDITS--
marcosptf - <marcosptf@yahoo.com.br>
#phptestfest PHPSP on Google - Sao Paulo - Brazil - 2014-06-05
--FILE--
<?php
echo addcslashes("zoo['.']","z..A");
?>
--EXPECTF--
Warning: addcslashes(): Invalid '..'-range, '..'-range needs to be incrementing in %s on line %d
\zoo['\.']

@ -0,0 +1,32 @@
--TEST--
Test addslashes() function : basic functionality
--FILE--
<?php
/*
* Testing addslashes() with strings containing characters that can be prefixed with backslash
* by the function
*/
echo "*** Testing addslashes() : basic functionality ***\n";
// Initialize all required variables
$str_array = array( "How's everybody", // string containing single quote
'Are you "JOHN"?', // string with double quotes
'c:\php\addslashes', // string with backslashes
"hello\0world" // string with nul character
);
// Calling addslashes() with all arguments
foreach( $str_array as $str ) {
var_dump( addslashes($str) );
}
echo "Done\n";
?>
--EXPECT--
*** Testing addslashes() : basic functionality ***
string(16) "How\'s everybody"
string(17) "Are you \"JOHN\"?"
string(19) "c:\\php\\addslashes"
string(12) "hello\0world"
Done

@ -0,0 +1,189 @@
--TEST--
Test addslashes() function : usage variations - strings with characters to be backslashed
--FILE--
<?php
/*
* Test addslashes() with various strings containing characters that can be backslashed
*/
echo "*** Testing addslashes() : with various strings containing characters to be backslashed ***\n";
// initialising a heredoc string
$heredoc_string = <<<EOT
This is line 1 of 'heredoc' string
This is line 2 of "heredoc" string
EOT;
$heredoc_null_string =<<<EOT
EOT;
// initialising the string array
$str_array = array(
// string without any characters that can be backslashed
'Hello world',
// string with single quotes
"how're you doing?",
"don't disturb u'r neighbours",
"don't disturb u'r neighbours''",
'',
'\'',
"'",
// string with double quotes
'he said, "he will be on leave"',
'he said, ""he will be on leave"',
'"""PHP"""',
"",
"\"",
'"',
"hello\"",
// string with backslash characters
'Is your name Ram\Krishna?',
'\\0.0.0.0',
'c:\php\testcase\addslashes',
'\\',
// string with nul characters
'hello'.chr(0).'world',
chr(0).'hello'.chr(0),
chr(0).chr(0).'hello',
chr(0),
// mixed strings
"'\\0.0.0.0'",
"'\\0.0.0.0'".chr(0),
chr(0)."'c:\php\'",
'"\\0.0.0.0"',
'"c:\php\"'.chr(0)."'",
'"hello"'."'world'".chr(0).'//',
// string with hexadecimal number
"0xABCDEF0123456789",
"\x00",
'!@#$%&*@$%#&/;:,<>',
"hello\x00world",
// heredoc strings
$heredoc_string,
$heredoc_null_string
);
$count = 1;
// looping to test for all strings in $str_array
foreach( $str_array as $str ) {
echo "\n-- Iteration $count --\n";
var_dump( addslashes($str) );
$count ++;
}
echo "Done\n";
?>
--EXPECTF--
*** Testing addslashes() : with various strings containing characters to be backslashed ***
-- Iteration 1 --
string(11) "Hello world"
-- Iteration 2 --
string(18) "how\'re you doing?"
-- Iteration 3 --
string(30) "don\'t disturb u\'r neighbours"
-- Iteration 4 --
string(34) "don\'t disturb u\'r neighbours\'\'"
-- Iteration 5 --
string(0) ""
-- Iteration 6 --
string(2) "\'"
-- Iteration 7 --
string(2) "\'"
-- Iteration 8 --
string(32) "he said, \"he will be on leave\""
-- Iteration 9 --
string(34) "he said, \"\"he will be on leave\""
-- Iteration 10 --
string(15) "\"\"\"PHP\"\"\""
-- Iteration 11 --
string(0) ""
-- Iteration 12 --
string(2) "\""
-- Iteration 13 --
string(2) "\""
-- Iteration 14 --
string(7) "hello\""
-- Iteration 15 --
string(26) "Is your name Ram\\Krishna?"
-- Iteration 16 --
string(9) "\\0.0.0.0"
-- Iteration 17 --
string(29) "c:\\php\\testcase\\addslashes"
-- Iteration 18 --
string(2) "\\"
-- Iteration 19 --
string(12) "hello\0world"
-- Iteration 20 --
string(9) "\0hello\0"
-- Iteration 21 --
string(9) "\0\0hello"
-- Iteration 22 --
string(2) "\0"
-- Iteration 23 --
string(13) "\'\\0.0.0.0\'"
-- Iteration 24 --
string(15) "\'\\0.0.0.0\'\0"
-- Iteration 25 --
string(15) "\0\'c:\\php\\\'"
-- Iteration 26 --
string(13) "\"\\0.0.0.0\""
-- Iteration 27 --
string(17) "\"c:\\php\\\"\0\'"
-- Iteration 28 --
string(22) "\"hello\"\'world\'\0//"
-- Iteration 29 --
string(18) "0xABCDEF0123456789"
-- Iteration 30 --
string(2) "\0"
-- Iteration 31 --
string(18) "!@#$%&*@$%#&/;:,<>"
-- Iteration 32 --
string(12) "hello\0world"
-- Iteration 33 --
string(7%d) "This is line 1 of \'heredoc\' string
This is line 2 of \"heredoc\" string"
-- Iteration 34 --
string(0) ""
Done

@ -0,0 +1,51 @@
--TEST--
basename() function
--FILE--
<?php
// simple checks
var_dump(basename("bar"));
var_dump(basename("/foo/bar"));
var_dump(basename("/bar"));
// simple checks with trailing slashes
var_dump(basename("bar/"));
var_dump(basename("/foo/bar/"));
var_dump(basename("/bar/"));
// suffix removal checks
var_dump(basename("bar.gz", ".gz"));
var_dump(basename("/foo/bar.gz", ".gz"));
var_dump(basename("/bar.gz", ".gz"));
// suffix removal checks with trailing slashes
var_dump(basename("bar.gz/", ".gz"));
var_dump(basename("/foo/bar.gz/", ".gz"));
var_dump(basename("/bar.gz/", ".gz"));
// suffix removal checks
var_dump(basename("/.gz", ".gz"));
var_dump(basename("/foo/.gz", ".gz"));
var_dump(basename("/.gz", ".gz"));
// binary safe?
var_dump(basename("foo".chr(0)."bar"));
var_dump(basename("foo".chr(0)."bar.gz", ".gz"));
?>
--EXPECTF--
string(3) "bar"
string(3) "bar"
string(3) "bar"
string(3) "bar"
string(3) "bar"
string(3) "bar"
string(3) "bar"
string(3) "bar"
string(3) "bar"
string(3) "bar"
string(3) "bar"
string(3) "bar"
string(3) ".gz"
string(3) ".gz"
string(3) ".gz"
string(7) "foo%0bar"
string(7) "foo%0bar"

@ -0,0 +1,172 @@
--TEST--
Test basename() function : basic functionality
--SKIPIF--
<?php
echo 'skip AOT requires all executable code be in functions';
?>
--FILE--
<?php
$file_paths = array (
/* simple paths */
array("bar"),
array("/foo/bar"),
array("foo/bar"),
array("/bar"),
/* simple paths with trailing slashes */
array("bar/"),
array("/bar/"),
array("/foo/bar/"),
array("foo/bar/"),
array("/bar/"),
/* paths with suffix removal */
array("bar.gz", ".gz"),
array("bar.gz", "bar.gz"),
array("/foo/bar.gz", ".gz"),
array("foo/bar.gz", ".gz"),
array("/bar.gz", ".gz"),
/* paths with suffix and trailing slashes with suffix removal*/
array("bar.gz/", ".gz"),
array("/bar.gz/", ".gz"),
array("/foo/bar.gz/", ".gz"),
array("foo/bar.gz/", ".gz"),
array("/bar.gz/", ".gz"),
/* paths with basename only suffix, with suffix removal*/
array("/.gz", ".gz"),
array(".gz", ".gz"),
array("/foo/.gz", ".gz"),
/* paths with basename only suffix & trailing slashes, with suffix removal*/
array(".gz/", ".gz"),
array("/foo/.gz/", ".gz"),
array("foo/.gz/", ".gz"),
/* paths with binary value to check if the function is binary safe*/
array("foo".chr(0)."bar"),
array("/foo".chr(0)."bar"),
array("/foo".chr(0)."bar/"),
array("foo".chr(0)."bar/"),
array("foo".chr(0)."bar/test"),
array("/foo".chr(0)."bar/bar.gz", ".gz"),
array("/foo".chr(0)."bar/bar.gz")
);
function check_basename( $path_arrays ) {
$loop_counter = 1;
foreach ($path_arrays as $path) {
echo "\n--Iteration $loop_counter--\n"; $loop_counter++;
if( 1 == count($path) ) { // no suffix provided
var_dump( basename($path[0]) );
} else { // path as well as suffix provided,
var_dump( basename($path[0], $path[1]) );
}
}
}
echo "*** Testing basic operations ***\n";
check_basename( $file_paths );
echo "Done\n";
?>
--EXPECTF--
*** Testing basic operations ***
--Iteration 1--
string(3) "bar"
--Iteration 2--
string(3) "bar"
--Iteration 3--
string(3) "bar"
--Iteration 4--
string(3) "bar"
--Iteration 5--
string(3) "bar"
--Iteration 6--
string(3) "bar"
--Iteration 7--
string(3) "bar"
--Iteration 8--
string(3) "bar"
--Iteration 9--
string(3) "bar"
--Iteration 10--
string(3) "bar"
--Iteration 11--
string(6) "bar.gz"
--Iteration 12--
string(3) "bar"
--Iteration 13--
string(3) "bar"
--Iteration 14--
string(3) "bar"
--Iteration 15--
string(3) "bar"
--Iteration 16--
string(3) "bar"
--Iteration 17--
string(3) "bar"
--Iteration 18--
string(3) "bar"
--Iteration 19--
string(3) "bar"
--Iteration 20--
string(3) ".gz"
--Iteration 21--
string(3) ".gz"
--Iteration 22--
string(3) ".gz"
--Iteration 23--
string(3) ".gz"
--Iteration 24--
string(3) ".gz"
--Iteration 25--
string(3) ".gz"
--Iteration 26--
string(7) "foo%0bar"
--Iteration 27--
string(7) "foo%0bar"
--Iteration 28--
string(7) "foo%0bar"
--Iteration 29--
string(7) "foo%0bar"
--Iteration 30--
string(4) "test"
--Iteration 31--
string(3) "bar"
--Iteration 32--
string(6) "bar.gz"
Done

@ -0,0 +1,19 @@
--TEST--
Test basename() function : usage variations with invalid paths
--SKIPIF--
<?php
if((substr(PHP_OS, 0, 3) == "WIN"))
die('skip not for Windows"');
?>
--FILE--
<?php
setlocale(LC_CTYPE, "C");
var_dump(bin2hex(basename("\xff")));
var_dump(bin2hex(basename("a\xffb")));
echo "Done\n";
?>
--EXPECT--
string(2) "ff"
string(6) "61ff62"
Done

@ -0,0 +1,16 @@
--TEST--
Test basename() function : usage variations with invalid paths
--SKIPIF--
<?php
if((substr(PHP_OS, 0, 3) != "WIN"))
die('skip Run only on Windows"');
?>
--FILE--
<?php
var_dump(basename("\377"));
echo "Done\n";
?>
--EXPECTF--
string(1) "%c"
Done

@ -0,0 +1,214 @@
--TEST--
Test basename() function : usage variations
--SKIPIF--
<?php
echo 'skip AOT requires all executable code be in functions';
?>
--FILE--
<?php
$file_path_variations = array (
/* paths with shortcut home dir char, with suffix variation */
array("~/home/user/bar"),
array("~/home/user/bar", ""),
array("~/home/user/bar", ' '),
array("~/home/user/bar.tar", ".tar"),
array("~/home/user/bar.tar", "~"),
array("~/home/user/bar.tar/", "~"),
array("~/home/user/bar.tar/", ""),
array("~/home/user/bar.tar", ''),
array("~/home/user/bar.tar", " "),
/* paths with hostname:dir notation, with suffix variation */
array("hostname:/home/usr/bar.tar"),
array("hostname:/home/user/bar.tar", "home"),
array("hostname:/home/user/tbar.gz", "bar.gz"),
array("hostname:/home/user/tbar.gz", "/bar.gz"),
array("hostname:/home/user/tbar.gz", "/bar.gz/"),
array("hostname:/home/user/tbar.gz/", "/bar.gz/"),
array("hostname:/home/user/tbar.gz/", "/bar.gz/"),
array("hostname:/home/user/My Pics.gz/", "/bar.gz/"),
array("hostname:/home/user/My Pics.gz/", "Pics.gz/"),
array("hostname:/home/user/My Pics.gz/", "Pics.gz"),
array("hostname:/home/user/My Pics.gz/", ".gz"),
array("hostname:/home/user/My Pics.gz/"),
array("hostname:/home/user/My Pics.gz/", ' '),
array("hostname:/home/user/My Pics.gz/", ''),
array("hostname:/home/user/My Pics.gz/", "My Pics.gz"),
/* paths with numeirc strings */
array("10.5"),
array("10.5", ".5"),
array("10.5", "10.5"),
array("10"),
array("105", "5"),
array("/10.5"),
array("10.5/"),
array("10/10.gz"),
array("0"),
array('0'),
/* paths and suffix given as same */
array("bar.gz", "bar.gz"),
array("/bar.gz", "/bar.gz"),
array("/bar.gz/", "/bar.gz/"),
array(" ", " "),
array(' ', ' '),
/* path with spaces */
array(" "),
array(' '),
/* empty paths */
array(""),
array(''),
);
function check_basename( $path_arrays ) {
$loop_counter = 1;
foreach ($path_arrays as $path) {
echo "\n--Iteration $loop_counter--\n"; $loop_counter++;
if( 1 == count($path) ) { // no suffix provided
var_dump( basename($path[0]) );
} else { // path as well as suffix provided,
var_dump( basename($path[0], $path[1]) );
}
}
}
echo "*** Testing possible variations in path and suffix ***\n";
check_basename( $file_path_variations );
echo "Done\n";
?>
--EXPECT--
*** Testing possible variations in path and suffix ***
--Iteration 1--
string(3) "bar"
--Iteration 2--
string(3) "bar"
--Iteration 3--
string(3) "bar"
--Iteration 4--
string(3) "bar"
--Iteration 5--
string(7) "bar.tar"
--Iteration 6--
string(7) "bar.tar"
--Iteration 7--
string(7) "bar.tar"
--Iteration 8--
string(7) "bar.tar"
--Iteration 9--
string(7) "bar.tar"
--Iteration 10--
string(7) "bar.tar"
--Iteration 11--
string(7) "bar.tar"
--Iteration 12--
string(1) "t"
--Iteration 13--
string(7) "tbar.gz"
--Iteration 14--
string(7) "tbar.gz"
--Iteration 15--
string(7) "tbar.gz"
--Iteration 16--
string(7) "tbar.gz"
--Iteration 17--
string(10) "My Pics.gz"
--Iteration 18--
string(10) "My Pics.gz"
--Iteration 19--
string(3) "My "
--Iteration 20--
string(7) "My Pics"
--Iteration 21--
string(10) "My Pics.gz"
--Iteration 22--
string(10) "My Pics.gz"
--Iteration 23--
string(10) "My Pics.gz"
--Iteration 24--
string(10) "My Pics.gz"
--Iteration 25--
string(4) "10.5"
--Iteration 26--
string(2) "10"
--Iteration 27--
string(4) "10.5"
--Iteration 28--
string(2) "10"
--Iteration 29--
string(2) "10"
--Iteration 30--
string(4) "10.5"
--Iteration 31--
string(4) "10.5"
--Iteration 32--
string(5) "10.gz"
--Iteration 33--
string(1) "0"
--Iteration 34--
string(1) "0"
--Iteration 35--
string(6) "bar.gz"
--Iteration 36--
string(6) "bar.gz"
--Iteration 37--
string(6) "bar.gz"
--Iteration 38--
string(1) " "
--Iteration 39--
string(1) " "
--Iteration 40--
string(1) " "
--Iteration 41--
string(1) " "
--Iteration 42--
string(0) ""
--Iteration 43--
string(0) ""
Done

@ -0,0 +1,14 @@
--TEST--
bin2hex() function
--FILE--
<?php
$s = '';
for($i=0; $i<256; $i++) {
$s .= chr($i);
}
echo bin2hex($s)."\n";
echo bin2hex("abc")."\n";
?>
--EXPECT--
000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
616263

@ -0,0 +1,11 @@
--TEST--
bin2hex(); function test
--CREDITS--
marcosptf - <marcosptf@yahoo.com.br>
#phptestfest PHPSP on Google - Sao Paulo - Brazil - 2014-06-05
--FILE--
<?php
echo bin2hex("123456");
?>
--EXPECT--
313233343536

@ -0,0 +1,43 @@
--TEST--
Test bin2hex() function : basic functionality
--FILE--
<?php
echo "*** Testing bin2hex() : basic functionality ***\n";
// array with different values for $string
$strings = array (
//double quoted strings
/*1*/ "Here is a simple string",
"\t This String contains \t\t some control characters\r\n",
"\x90\x91\x00\x93\x94\x90\x91\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
//single quoted strings
/*4*/ 'Here is a simple string',
'\t This String contains \t\t some control characters\r\n',
'\x90\x91\x00\x93\x94\x90\x91\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f',
);
// loop through with each element of the $strings array to test bin2hex() function
$count = 1;
foreach($strings as $string) {
echo "-- Iteration $count --\n";
var_dump(bin2hex($string));
$count ++;
}
?>
--EXPECT--
*** Testing bin2hex() : basic functionality ***
-- Iteration 1 --
string(46) "4865726520697320612073696d706c6520737472696e67"
-- Iteration 2 --
string(102) "09205468697320537472696e6720636f6e7461696e7320090920736f6d6520636f6e74726f6c20636861726163746572730d0a"
-- Iteration 3 --
string(36) "9091009394909195969798999a9b9c9d9e9f"
-- Iteration 4 --
string(46) "4865726520697320612073696d706c6520737472696e67"
-- Iteration 5 --
string(112) "5c74205468697320537472696e6720636f6e7461696e73205c745c7420736f6d6520636f6e74726f6c20636861726163746572735c725c6e"
-- Iteration 6 --
string(144) "5c7839305c7839315c7830305c7839335c7839345c7839305c7839315c7839355c7839365c7839375c7839385c7839395c7839615c7839625c7839635c7839645c7839655c783966"

@ -0,0 +1,11 @@
--TEST--
Bug #20108 (Segfault on printf statement)
--FILE--
<?php
$a = "boo";
$z = sprintf("%580.58s\n", $a);
var_dump($z);
?>
--EXPECT--
string(581) " boo
"

@ -0,0 +1,14 @@
--TEST--
Bug #20169 (implode() clobbers first argument)
--FILE--
<?php
@set_time_limit(5);
$delimiter = "|";
echo "delimiter: $delimiter\n";
implode($delimiter, array("foo", "bar"));
echo "delimiter: $delimiter\n";
?>
--EXPECT--
delimiter: |
delimiter: |

@ -0,0 +1,25 @@
--TEST--
Bug #20261 (str_rot13() changes too much)
--FILE--
<?php
$first = "boo";
$second = $first;
$rot = "";
echo "1: ".$first."\n";
echo "2: ".$second."\n";
echo "3: ".$rot."\n";
$rot = str_rot13($second);
echo "1: ".$first."\n";
echo "2: ".$second."\n";
echo "3: ".$rot."\n";
?>
--EXPECT--
1: boo
2: boo
3:
1: boo
2: boo
3: obb

File diff suppressed because one or more lines are too long

@ -0,0 +1,11 @@
--TEST--
Bug #20934 (htmlspecialchars returns latin1 from UTF-8)
--FILE--
<?php
$str = "\xc3\xa0\xc3\xa1";
echo bin2hex($str), "\n";
echo bin2hex(htmlspecialchars($str, ENT_COMPAT, "UTF-8")), "\n";
?>
--EXPECTF--
c3a0c3a1
c3a0c3a1

@ -0,0 +1,8 @@
--TEST--
Bug #20934 (html_entity_decode() crash when "" is passed)
--FILE--
<?php
var_dump(html_entity_decode(""));
?>
--EXPECT--
string(0) ""

@ -0,0 +1,18 @@
--TEST--
Bug #21453 (handling of non-encoded <)
--FILE--
<?php
$test = "
<table>
<tr><td>first cell before < first cell after</td></tr>
<tr><td>second cell before < second cell after</td></tr>
</table>";
var_dump(strip_tags($test));
?>
--EXPECTF--
string(8%d) "
first cell before < first cell after
second cell before < second cell after
"

@ -0,0 +1,39 @@
--TEST--
Bug #21730 (*scanf "%n" conversion flag gives string instead of integer)
--SKIPIF--
<?php
echo 'skip AOT limitation';
?>
--FILE--
<?php
$foo = "ABC = DEF";
$fmt = "%s = %s %n";
$res_a = array();
/* $res_a[2] is supposed to be a integer value that
* represents the number of characters consumed so far
*/
sscanf($foo, $fmt, $res_a[0], $res_a[1], $res_a[2]);
$res_b = sscanf($foo, $fmt);
var_dump($res_a);
var_dump($res_b);
?>
--EXPECT--
array(3) {
[0]=>
string(3) "ABC"
[1]=>
string(3) "DEF"
[2]=>
int(9)
}
array(3) {
[0]=>
string(3) "ABC"
[1]=>
string(3) "DEF"
[2]=>
int(9)
}

@ -0,0 +1,15 @@
--TEST--
Bug #21744 (strip_tags misses exclamation marks in alt text)
--FILE--
<?php
$test = <<< HERE
<a href="test?test\\!!!test">test</a>
<!-- test -->
HERE;
print strip_tags($test, '');
print strip_tags($test, '<a>');
?>
--EXPECT--
test
<a href="test?test\!!!test">test</a>

@ -0,0 +1,24 @@
--TEST--
Bug #22008 (strip_tags() eliminates too much)
--FILE--
<?php
$html = <<< HERE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>test</title>
</head>
<body>
<b>PHP!</b>
</body>
</html>
HERE;
echo trim(strip_tags($html, '<b>'))."\n";
?>
--EXPECT--
test
<b>PHP!</b>

@ -0,0 +1,10 @@
--TEST--
Bug #22187 (possible crash in number_format() function)
--FILE--
<?php
var_dump(number_format(0.0001, 1));
var_dump(number_format(0.0001, 0));
?>
--EXPECT--
string(3) "0.0"
string(1) "0"

@ -0,0 +1,11 @@
--TEST--
Bug #22207 (missing 0 when using the e notation in *printf functions)
--FILE--
<?php
printf("%10.5e\n", 1.1);
var_dump(sprintf("%10.5e\n", 1.1));
?>
--EXPECT--
1.10000e+0
string(11) "1.10000e+0
"

@ -0,0 +1,35 @@
--TEST--
Bug #22224 (implode changes object references in array)
--SKIPIF--
<?php
echo 'skip AOT compiler requires __toString() to have explicit :string return type';
?>
--INI--
error_reporting=0
--FILE--
<?php
class foo
{
function __toString()
{
return "Object";
}
}
$a = new foo();
$arr = array(0=>&$a, 1=>&$a);
var_dump(implode(",",$arr));
var_dump($arr)
?>
--EXPECTF--
string(13) "Object,Object"
array(2) {
[0]=>
&object(foo)#%d (0) {
}
[1]=>
&object(foo)#%d (0) {
}
}

@ -0,0 +1,9 @@
--TEST--
Bug #22227 (printf() field limiters broke between 4.2.3 and 4.3.0)
--FILE--
<?php
printf("%-3.3s", "abcdef");
print "\n";
?>
--EXPECT--
abc

@ -0,0 +1,30 @@
--TEST--
Bug #23650 (strip_tags() removes hyphens)
--FILE--
<?php
$str = <<< HERE
1:<!-- abc - -->
2:<!doctype -- >
3:
4:<abc - def>
5:abc - def
6:</abc>
HERE;
echo strip_tags($str);
echo strip_tags($str, '<abc>');
?>
--EXPECT--
1:
2:
3:
4:
5:abc - def
6:
1:
2:
3:
4:<abc - def>
5:abc - def
6:</abc>

@ -0,0 +1,19 @@
--TEST--
Bug #23894 (sprintf() decimal specifiers problem) 32bit version
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
?>
--FILE--
<?php
$a = -12.3456;
$test = sprintf("%04d", $a);
var_dump($test, bin2hex($test));
$test = sprintf("% 13u", $a);
var_dump($test, bin2hex($test));
?>
--EXPECT--
string(4) "-012"
string(8) "2d303132"
string(13) " 4294967284"
string(26) "20202034323934393637323834"

@ -0,0 +1,19 @@
--TEST--
Bug #23894 (sprintf() decimal specifiers problem) 64bit version
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
--FILE--
<?php
$a = -12.3456;
$test = sprintf("%04d", $a);
var_dump($test, bin2hex($test));
$test = sprintf("% 13u", $a);
var_dump($test, bin2hex($test));
?>
--EXPECT--
string(4) "-012"
string(8) "2d303132"
string(20) "18446744073709551604"
string(40) "3138343436373434303733373039353531363034"

@ -0,0 +1,17 @@
--TEST--
Bug #24098 (pathinfo() crash)
--FILE--
<?php
var_dump(pathinfo("/dsds.asa"));
?>
--EXPECTF--
array(4) {
["dirname"]=>
string(1) "%e"
["basename"]=>
string(8) "dsds.asa"
["extension"]=>
string(3) "asa"
["filename"]=>
string(4) "dsds"
}

@ -0,0 +1,14 @@
--TEST--
Bug #24281 (str_replace count not returned if variable wasn't initialized)
--FILE--
<?php
$string = "He had had to have had it";
$newstring = str_replace("had", "foo", $string, $count);
print "$count changes were made.\n";
$count = "foo";
$newstring = str_replace("had", "foo", $string, $count);
print "$count changes were made.\n";
?>
--EXPECT--
3 changes were made.
3 changes were made.

@ -0,0 +1,27 @@
--TEST--
Bug #24208 (base64_decode() not skipping 0xF0 - 0xFF)
--FILE--
<?php
$data = str_repeat("a", 100);
for ($i = 0xF0; $i < 0xFF + 1; $i++) {
$enc = chunk_split(base64_encode($data), 10, chr($i));
var_dump(base64_decode($enc));
}
?>
--EXPECT--
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

@ -0,0 +1,29 @@
--TEST--
Bug #25671 (subarrays not copied correctly)
--FILE--
<?php
$arr = array(
"This is string one.",
"This is string two.",
array(
"This is another string.",
"This is a last string."),
"This is a last string.");
echo serialize(str_replace("string", "strung", $arr)) . "\n";
echo serialize(str_replace("string", "strung", $arr)) . "\n";
echo serialize(str_replace(" ", "", $arr)) . "\n";
echo serialize(str_replace(" ", "", $arr)) . "\n";
?>
--EXPECTF--
Warning: Array to string conversion in %s on line %d
a:4:{i:0;s:19:"This is strung one.";i:1;s:19:"This is strung two.";i:2;s:5:"Array";i:3;s:22:"This is a last strung.";}
Warning: Array to string conversion in %s on line %d
a:4:{i:0;s:19:"This is strung one.";i:1;s:19:"This is strung two.";i:2;s:5:"Array";i:3;s:22:"This is a last strung.";}
Warning: Array to string conversion in %s on line %d
a:4:{i:0;s:16:"Thisisstringone.";i:1;s:16:"Thisisstringtwo.";i:2;s:5:"Array";i:3;s:18:"Thisisalaststring.";}
Warning: Array to string conversion in %s on line %d
a:4:{i:0;s:16:"Thisisstringone.";i:1;s:16:"Thisisstringtwo.";i:2;s:5:"Array";i:3;s:18:"Thisisalaststring.";}

@ -0,0 +1,12 @@
--TEST--
Bug #25707 (html_entity_decode over-decodes &amp;lt;)
--FILE--
<?php
var_dump(html_entity_decode("&amp;lt;", ENT_COMPAT, 'ISO-8859-1'));
var_dump(html_entity_decode("&amp;#38;", ENT_COMPAT, 'ISO-8859-1'));
var_dump(html_entity_decode("&amp;#38;lt;", ENT_COMPAT, 'ISO-8859-1'));
?>
--EXPECT--
string(4) "&lt;"
string(5) "&#38;"
string(8) "&#38;lt;"

@ -0,0 +1,9 @@
--TEST--
Bug #26878 (problem with multiple references to the same variable with different types)
--FILE--
<?php
printf('Int: %1$d and as string: %1$s', 'some string');
echo "\n";
?>
--EXPECT--
Int: 0 and as string: some string

@ -0,0 +1,34 @@
--TEST--
Bug #26973 (*printf() '+' modifier problem)
--FILE--
<?php
printf("%+05d\n", 200);
printf("%+05d\n", -200);
printf("%+05f\n", 200);
printf("%+05f\n", -200);
printf("%+05u\n", 200);
printf("%+05u\n", -200);
echo "---\n";
printf("%05d\n", 200);
printf("%05d\n", -200);
printf("%05f\n", 200);
printf("%05f\n", -200);
printf("%05u\n", 200);
printf("%05u\n", -200);
?>
--EXPECTREGEX--
\+0200
\-0200
\+200\.000000
\-200\.000000
00200
(4294967096|18446744073709551416)
---
00200
\-0200
200\.000000
\-200\.000000
00200
(4294967096|18446744073709551416)

@ -0,0 +1,15 @@
--TEST--
Bug #27276 (str_replace tries to use obscene amounts of ram)
--FILE--
<?php
ini_set("memory_limit", "12m");
$replacement = str_repeat("x", 12444);
$string = str_repeat("x", 9432);
$key = "{BLURPS}";
str_replace($key, $replacement, $string);
echo "Alive!\n";
?>
--EXPECT--
Alive!

@ -0,0 +1,25 @@
--TEST--
Bug #27278 (*printf() functions treat arguments as if passed by reference)
--SKIPIF--
<?php
echo 'skip AOT requires all executable code be in functions';
?>
--FILE--
<?php
function foo ($a)
{
$a=sprintf("%02d",$a);
var_dump($a);
}
$x="02";
var_dump($x);
foo($x);
var_dump($x);
?>
--EXPECT--
string(2) "02"
string(2) "02"
string(2) "02"

@ -0,0 +1,18 @@
--TEST--
Bug #27295 (memory leak inside sscanf())
--SKIPIF--
<?php
echo 'skip AOT limitation';
?>
--FILE--
<?php
$strings = array("foo = bar", "bar = foo");
foreach( $strings as $string )
{
sscanf( $string, "%s = %[^[]]", $var, $val );
echo "$var = $val\n";
}
?>
--EXPECT--
foo = bar
bar = foo

@ -0,0 +1,21 @@
--TEST--
Bug #27457 (Problem with strtr() and translation array)
--FILE--
<?php
$test = "Dot in brackets [.]\n";
echo $test;
$test = strtr($test, array('.' => '0'));
echo $test;
$test = strtr($test, array('0' => '.'));
echo $test;
$test = strtr($test, '.', '0');
echo $test;
$test = strtr($test, '0', '.');
echo $test;
?>
--EXPECT--
Dot in brackets [.]
Dot in brackets [0]
Dot in brackets [.]
Dot in brackets [0]
Dot in brackets [.]

@ -0,0 +1,8 @@
--TEST--
Bug #27675 (str_ireplace segfaults when shrinking string)
--FILE--
<?php
echo str_ireplace('/*<B>', '<B>', '/*<b> I am a comment</b>*/');
?>
--EXPECT--
<B> I am a comment</b>*/

@ -0,0 +1,13 @@
--TEST--
Bug #28386 (wordwrap() wraps text 1 character too soon)
--FILE--
<?php
$text = "Some text";
$string = "$text $text $text $text";
echo wordwrap($string, 9);
?>
--EXPECT--
Some text
Some text
Some text
Some text

@ -0,0 +1,10 @@
--TEST--
Bug #28633 (sprintf incorrectly adding padding to floats)
--FILE--
<?php
echo sprintf("%05.2f", 0.02) . "\n";
echo sprintf("%05.2f", 2.02) . "\n";
?>
--EXPECT--
00.02
02.02

@ -0,0 +1,14 @@
--TEST--
Bug #29075 (strnatcmp() incorrectly handles whitespace)
--FILE--
<?php
var_dump(
strnatcmp('foo ', 'foo '),
strnatcmp('foo', 'foo'),
strnatcmp(' foo', ' foo')
);
?>
--EXPECT--
int(0)
int(0)
int(0)

@ -0,0 +1,8 @@
--TEST--
Bug #29119 (html_entity_decode() misbehaves with UTF-8)
--FILE--
<?php
var_dump(bin2hex(html_entity_decode('&ensp;&thinsp;&lsquo;&dagger;&prime;&frasl;&euro;', ENT_QUOTES, 'UTF-8')));
?>
--EXPECT--
string(42) "e28082e28089e28098e280a0e280b2e28184e282ac"

@ -0,0 +1,10 @@
--TEST--
Bug #29538 (number_format and problem with 0)
--FILE--
<?php
echo number_format(0.25, 2, '', ''), "\n";
echo number_format(1234, 2, '', ',');
?>
--EXPECT--
025
1,23400

@ -0,0 +1,14 @@
--TEST--
Bug #33076 (str_ireplace() incorrectly counts result string length and may cause segfault)
--FILE--
<?php
$value = str_ireplace("t", "bz", "Text");
var_dump($value);
echo "Done\n";
?>
--EXPECT--
string(6) "bzexbz"
Done

@ -0,0 +1,13 @@
--TEST--
Bug #33605 (substr_compare crashes)
--FILE--
<?php
try {
substr_compare("aa", "a", -99999999, -1, 0);
} catch (\ValueError $e) {
echo $e->getMessage();
}
?>
--EXPECT--
substr_compare(): Argument #4 ($length) must be greater than or equal to 0

@ -0,0 +1,10 @@
--TEST--
Bug #34214 (base64_decode() does not properly ignore whitespace)
--FILE--
<?php
$txt = 'Zm9vYmFyIG
Zvb2Jhcg==';
echo base64_decode($txt), "\n";
?>
--EXPECT--
foobar foobar

@ -0,0 +1,29 @@
--TEST--
Bug #35817 (unpack() does not decode odd number of hexadecimal values)
--FILE--
<?php
$a = pack("H3","181");
$b = unpack("H3", $a);
var_dump($b);
$a = pack("H2","18");
$b = unpack("H2", $a);
var_dump($b);
$a = pack("H","1");
$b = unpack("H", $a);
var_dump($b);
?>
--EXPECT--
array(1) {
[1]=>
string(3) "181"
}
array(1) {
[1]=>
string(2) "18"
}
array(1) {
[1]=>
string(1) "1"
}

@ -0,0 +1,29 @@
--TEST--
Bug #36148 (unpack("H*hex", $data) is adding an extra character to the end of the string)
--FILE--
<?php
$values = array("a", "aa", "aaa", "aaaa");
foreach ($values as $value) {
$a = pack("H*", $value);
$b = unpack("H*", $a);
echo $value.": ";
var_dump($b);
}
?>
--EXPECT--
a: array(1) {
[1]=>
string(2) "a0"
}
aa: array(1) {
[1]=>
string(2) "aa"
}
aaa: array(1) {
[1]=>
string(4) "aaa0"
}
aaaa: array(1) {
[1]=>
string(4) "aaaa"
}

@ -0,0 +1,15 @@
--TEST--
Bug #36306 (crc32() 64bit)
--FILE--
<?php
/* as an example how to write crc32 tests
PHP does not have uint values, you cannot
display crc32 like a signed integer.
Have to find some small strings to truly reproduce
the problem, this example being not a problem
*/
echo dechex(crc32("platform independent")) . "\n";
?>
--EXPECT--
cbd056ba

@ -0,0 +1,16 @@
--TEST--
Bug #36392 (wrong number of decimal digits with %e specifier in sprintf)
--FILE--
<?php
echo sprintf("%e\n", 1.123456789);
echo sprintf("%.10e\n", 1.123456789);
echo sprintf("%.0e\n", 1.123456789);
echo sprintf("%.1e\n", 1.123456789);
echo sprintf("%5.1e\n", 1.123456789);
?>
--EXPECT--
1.123457e+0
1.1234567890e+0
1e+0
1.1e+0
1.1e+0

@ -0,0 +1,29 @@
--TEST--
Bug #36944 (strncmp & strncasecmp do not return false on negative string length)
--FILE--
<?php
try {
var_dump(strncmp("test ", "e", -1));
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
var_dump(strncmp("test ", "e", 10));
var_dump(strncmp("test ", "e", 0));
try {
var_dump(strncasecmp("test ", "E", -1));
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
var_dump(strncasecmp("test ", "E", 10));
var_dump(strncasecmp("test ", "E", 0));
?>
--EXPECTF--
strncmp(): Argument #3 ($length) must be greater than or equal to 0
int(%d)
int(0)
strncasecmp(): Argument #3 ($length) must be greater than or equal to 0
int(%d)
int(0)

@ -0,0 +1,17 @@
--TEST--
Bug #37244 (base64_decode violates RFC 3548)
--FILE--
<?php
$strings = array(
'SW1wbGVtZW50YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu',
'SW1wbGVtZW$0YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu',
'SW1wbGVtZW0YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu'
);
foreach($strings as $string) {
var_dump(base64_decode($string, true));
}
?>
--EXPECT--
string(93) "Implementations MUST reject the encoding if it contains characters outside the base alphabet."
bool(false)
string(92) "Implemem][ÛœÈUTÕ™Z™XÝH[˜ÛÙ[™È]ÛÛ<EFBFBD>Z[œÈÚ\˜XÝ\œÈÝ]ÚYHH˜\ÙH[X™] "

@ -0,0 +1,8 @@
--TEST--
Bug #37262 (var_export() does not escape \0 character)
--FILE--
<?php
var_export("foo\0bar");
?>
--EXPECT--
'foo' . "\0" . 'bar'

@ -0,0 +1,13 @@
--TEST--
Bug #38322 (reading past array in sscanf() leads to segfault/arbitrary code execution)
--FILE--
<?php
$str = "a b c d e";
var_dump(sscanf("a ",'%1$s',$str));
echo "Done\n";
?>
--EXPECT--
int(1)
Done

@ -0,0 +1,25 @@
--TEST--
Bug #38770 (unpack() broken with longs on 64 bit machines)
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
--FILE--
<?php
foreach (array('N','l') as $v) {
print_r(unpack($v, pack($v, -30000)));
}
echo "Done\n";
?>
--EXPECT--
Array
(
[1] => 4294937296
)
Array
(
[1] => -30000
)
Done

@ -0,0 +1,22 @@
--TEST--
Bug #39032 (strcspn() stops on null character)
--SKIPIF--
<?php
echo 'skip Test output differs under AOT compilation';
?>
--FILE--
<?php
var_dump(strcspn(chr(0),"x"));
var_dump(strcspn(chr(0),""));
var_dump(strcspn(chr(0),"qweqwe"));
var_dump(strcspn(chr(1),"qweqwe"));
echo "Done\n";
?>
--EXPECT--
int(1)
int(1)
int(1)
int(1)
Done

@ -0,0 +1,13 @@
--TEST--
Bug #39350 (implode/join() crash on empty input strings)
--FILE--
<?php
implode('', array(null));
implode('', array(false));
implode('', array(""));
echo "Done\n";
?>
--EXPECT--
Done

@ -0,0 +1,45 @@
--TEST--
Bug #39621 (str_replace() is not binary safe on strings with equal length)
--FILE--
<?php
$search = "qxxx\0qqqqqqqq";
$subject = "qxxx\0xxxxxxxx";
$replace = "any text";
$result = str_replace ( $search, $replace, $subject );
var_dump($result);
$search = "QXXX\0qqqqqqqq";
$subject = "qxxx\0xxxxxxxx";
$replace = "any text";
$result = str_ireplace ( $search, $replace, $subject );
var_dump($result);
$search = "qxxx\0xxxxxxxx";
$subject = "qxxx\0xxxxxxxx";
$replace = "any text";
$result = str_replace ( $search, $replace, $subject );
var_dump($result);
$search = "qXxx\0xXxXxXxx";
$subject = "qxXx\0xxxxxxxx";
$replace = "any text";
$result = str_ireplace ( $search, $replace, $subject );
var_dump($result);
echo "Done\n";
?>
--EXPECTF--
string(13) "qxxx%0xxxxxxxx"
string(13) "qxxx%0xxxxxxxx"
string(8) "any text"
string(8) "any text"
Done

@ -0,0 +1,17 @@
--TEST--
Bug #39873 (number_format() breaks with locale & decimal points)
--SKIPIF--
<?php
if (!setlocale(LC_ALL, "ita","it","Italian","it_IT","it_IT.ISO8859-1","it_IT.ISO_8859-1")) {
die("skip locale needed for this test is not supported on this platform");
}
?>
--FILE--
<?php
setlocale(LC_ALL, "ita","it","Italian","it_IT","it_IT.ISO8859-1","it_IT.ISO_8859-1");
$num = 0+"1234.56";
echo number_format($num,2);
echo "\n";
?>
--EXPECT--
1,234.56

@ -0,0 +1,8 @@
--TEST--
Bug #40432 (strip_tags() fails with greater than in attribute)
--FILE--
<?php
echo strip_tags('<span title="test > all">this</span>') . "\n";
?>
--EXPECT--
this

@ -0,0 +1,13 @@
--TEST--
Bug #40637 (strip_tags() does not handle single quotes correctly)
--FILE--
<?php
$html = '<span title="Bug \' Trigger">Text</span>';
var_dump(strip_tags($html));
echo "Done\n";
?>
--EXPECT--
string(4) "Text"
Done

@ -0,0 +1,13 @@
--TEST--
Bug #40704 (strip_tags() does not handle single quotes correctly)
--FILE--
<?php
$html = "<div>Bug ' Trigger</div> Missing Text";
var_dump(strip_tags($html));
echo "Done\n";
?>
--EXPECT--
string(26) "Bug ' Trigger Missing Text"
Done

@ -0,0 +1,95 @@
--TEST--
Bug #40754 (Overflow checks inside string functions)
--FILE--
<?php
$v = 2147483647;
var_dump(substr("abcde", 1, $v));
var_dump(substr_replace("abcde", "x", $v, $v));
var_dump(strspn("abcde", "abc", $v, $v));
var_dump(strcspn("abcde", "abc", $v, $v));
try {
var_dump(substr_count("abcde", "abc", $v, $v));
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
try {
substr_compare("abcde", "abc", $v, $v);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
try {
stripos("abcde", "abc", $v);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
try {
substr_count("abcde", "abc", $v, 1);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
try {
substr_count("abcde", "abc", 1, $v);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
try {
strpos("abcde", "abc", $v);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
try {
stripos("abcde", "abc", $v);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
try {
strrpos("abcde", "abc", $v);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
try {
strripos("abcde", "abc", $v);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
try {
strripos("abcde", "abc", $v);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
var_dump(strncmp("abcde", "abc", $v));
var_dump(chunk_split("abcde", $v, "abc"));
var_dump(substr("abcde", $v, $v));
?>
--EXPECT--
string(4) "bcde"
string(6) "abcdex"
int(0)
int(0)
substr_count(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
substr_compare(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
substr_count(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
substr_count(): Argument #4 ($length) must be contained in argument #1 ($haystack)
strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
int(1)
string(8) "abcdeabc"
string(0) ""

@ -0,0 +1,20 @@
--TEST--
Bug #40915 (addcslashes unexpected behavior with binary input)
--FILE--
<?php
$str = "a\000z";
var_dump(addslashes($str));
var_dump(addcslashes($str, ""));
var_dump(addcslashes($str, "\000z"));
var_dump(addcslashes($str, "z"));
echo "Done\n";
?>
--EXPECTF--
string(4) "a\0z"
string(3) "a%0z"
string(7) "a\000\z"
string(4) "a%0\z"
Done

@ -0,0 +1,51 @@
--TEST--
Bug #42107 (sscanf() broken when using %2$s type format parameters)
--SKIPIF--
<?php
echo 'skip AOT limitation';
?>
--FILE--
<?php
var_dump(sscanf('one two', '%1$s %2$s'));
var_dump(sscanf('one two', '%2$s %1$s'));
echo "--\n";
sscanf('one two', '%1$s %2$s', $foo, $bar);
var_dump($foo, $bar);
sscanf('one two', '%2$s %1$s', $foo, $bar);
var_dump($foo, $bar);
echo "--\n";
var_dump(sscanf('one two', '%1$d %2$d'));
var_dump(sscanf('one two', '%1$d'));
echo "Done\n";
?>
--EXPECT--
array(2) {
[0]=>
string(3) "one"
[1]=>
string(3) "two"
}
array(2) {
[0]=>
string(3) "two"
[1]=>
string(3) "one"
}
--
string(3) "one"
string(3) "two"
string(3) "two"
string(3) "one"
--
array(2) {
[0]=>
NULL
[1]=>
NULL
}
array(1) {
[0]=>
NULL
}
Done

@ -0,0 +1,15 @@
--TEST--
Bug #42208 (substr_replace() crashes when the same array is passed more than once)
--FILE--
<?php
$a = array(1, 2);
$c = $a;
var_dump(substr_replace($a, 1, 1, $c));
?>
--EXPECT--
array(2) {
[0]=>
string(2) "11"
[1]=>
string(2) "21"
}

@ -0,0 +1,12 @@
--TEST--
Bug #43927 (koi8r is missing from html_entity_decode())
--FILE--
<?php
var_dump(html_entity_decode("&amp;lt;", ENT_COMPAT, 'koi8-r'));
var_dump(html_entity_decode("&amp;#38;", ENT_COMPAT, 'koi8-r'));
var_dump(html_entity_decode("&amp;#38;lt;", ENT_COMPAT, 'koi8-r'));
?>
--EXPECT--
string(4) "&lt;"
string(5) "&#38;"
string(8) "&#38;lt;"

@ -0,0 +1,13 @@
--TEST--
Bug #43957 (utf8_decode() bogus conversion on multibyte indicator near end of string)
--SKIPIF--
<?php
echo 'skip Test output differs under AOT compilation';
?>
--FILE--
<?php
echo utf8_decode('abc'.chr(0xe0));
?>
--EXPECTF--
Deprecated: Function utf8_decode() is deprecated since 8.2, visit the php.net documentation for various alternatives in %s on line %d
abc?

@ -0,0 +1,14 @@
--TEST--
Bug #44242 (metaphone('CMXFXM') crashes PHP)
--FILE--
<?php
echo metaphone('CMXFXZ'), "\n";
echo metaphone('CMXFXV'), "\n";
echo metaphone('CMXFXZXZ'), "\n";
?>
--EXPECT--
KMKSFKSS
KMKSFKSF
KMKSFKSSKSS

@ -0,0 +1,50 @@
--TEST--
Bug #44703 (htmlspecialchars() does not detect bad character set argument)
--SKIPIF--
<?php
echo 'skip Test output differs under AOT compilation';
?>
--FILE--
<?php
var_dump(htmlspecialchars("<a href='test'>Test</a>", ENT_COMPAT, 1));
var_dump(htmlspecialchars("<a href='test'>Test</a>", ENT_COMPAT, 12));
var_dump(htmlspecialchars("<a href='test'>Test</a>", ENT_COMPAT, 125));
var_dump(htmlspecialchars("<a href='test'>Test</a>", ENT_COMPAT, 1252));
var_dump(htmlspecialchars("<a href='test'>Test</a>", ENT_COMPAT, 12526));
var_dump(htmlspecialchars("<>", ENT_COMPAT, 866));
var_dump(htmlspecialchars("<>", ENT_COMPAT, 8666));
var_dump(htmlspecialchars("<>", ENT_COMPAT, NULL));
var_dump(htmlspecialchars("<>", ENT_COMPAT, 'SJIS'));
var_dump(htmlspecialchars("<>", ENT_COMPAT, 'SjiS'));
var_dump(htmlspecialchars("<>", ENT_COMPAT, str_repeat('a', 100)));
?>
--EXPECTF--
Warning: htmlspecialchars(): Charset "1" is not supported, assuming UTF-8 in %s on line %d
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
Warning: htmlspecialchars(): Charset "12" is not supported, assuming UTF-8 in %s on line %d
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
Warning: htmlspecialchars(): Charset "125" is not supported, assuming UTF-8 in %s on line %d
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
Warning: htmlspecialchars(): Charset "12526" is not supported, assuming UTF-8 in %s on line %d
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
string(8) "&lt;&gt;"
Warning: htmlspecialchars(): Charset "8666" is not supported, assuming UTF-8 in %s on line %d
string(8) "&lt;&gt;"
string(8) "&lt;&gt;"
string(8) "&lt;&gt;"
string(8) "&lt;&gt;"
Warning: htmlspecialchars(): Charset "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" is not supported, assuming UTF-8 in %s on line %d
string(8) "&lt;&gt;"

@ -0,0 +1,8 @@
--TEST--
Bug #45166 (substr() )
--FILE--
<?php
echo substr('cd', -3) . "\n";
?>
--EXPECT--
cd

@ -0,0 +1,23 @@
--TEST--
Bug #45485 (strip_tags and <?XML tag)
--FILE--
<?php
$s =<<< EOD
This text is shown <?XML:NAMESPACE PREFIX = ST1 /><b>This Text disappears</b>
EOD;
$s = strip_tags($s);
echo htmlspecialchars($s),"\n";
$s =<<< EOD
This text is shown <?xml:NAMESPACE PREFIX = ST1 /><b>This Text disappears</b>
EOD;
$s = strip_tags($s);
echo htmlspecialchars($s),"\n";
?>
--EXPECT--
This text is shown This Text disappears
This text is shown This Text disappears

@ -0,0 +1,25 @@
--TEST--
Bug #46578 (strip_tags() does not honor end-of-comment when it encounters a single quote)
--FILE--
<?php
var_dump(strip_tags('<!-- testing I\'ve been to mars -->foobar'));
var_dump(strip_tags('<a alt="foobar">foo<!-- foo! --></a>bar'));
var_dump(strip_tags('<a alt="foobar"/>foo<?= foo! /* <!-- "cool" --> */ ?>bar'));
var_dump(strip_tags('< ax'));
var_dump(strip_tags('<! a>'));
var_dump(strip_tags('<? ax'));
?>
--EXPECT--
string(6) "foobar"
string(6) "foobar"
string(6) "foobar"
string(4) "< ax"
string(0) ""
string(0) ""

@ -0,0 +1,16 @@
--TEST--
Bug #47168 (printf of floating point variable prints maximum of 40 decimal places)
--SKIPIF--
<?php
echo 'skip Test output differs under AOT compilation';
?>
--FILE--
<?php
$dyadic = 0.00000000000045474735088646411895751953125;
var_dump(printf ("%1.41f\n",unserialize(serialize($dyadic))));
?>
--EXPECT--
0.00000000000045474735088646411895751953125
int(44)

@ -0,0 +1,23 @@
--TEST--
Bug #47322 (sscanf %d doesn't work)
--SKIPIF--
<?php
echo 'skip AOT limitation';
?>
--FILE--
<?php
sscanf(":59:58","%s:%d:%f", $a, $b, $c);
echo "[$a][$b][$c]\n";
sscanf("15:01:58.2","%d:%f:%f", $a, $b, $c);
echo "[$a][$b][$c]\n";
sscanf("15.1111::foo","%f:%d:%s", $a, $b, $c);
echo "[$a][$b][$c]\n";
?>
--EXPECT--
[:59:58][][]
[15][1][58.2]
[15.1111][1][58.2]

@ -0,0 +1,14 @@
--TEST--
Bug #47443 (metaphone('scratch') returns wrong result)
--FILE--
<?php
var_dump(metaphone("scratch"));
var_dump(metaphone("scrath"));
var_dump(metaphone("scratc"));
?>
--EXPECT--
string(4) "SKRX"
string(4) "SKR0"
string(5) "SKRTK"

@ -0,0 +1,52 @@
--TEST--
Bug #47481 (natcasesort() does not sort extended ASCII characters correctly)
--FILE--
<?php
/*
* Test natcasesort() with extended ASCII characters
*/
$array = array ('Süden', 'spielen','Sonne','Wind','Regen','Meer');
echo "\n-- Before sorting: --\n";
var_dump($array);
echo "\n-- After Sorting: --\n";
var_dump(natcasesort($array));
var_dump($array);
echo "Done";
?>
--EXPECT--
-- Before sorting: --
array(6) {
[0]=>
string(6) "Süden"
[1]=>
string(7) "spielen"
[2]=>
string(5) "Sonne"
[3]=>
string(4) "Wind"
[4]=>
string(5) "Regen"
[5]=>
string(4) "Meer"
}
-- After Sorting: --
bool(true)
array(6) {
[5]=>
string(4) "Meer"
[4]=>
string(5) "Regen"
[2]=>
string(5) "Sonne"
[1]=>
string(7) "spielen"
[0]=>
string(6) "Süden"
[3]=>
string(4) "Wind"
}
Done

@ -0,0 +1,36 @@
--TEST--
Bug #47842 sscanf() does not support 64-bit values
--SKIPIF--
<?php
echo 'skip AOT compilation or behavior differs';
?>
--FILE--
<?php
echo "-Test\n";
sscanf("2147483647", '%d', $int);
echo "sscanf 32-bit signed int '2147483647' (2^31)-1 = ",$int,"\n";
sscanf("4294967295", '%u', $int);
echo "sscanf 32-bit unsign int '4294967295' (2^32)-1 = ",$int,"\n";
sscanf("9223372036854775807", '%d', $int);
echo "sscanf 64-bit signed int '9223372036854775807' (2^63)-1 = ",$int,"\n";
sscanf("18446744073709551615", '%u', $int);
echo "sscanf 64-bit unsign int '18446744073709551615' (2^64)-1 = ",$int,"\n";
printf("printf 64-bit signed int '9223372036854775807' (2^63)-1 = %d\n", 9223372036854775807);
printf("printf 64-bit signed int '18446744073709551615' (2^64)-1 = %u\n", 18446744073709551615);
echo "Done\n";
?>
--EXPECTF--
-Test
sscanf 32-bit signed int '2147483647' (2^31)-1 = 2147483647
sscanf 32-bit unsign int '4294967295' (2^32)-1 = 4294967295
sscanf 64-bit signed int '9223372036854775807' (2^63)-1 = 9223372036854775807
sscanf 64-bit unsign int '18446744073709551615' (2^64)-1 = 18446744073709551615
printf 64-bit signed int '9223372036854775807' (2^63)-1 = 9223372036854775807
Warning: The float 1.8446744073709552E+19 is not representable as an int, cast occurred in %s on line %d
printf 64-bit signed int '18446744073709551615' (2^64)-1 = 0
Done

@ -0,0 +1,31 @@
--TEST--
Bug #48709 (metaphone and 'wh')
--FILE--
<?php
/* Initial letter exceptions */
$exceptions = array(
'kn', // Drop first letter
'gn', // ditto
'pn', // ditto
'ae', // ditto
'wr', // ditto
'x', // s
'wh', // w
'wa' // w
);
foreach ($exceptions as $letter) {
printf("%s => %s\n", $letter, metaphone($letter));
}
?>
--EXPECT--
kn => N
gn => N
pn => N
ae => E
wr => R
x => S
wh => W
wa => W

@ -0,0 +1,29 @@
--TEST--
Bug #49687 Several utf8_decode deficiencies and vulnerabilities
--SKIPIF--
<?php
echo 'skip Test output differs under AOT compilation';
?>
--FILE--
<?php
$tests = array(
"\x41\xC2\x3E\x42",
"\xE3\x80\x22",
"\x41\x98\xBA\x42\xE2\x98\x43\xE2\x98\xBA\xE2\x98",
);
foreach ($tests as $t) {
echo bin2hex(utf8_decode($t)), "\n";
}
echo "Done.\n";
?>
--EXPECTF--
Deprecated: Function utf8_decode() is deprecated since 8.2, visit the php.net documentation for various alternatives in %s on line %d
413f3e42
Deprecated: Function utf8_decode() is deprecated since 8.2, visit the php.net documentation for various alternatives in %s on line %d
3f22
Deprecated: Function utf8_decode() is deprecated since 8.2, visit the php.net documentation for various alternatives in %s on line %d
413f3f423f433f3f
Done.

File diff suppressed because it is too large Load Diff

@ -0,0 +1,12 @@
--TEST--
Bug #50052 (Different Hashes on Windows and Linux on wrong Salt size)
--FILE--
<?php
$salt = '$1$f+uslYF01$';
$password = 'test';
echo $salt . "\n";
echo crypt($password,$salt) . "\n";
?>
--EXPECT--
$1$f+uslYF01$
$1$f+uslYF0$orVloNmKSLvOeswusE0bY.

@ -0,0 +1,10 @@
--TEST--
Bug #50847 (strip_tags() removes all tags greater than 1023 bytes long)
--FILE--
<?php
$var = '<param value="' . str_repeat("a", 2048) . '" />';
var_dump(strip_tags($var, "<param>"), strip_tags($var));
?>
--EXPECT--
string(2066) "<param value="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" />"
string(0) ""

@ -0,0 +1,11 @@
--TEST--
Bug #51059 crypt() segfaults on certain salts
--FILE--
<?php
$res = crypt('a', '_');
if ($res === '*0' || $res === '*1') echo 'OK';
else echo 'Not OK';
?>
--EXPECT--
OK

@ -0,0 +1,34 @@
--TEST--
Bug #51899 (Parse error in parse_ini_file() function when empy value followed by no newline)
--FILE--
<?php
var_dump(parse_ini_string('a='));
var_dump(parse_ini_string('a= '));
var_dump(parse_ini_string('a='.PHP_EOL));
var_dump(parse_ini_string('a=b '));
var_dump(parse_ini_string(''));
var_dump(parse_ini_string("\0"));
?>
--EXPECT--
array(1) {
["a"]=>
string(0) ""
}
array(1) {
["a"]=>
string(0) ""
}
array(1) {
["a"]=>
string(0) ""
}
array(1) {
["a"]=>
string(2) "b "
}
array(0) {
}
array(0) {
}

@ -0,0 +1,41 @@
--TEST--
Bug #53021 (Failure to convert numeric entities with ENT_NOQUOTES and ISO-8859-1)
--FILE--
<?php
var_dump(unpack("H*",html_entity_decode("&#233;", ENT_QUOTES, "ISO-8859-1")));
echo "double quotes variations:", "\n";
echo html_entity_decode("&quot;", ENT_NOQUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&#34;", ENT_NOQUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&quot;", ENT_QUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&#34;", ENT_QUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&quot;", ENT_COMPAT, 'UTF-8'), "\n";
echo html_entity_decode("&#34;", ENT_COMPAT, 'UTF-8'), "\n";
echo html_entity_decode("&quot;"), "\n";
echo html_entity_decode("&#34;"), "\n";
echo "\nsingle quotes variations:", "\n";
echo html_entity_decode("&#39;", ENT_NOQUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&#39;", ENT_QUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&#39;", ENT_COMPAT, 'UTF-8'), "\n";
echo html_entity_decode("&#39;"), "\n";
?>
--EXPECT--
array(1) {
[1]=>
string(2) "e9"
}
double quotes variations:
&quot;
&#34;
"
"
"
"
"
"
single quotes variations:
&#39;
'
&#39;
'

@ -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>'));
?>
--EXPECT--
string(47) "USD<input type="text"/>CDN<input type="text" />"
bool(true)
string(6) "USDCDN"
string(0) ""

@ -0,0 +1,590 @@
--TEST--
Bug #54055: PHP crashes when executing strval when precision setting is very high
--FILE--
<?php
for($i = 495; $i <= 1074; $i++) {
ini_set('precision', $i);
echo "$i: len=", strlen(strval(-1 * pow(2, -1074))), "\n";
}
?>
--EXPECT--
495: len=502
496: len=503
497: len=504
498: len=505
499: len=506
500: len=507
501: len=508
502: len=509
503: len=510
504: len=511
505: len=512
506: len=513
507: len=514
508: len=515
509: len=516
510: len=517
511: len=517
512: len=519
513: len=520
514: len=521
515: len=521
516: len=523
517: len=524
518: len=525
519: len=526
520: len=527
521: len=528
522: len=529
523: len=529
524: len=531
525: len=532
526: len=532
527: len=534
528: len=535
529: len=536
530: len=537
531: len=538
532: len=539
533: len=540
534: len=541
535: len=542
536: len=543
537: len=544
538: len=545
539: len=546
540: len=547
541: len=548
542: len=549
543: len=550
544: len=551
545: len=552
546: len=553
547: len=554
548: len=555
549: len=555
550: len=557
551: len=557
552: len=559
553: len=560
554: len=561
555: len=562
556: len=563
557: len=564
558: len=565
559: len=566
560: len=567
561: len=568
562: len=569
563: len=570
564: len=571
565: len=572
566: len=573
567: len=574
568: len=575
569: len=576
570: len=577
571: len=578
572: len=579
573: len=580
574: len=581
575: len=582
576: len=583
577: len=584
578: len=585
579: len=586
580: len=587
581: len=588
582: len=589
583: len=590
584: len=591
585: len=591
586: len=593
587: len=594
588: len=595
589: len=596
590: len=597
591: len=598
592: len=598
593: len=600
594: len=600
595: len=600
596: len=603
597: len=604
598: len=605
599: len=606
600: len=607
601: len=608
602: len=608
603: len=610
604: len=611
605: len=611
606: len=613
607: len=614
608: len=615
609: len=616
610: len=617
611: len=618
612: len=619
613: len=620
614: len=621
615: len=622
616: len=623
617: len=624
618: len=625
619: len=626
620: len=627
621: len=628
622: len=629
623: len=630
624: len=631
625: len=632
626: len=633
627: len=633
628: len=635
629: len=636
630: len=637
631: len=638
632: len=639
633: len=639
634: len=641
635: len=642
636: len=643
637: len=644
638: len=645
639: len=645
640: len=647
641: len=648
642: len=649
643: len=650
644: len=650
645: len=652
646: len=653
647: len=654
648: len=655
649: len=656
650: len=657
651: len=658
652: len=659
653: len=660
654: len=661
655: len=662
656: len=663
657: len=664
658: len=665
659: len=665
660: len=667
661: len=668
662: len=669
663: len=670
664: len=671
665: len=672
666: len=673
667: len=673
668: len=675
669: len=676
670: len=677
671: len=678
672: len=678
673: len=680
674: len=680
675: len=682
676: len=683
677: len=684
678: len=685
679: len=686
680: len=687
681: len=688
682: len=688
683: len=690
684: len=691
685: len=692
686: len=693
687: len=694
688: len=695
689: len=696
690: len=697
691: len=698
692: len=699
693: len=699
694: len=701
695: len=702
696: len=703
697: len=704
698: len=705
699: len=706
700: len=706
701: len=708
702: len=709
703: len=710
704: len=711
705: len=712
706: len=713
707: len=714
708: len=715
709: len=716
710: len=717
711: len=718
712: len=719
713: len=720
714: len=721
715: len=722
716: len=723
717: len=724
718: len=725
719: len=726
720: len=727
721: len=728
722: len=729
723: len=730
724: len=731
725: len=732
726: len=733
727: len=734
728: len=735
729: len=736
730: len=737
731: len=738
732: len=739
733: len=739
734: len=741
735: len=742
736: len=743
737: len=744
738: len=745
739: len=746
740: len=747
741: len=748
742: len=749
743: len=750
744: len=751
745: len=752
746: len=753
747: len=754
748: len=755
749: len=756
750: len=757
751: len=758
752: len=758
753: len=758
754: len=758
755: len=758
756: len=758
757: len=758
758: len=758
759: len=758
760: len=758
761: len=758
762: len=758
763: len=758
764: len=758
765: len=758
766: len=758
767: len=758
768: len=758
769: len=758
770: len=758
771: len=758
772: len=758
773: len=758
774: len=758
775: len=758
776: len=758
777: len=758
778: len=758
779: len=758
780: len=758
781: len=758
782: len=758
783: len=758
784: len=758
785: len=758
786: len=758
787: len=758
788: len=758
789: len=758
790: len=758
791: len=758
792: len=758
793: len=758
794: len=758
795: len=758
796: len=758
797: len=758
798: len=758
799: len=758
800: len=758
801: len=758
802: len=758
803: len=758
804: len=758
805: len=758
806: len=758
807: len=758
808: len=758
809: len=758
810: len=758
811: len=758
812: len=758
813: len=758
814: len=758
815: len=758
816: len=758
817: len=758
818: len=758
819: len=758
820: len=758
821: len=758
822: len=758
823: len=758
824: len=758
825: len=758
826: len=758
827: len=758
828: len=758
829: len=758
830: len=758
831: len=758
832: len=758
833: len=758
834: len=758
835: len=758
836: len=758
837: len=758
838: len=758
839: len=758
840: len=758
841: len=758
842: len=758
843: len=758
844: len=758
845: len=758
846: len=758
847: len=758
848: len=758
849: len=758
850: len=758
851: len=758
852: len=758
853: len=758
854: len=758
855: len=758
856: len=758
857: len=758
858: len=758
859: len=758
860: len=758
861: len=758
862: len=758
863: len=758
864: len=758
865: len=758
866: len=758
867: len=758
868: len=758
869: len=758
870: len=758
871: len=758
872: len=758
873: len=758
874: len=758
875: len=758
876: len=758
877: len=758
878: len=758
879: len=758
880: len=758
881: len=758
882: len=758
883: len=758
884: len=758
885: len=758
886: len=758
887: len=758
888: len=758
889: len=758
890: len=758
891: len=758
892: len=758
893: len=758
894: len=758
895: len=758
896: len=758
897: len=758
898: len=758
899: len=758
900: len=758
901: len=758
902: len=758
903: len=758
904: len=758
905: len=758
906: len=758
907: len=758
908: len=758
909: len=758
910: len=758
911: len=758
912: len=758
913: len=758
914: len=758
915: len=758
916: len=758
917: len=758
918: len=758
919: len=758
920: len=758
921: len=758
922: len=758
923: len=758
924: len=758
925: len=758
926: len=758
927: len=758
928: len=758
929: len=758
930: len=758
931: len=758
932: len=758
933: len=758
934: len=758
935: len=758
936: len=758
937: len=758
938: len=758
939: len=758
940: len=758
941: len=758
942: len=758
943: len=758
944: len=758
945: len=758
946: len=758
947: len=758
948: len=758
949: len=758
950: len=758
951: len=758
952: len=758
953: len=758
954: len=758
955: len=758
956: len=758
957: len=758
958: len=758
959: len=758
960: len=758
961: len=758
962: len=758
963: len=758
964: len=758
965: len=758
966: len=758
967: len=758
968: len=758
969: len=758
970: len=758
971: len=758
972: len=758
973: len=758
974: len=758
975: len=758
976: len=758
977: len=758
978: len=758
979: len=758
980: len=758
981: len=758
982: len=758
983: len=758
984: len=758
985: len=758
986: len=758
987: len=758
988: len=758
989: len=758
990: len=758
991: len=758
992: len=758
993: len=758
994: len=758
995: len=758
996: len=758
997: len=758
998: len=758
999: len=758
1000: len=758
1001: len=758
1002: len=758
1003: len=758
1004: len=758
1005: len=758
1006: len=758
1007: len=758
1008: len=758
1009: len=758
1010: len=758
1011: len=758
1012: len=758
1013: len=758
1014: len=758
1015: len=758
1016: len=758
1017: len=758
1018: len=758
1019: len=758
1020: len=758
1021: len=758
1022: len=758
1023: len=758
1024: len=758
1025: len=758
1026: len=758
1027: len=758
1028: len=758
1029: len=758
1030: len=758
1031: len=758
1032: len=758
1033: len=758
1034: len=758
1035: len=758
1036: len=758
1037: len=758
1038: len=758
1039: len=758
1040: len=758
1041: len=758
1042: len=758
1043: len=758
1044: len=758
1045: len=758
1046: len=758
1047: len=758
1048: len=758
1049: len=758
1050: len=758
1051: len=758
1052: len=758
1053: len=758
1054: len=758
1055: len=758
1056: len=758
1057: len=758
1058: len=758
1059: len=758
1060: len=758
1061: len=758
1062: len=758
1063: len=758
1064: len=758
1065: len=758
1066: len=758
1067: len=758
1068: len=758
1069: len=758
1070: len=758
1071: len=758
1072: len=758
1073: len=758
1074: len=758

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save