diff options
author | Peter Kokot <peterkokot@gmail.com> | 2018-10-14 17:45:48 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2018-10-14 19:45:12 +0200 |
commit | 782352c54ad69c517e3c32b0dd2c25d74842647a (patch) | |
tree | 220bdc1e814e9f44b3578d49b3f239a3fdefa1d0 /ext/filter/tests | |
parent | 604d4bdae5037e021c1f9d35f08cbeddd610d84c (diff) | |
download | php-git-782352c54ad69c517e3c32b0dd2c25d74842647a.tar.gz |
Trim trailing whitespace in *.phpt
Diffstat (limited to 'ext/filter/tests')
57 files changed, 114 insertions, 114 deletions
diff --git a/ext/filter/tests/002.phpt b/ext/filter/tests/002.phpt index 7136b251a6..7629f0125a 100644 --- a/ext/filter/tests/002.phpt +++ b/ext/filter/tests/002.phpt @@ -4,7 +4,7 @@ GET test with 2 values and an empty one a=1&b=&c=3 --FILE-- <?php echo $_GET['a']; -echo $_GET['b']; +echo $_GET['b']; echo $_GET['c']; ?> --EXPECT-- diff --git a/ext/filter/tests/003.phpt b/ext/filter/tests/003.phpt index 43e6cd9b03..e49e240448 100644 --- a/ext/filter/tests/003.phpt +++ b/ext/filter/tests/003.phpt @@ -6,7 +6,7 @@ d=4&e=5 a=1&b=&c=3 --FILE-- <?php echo $_GET['a']; -echo $_GET['b']; +echo $_GET['b']; echo $_GET['c']; echo $_POST['d']; echo $_POST['e']; diff --git a/ext/filter/tests/004.phpt b/ext/filter/tests/004.phpt index b899124936..e36682979c 100644 --- a/ext/filter/tests/004.phpt +++ b/ext/filter/tests/004.phpt @@ -10,7 +10,7 @@ d="quotes"&e=\slash a=O'Henry&b=&c=<b>Bold</b> --FILE-- <?php echo $_GET['a']; -echo $_GET['b']; +echo $_GET['b']; echo $_GET['c']; echo $_POST['d']; echo $_POST['e']; diff --git a/ext/filter/tests/005.phpt b/ext/filter/tests/005.phpt index b3735f5627..7ddb8a783b 100644 --- a/ext/filter/tests/005.phpt +++ b/ext/filter/tests/005.phpt @@ -7,14 +7,14 @@ filter.default=stripped --GET-- id=f03_photos&pgurl=http%3A//fifaworldcup.yahoo.com/03/en/photozone/index.html --FILE-- -<?php +<?php echo $_GET['id']; echo "\n"; -echo $_GET['pgurl']; +echo $_GET['pgurl']; echo "\n"; echo $_REQUEST['id']; echo "\n"; -echo $_REQUEST['pgurl']; +echo $_REQUEST['pgurl']; ?> --EXPECT-- f03_photos diff --git a/ext/filter/tests/007.phpt b/ext/filter/tests/007.phpt index 67c0b89f5f..87f9a77a12 100644 --- a/ext/filter/tests/007.phpt +++ b/ext/filter/tests/007.phpt @@ -31,7 +31,7 @@ var_dump(filter_has_var("", array())); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- bool(true) bool(true) bool(false) diff --git a/ext/filter/tests/008.phpt b/ext/filter/tests/008.phpt index 773c1ef7c7..a3cb7172ff 100644 --- a/ext/filter/tests/008.phpt +++ b/ext/filter/tests/008.phpt @@ -10,7 +10,7 @@ var_dump(filter_list(array())); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- array(22) { [0]=> string(3) "int" diff --git a/ext/filter/tests/009.phpt b/ext/filter/tests/009.phpt index d09f996fd0..5c38e5603a 100644 --- a/ext/filter/tests/009.phpt +++ b/ext/filter/tests/009.phpt @@ -16,7 +16,7 @@ var_dump(filter_id(0,0,0)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- int(513) int(513) int(518) diff --git a/ext/filter/tests/010.phpt b/ext/filter/tests/010.phpt index 38b436f58d..3e71d331bd 100644 --- a/ext/filter/tests/010.phpt +++ b/ext/filter/tests/010.phpt @@ -18,7 +18,7 @@ var_dump(filter_var(1, 0, array())); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- array(7) { [0]=> int(1) diff --git a/ext/filter/tests/012.phpt b/ext/filter/tests/012.phpt index 9a8ead944d..cd74081e8c 100644 --- a/ext/filter/tests/012.phpt +++ b/ext/filter/tests/012.phpt @@ -11,7 +11,7 @@ var_dump(filter_input(INPUT_COOKIE, "")); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- NULL NULL NULL diff --git a/ext/filter/tests/013.phpt b/ext/filter/tests/013.phpt index 421c5d55bf..c9dd915d83 100644 --- a/ext/filter/tests/013.phpt +++ b/ext/filter/tests/013.phpt @@ -40,7 +40,7 @@ var_dump(filter_var("010", FILTER_VALIDATE_INT)); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- int(234) int(234) int(234) diff --git a/ext/filter/tests/014.phpt b/ext/filter/tests/014.phpt index 8837457147..6b34a19b77 100644 --- a/ext/filter/tests/014.phpt +++ b/ext/filter/tests/014.phpt @@ -30,11 +30,11 @@ var_dump(filter_var("", FILTER_VALIDATE_BOOLEAN)); var_dump(filter_var(-1, FILTER_VALIDATE_BOOLEAN)); var_dump(filter_var("000000", FILTER_VALIDATE_BOOLEAN)); var_dump(filter_var("111111", FILTER_VALIDATE_BOOLEAN)); - + echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- bool(false) bool(false) bool(false) diff --git a/ext/filter/tests/015.phpt b/ext/filter/tests/015.phpt index 03a78a8645..f9c190a0d0 100644 --- a/ext/filter/tests/015.phpt +++ b/ext/filter/tests/015.phpt @@ -6,11 +6,11 @@ filter_var() and FILTER_VALIDATE_URL <?php $values = Array( -'http://example.com/index.html', -'http://www.example.com/index.php', -'http://www.example/img/test.png', -'http://www.example/img/dir/', -'http://www.example/img/dir', +'http://example.com/index.html', +'http://www.example.com/index.php', +'http://www.example/img/test.png', +'http://www.example/img/dir/', +'http://www.example/img/dir', 'http://www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com/', 'http://toolongtoolongtoolongtoolongtoolongtoolongtoolongtoolongtoolongtoolong.com', 'http://eauBcFReEmjLcoZwI0RuONNnwU4H9r151juCaqTI5VeIP5jcYIqhx1lh5vV00l2rTs6y7hOp7rYw42QZiq6VIzjcYrRm8gFRMk9U9Wi1grL8Mr5kLVloYLthHgyA94QK3SaXCATklxgo6XvcbXIqAGG7U0KxTr8hJJU1p2ZQ2mXHmp4DhYP8N9SRuEKzaCPcSIcW7uj21jZqBigsLsNAXEzU8SPXZjmVQVtwQATPWeWyGW4GuJhjP4Q8o0.com', @@ -27,19 +27,19 @@ $values = Array( 'http://-.abc.com', 'http://abc.-.abc.com', 'http://underscore_.example.com', -'http//www.example/wrong/url/', -'http:/www.example', -'file:///tmp/test.c', -'ftp://ftp.example.com/tmp/', -'/tmp/test.c', -'/', -'http://', -'http:/', -'http:', -'http', -'', --1, -array(), +'http//www.example/wrong/url/', +'http:/www.example', +'file:///tmp/test.c', +'ftp://ftp.example.com/tmp/', +'/tmp/test.c', +'/', +'http://', +'http:/', +'http:', +'http', +'', +-1, +array(), 'mailto:foo@bar.com', 'news:news.php.net', 'file://foo/bar', @@ -66,7 +66,7 @@ var_dump(filter_var("http://www.example.com/index.php?a=b&c=d", FILTER_VALIDATE_ echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(29) "http://example.com/index.html" string(32) "http://www.example.com/index.php" string(31) "http://www.example/img/test.png" diff --git a/ext/filter/tests/016.phpt b/ext/filter/tests/016.phpt index c6783444d0..c614903f63 100644 --- a/ext/filter/tests/016.phpt +++ b/ext/filter/tests/016.phpt @@ -5,14 +5,14 @@ filter_var() and FILTER_VALIDATE_EMAIL --FILE-- <?php $values = Array( -'a@b.c', -'abuse@example.com', -'test!.!@#$%^&*@example.com', -'test@@#$%^&*())).com', -'test@.com', -'test@com', -'@', -'[]()/@example.com', +'a@b.c', +'abuse@example.com', +'test!.!@#$%^&*@example.com', +'test@@#$%^&*())).com', +'test@.com', +'test@com', +'@', +'[]()/@example.com', 'QWERTYUIOPASDFGHJKLZXCVBNM@QWERTYUIOPASDFGHJKLZXCVBNM.NET', 'e.x.a.m.p.l.e.@example.com', 'firstname.lastname@employee.2something.com', @@ -27,7 +27,7 @@ foreach ($values as $value) { echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(5) "a@b.c" string(17) "abuse@example.com" bool(false) diff --git a/ext/filter/tests/017.phpt b/ext/filter/tests/017.phpt index 518ee79256..d11688eceb 100644 --- a/ext/filter/tests/017.phpt +++ b/ext/filter/tests/017.phpt @@ -14,7 +14,7 @@ var_dump(filter_var("data", FILTER_VALIDATE_REGEXP)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- string(4) "data" bool(false) string(4) "data" diff --git a/ext/filter/tests/018.phpt b/ext/filter/tests/018.phpt index 833500fd33..640a2556bd 100644 --- a/ext/filter/tests/018.phpt +++ b/ext/filter/tests/018.phpt @@ -30,7 +30,7 @@ var_dump(filter_var("::1", FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 | FILTER_FLAG_NO var_dump(filter_var("127.0.0.1", FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(11) "192.168.0.1" bool(false) string(3) "::1" diff --git a/ext/filter/tests/019.phpt b/ext/filter/tests/019.phpt index 1665181cd2..09fdddca8e 100644 --- a/ext/filter/tests/019.phpt +++ b/ext/filter/tests/019.phpt @@ -13,7 +13,7 @@ var_dump(filter_var("1.1.1.1", FILTER_VALIDATE_IP)); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- bool(false) bool(false) bool(false) diff --git a/ext/filter/tests/020.phpt b/ext/filter/tests/020.phpt index c2ab6096d5..855897da9b 100644 --- a/ext/filter/tests/020.phpt +++ b/ext/filter/tests/020.phpt @@ -12,7 +12,7 @@ var_dump(filter_var(-1, FILTER_SANITIZE_MAGIC_QUOTES)); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(36) "test\'asd\'asd\'\' asd\\\'\"asdfasdf" string(2) "\'" string(0) "" diff --git a/ext/filter/tests/021.phpt b/ext/filter/tests/021.phpt index 994dac282b..43248b1fba 100644 --- a/ext/filter/tests/021.phpt +++ b/ext/filter/tests/021.phpt @@ -25,7 +25,7 @@ var_dump(filter_var("", FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(6) "123456" string(11) "12312312323" string(5) "12323" diff --git a/ext/filter/tests/022.phpt b/ext/filter/tests/022.phpt index d8d118540e..91aca3e632 100644 --- a/ext/filter/tests/022.phpt +++ b/ext/filter/tests/022.phpt @@ -10,10 +10,10 @@ var_dump(filter_var("a[!@#$%^&*()@a@#$%^&*(.com@#$%^&*(", FILTER_SANITIZE_EMAIL) var_dump(filter_var("white space here \ \ \" som more", FILTER_SANITIZE_EMAIL)); var_dump(filter_var("", FILTER_SANITIZE_EMAIL)); var_dump(filter_var("123456789000000", FILTER_SANITIZE_EMAIL)); - + echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(5) "a@b.c" string(30) "a[!@#$%^&*@a@#$%^&*.com@#$%^&*" string(21) "whitespaceheresommore" diff --git a/ext/filter/tests/023.phpt b/ext/filter/tests/023.phpt index f8d4137bf0..577239a882 100644 --- a/ext/filter/tests/023.phpt +++ b/ext/filter/tests/023.phpt @@ -10,10 +10,10 @@ var_dump(filter_var("a[!@#<b>$%^&*()@a@#$%^&*(.<br>com@#$%^&*(", FILTER_UNSAFE_R var_dump(filter_var("white space here \ \ \" some more", FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP)); var_dump(filter_var("", FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP)); var_dump(filter_var(" 123456789000000 <qwertyuiop> ", FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP)); - + echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(18) "}"<p>test para</p>" string(53) "a[!@#<b>$%^&*()@a@#$%^&*(.<br>com@#$%^&*(" string(32) "white space here \ \ " some more" diff --git a/ext/filter/tests/024.phpt b/ext/filter/tests/024.phpt index 7d7349fcd4..026a90a5bd 100644 --- a/ext/filter/tests/024.phpt +++ b/ext/filter/tests/024.phpt @@ -12,7 +12,7 @@ var_dump(filter_var("!@#$%^&*()QWERTYUIOP{ASDFGHJKL:\"ZXCVBNM<>?", FILTER_SANITI echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(26) "%22%3Cbr%3Eblah%3C%2Fph%3E" string(0) "" string(23) "%20%20text%20here%20%20" diff --git a/ext/filter/tests/025.phpt b/ext/filter/tests/025.phpt index df8c3737bf..fc04918357 100644 --- a/ext/filter/tests/025.phpt +++ b/ext/filter/tests/025.phpt @@ -15,7 +15,7 @@ var_dump(filter_var(".", FILTER_SANITIZE_STRING)); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(0) "" string(0) "" string(12) "!@#$%^&*()'"" diff --git a/ext/filter/tests/026.phpt b/ext/filter/tests/026.phpt index 7cfc557fcb..caab24c840 100644 --- a/ext/filter/tests/026.phpt +++ b/ext/filter/tests/026.phpt @@ -19,7 +19,7 @@ var_dump(filter_var("", FILTER_SANITIZE_STRIPPED, FILTER_FLAG_STRIP_HIGH)); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(40) "Let me see you Stripped down to the bone" string(11) "!@#$%^&*()>" string(0) "" diff --git a/ext/filter/tests/027.phpt b/ext/filter/tests/027.phpt index 759030a643..b5a85cf852 100644 --- a/ext/filter/tests/027.phpt +++ b/ext/filter/tests/027.phpt @@ -19,7 +19,7 @@ var_dump(filter_var("", FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH)); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(75) "%3F%3E%3C%21%40%23%24%25%5E%26%2A%28%29%7D%7B%7EQwertyuilfdsasdfgmnbvcxcvbn" string(17) "%3Cdata%26sons%3E" string(0) "" diff --git a/ext/filter/tests/028.phpt b/ext/filter/tests/028.phpt index c0ab16fe83..f88a628252 100644 --- a/ext/filter/tests/028.phpt +++ b/ext/filter/tests/028.phpt @@ -22,7 +22,7 @@ var_dump(filter_var("кириллица", FILTER_SANITIZE_SPECIAL_CHARS, FILTER_ echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(55) "?><!@#$%^&*()}{~Qwertyuilfdsasdfgmnbvcxcvbn" string(23) "<data&sons>" string(0) "" diff --git a/ext/filter/tests/029.phpt b/ext/filter/tests/029.phpt index c1ede74ab0..14b516c35a 100644 --- a/ext/filter/tests/029.phpt +++ b/ext/filter/tests/029.phpt @@ -9,7 +9,7 @@ filter_var() and FILTER_CALLBACK function test($var) { return strtoupper($var); } - + var_dump(filter_var("data", FILTER_CALLBACK, array("options"=>"test"))); var_dump(filter_var("~!@#$%^&*()_QWERTYUIOPASDFGHJKLZXCVBNM<>>?\"}{:", FILTER_CALLBACK, array("options"=>"test"))); var_dump(filter_var("", FILTER_CALLBACK, array("options"=>"test"))); @@ -31,7 +31,7 @@ var_dump(filter_var("", FILTER_CALLBACK, array("options"=>array("test_class","te /* empty function without return value */ function test1($var) { } - + var_dump(filter_var("data", FILTER_CALLBACK, array("options"=>"test1"))); var_dump(filter_var("~!@#$%^&*()_QWERTYUIOPASDFGHJKLZXCVBNM<>>?\"}{:", FILTER_CALLBACK, array("options"=>"test1"))); var_dump(filter_var("", FILTER_CALLBACK, array("options"=>"test1"))); @@ -40,7 +40,7 @@ var_dump(filter_var("", FILTER_CALLBACK, array("options"=>"test1"))); function test2(&$var) { $var = 1; } - + var_dump(filter_var("data", FILTER_CALLBACK, array("options"=>"test2"))); var_dump(filter_var("~!@#$%^&*()_QWERTYUIOPASDFGHJKLZXCVBNM<>>?\"}{:", FILTER_CALLBACK, array("options"=>"test2"))); var_dump(filter_var("", FILTER_CALLBACK, array("options"=>"test2"))); @@ -49,7 +49,7 @@ var_dump(filter_var("", FILTER_CALLBACK, array("options"=>"test2"))); function test3(&$var) { unset($var); } - + var_dump(filter_var("data", FILTER_CALLBACK, array("options"=>"test3"))); var_dump(filter_var("~!@#$%^&*()_QWERTYUIOPASDFGHJKLZXCVBNM<>>?\"}{:", FILTER_CALLBACK, array("options"=>"test3"))); var_dump(filter_var("", FILTER_CALLBACK, array("options"=>"test3"))); @@ -59,7 +59,7 @@ function test4(&$var) { unset($var); return 1; } - + var_dump(filter_var("data", FILTER_CALLBACK, array("options"=>"test4"))); /* thrown exception in the callback */ @@ -75,7 +75,7 @@ try { echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- string(4) "DATA" string(46) "~!@#$%^&*()_QWERTYUIOPASDFGHJKLZXCVBNM<>>?"}{:" string(0) "" diff --git a/ext/filter/tests/030.phpt b/ext/filter/tests/030.phpt index c5af15e152..6c380dee90 100644 --- a/ext/filter/tests/030.phpt +++ b/ext/filter/tests/030.phpt @@ -1,5 +1,5 @@ --TEST-- -filter_var() and IPv6 +filter_var() and IPv6 --SKIPIF-- <?php if (!extension_loaded("filter")) die("skip"); ?> --FILE-- @@ -23,22 +23,22 @@ $ipv6_test = array( "0:0:0:0:0:0:0:13.1.68.3" => false, "::13.1.68.3" => true, "::FFFF:129.144.52.38" => true, - + "1:2:3:4:5:6::129.144.52.38" => false, "::1:2:3:4:5:6:129.144.52.38" => false, "1:2:3::4:5:6:129.144.52.38" => false, - + "1:2:3:4::5:6:7:8" => false, "::1:2:3:4:5:6:7" => true, "::1:2:3:4:5:6:7:8" => false, "1:2:3:4:5:6:7::" => true, "1:2:3:4:5:6:7:8::" => false, "1:2:3:4:5:6:7::8" => false, - + "1:2:3:4:5:6:7:8g" => false, "1:2:3:4:5:6:7:g" => false, "1:2:3:4:5g:6:7:8" => false, - + 'a:b:c:d:e::1.2.3.4' => true, '::0:a:b:c:d:e:f' => true, '0:a:b:c:d:e:f::' => true, @@ -53,12 +53,12 @@ foreach ($ipv6_test as $ip => $exp) { $out = filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6); $out = (int) ($out === false ? 0 : 1); if ($exp != $out) { - echo "$ip failed (expected ", $exp?"true":"false", ", got ", + echo "$ip failed (expected ", $exp?"true":"false", ", got ", $out?"true":"false", ")\n"; } } echo "Ok\n"; ?> ---EXPECT-- +--EXPECT-- Ok diff --git a/ext/filter/tests/033.phpt b/ext/filter/tests/033.phpt index a899493161..da7f390983 100644 --- a/ext/filter/tests/033.phpt +++ b/ext/filter/tests/033.phpt @@ -9,7 +9,7 @@ default_charset=UTF-8 <?php include dirname(__FILE__) . '/033_run.inc'; ?> ---EXPECT-- +--EXPECT-- int 1 123 boolean 1 float 1 123 diff --git a/ext/filter/tests/034.phpt b/ext/filter/tests/034.phpt index 37481813a9..759420af41 100644 --- a/ext/filter/tests/034.phpt +++ b/ext/filter/tests/034.phpt @@ -29,5 +29,5 @@ foreach($booleans as $val=>$exp) { } echo "Ok."; ?> ---EXPECT-- +--EXPECT-- Ok. diff --git a/ext/filter/tests/035.phpt b/ext/filter/tests/035.phpt index e2d3325270..611c57176e 100644 --- a/ext/filter/tests/035.phpt +++ b/ext/filter/tests/035.phpt @@ -1,5 +1,5 @@ --TEST-- -GET/POST/REQUEST Test with input_filter +GET/POST/REQUEST Test with input_filter --SKIPIF-- <?php if (!extension_loaded("filter")) die("skip"); ?> --POST-- diff --git a/ext/filter/tests/037.phpt b/ext/filter/tests/037.phpt index f8497c63b0..e9f02afca4 100644 --- a/ext/filter/tests/037.phpt +++ b/ext/filter/tests/037.phpt @@ -23,7 +23,7 @@ $res = filter_input_array(INPUT_GET, array( 'filter' => FILTER_CALLBACK, 'options' => 'myfunc' ), - 'b' => FILTER_VALIDATE_INT + 'b' => FILTER_VALIDATE_INT ) ); diff --git a/ext/filter/tests/039.phpt b/ext/filter/tests/039.phpt index ae883db3e3..501414deee 100644 --- a/ext/filter/tests/039.phpt +++ b/ext/filter/tests/039.phpt @@ -49,7 +49,7 @@ var_dump($a, $b); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- -- (1) Warning: filter_var_array() expects parameter 1 to be array, null given in %s on line %d diff --git a/ext/filter/tests/040.phpt b/ext/filter/tests/040.phpt index 1d578a4f13..d77b33135e 100644 --- a/ext/filter/tests/040.phpt +++ b/ext/filter/tests/040.phpt @@ -24,7 +24,7 @@ var_dump(filter_has_var("", "cc")); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: filter_has_var() expects exactly 2 parameters, 0 given in %s on line %d bool(false) bool(false) diff --git a/ext/filter/tests/041.phpt b/ext/filter/tests/041.phpt index 0a2e3f0a11..febcbfe362 100644 --- a/ext/filter/tests/041.phpt +++ b/ext/filter/tests/041.phpt @@ -8,7 +8,7 @@ filter.default_flags=0 --COOKIE-- abc=dir; def=true; abc=root; xyz="foo bar"; --FILE-- -<?php +<?php var_dump($_COOKIE); var_dump(filter_has_var(INPUT_COOKIE, "abc")); var_dump(filter_input(INPUT_COOKIE, "abc")); diff --git a/ext/filter/tests/042.phpt b/ext/filter/tests/042.phpt index 08f4dd633a..4d5ec34158 100644 --- a/ext/filter/tests/042.phpt +++ b/ext/filter/tests/042.phpt @@ -3,7 +3,7 @@ Combination of strip & sanitize filters --SKIPIF-- <?php if (!extension_loaded("filter")) die("skip"); ?> --FILE-- -<?php +<?php $var = 'XYZ< script>alert(/ext/filter+bypass/);< /script>ABC'; $a = filter_var($var, FILTER_SANITIZE_STRING, array("flags" => FILTER_FLAG_STRIP_LOW)); echo $a . "\n"; diff --git a/ext/filter/tests/043.phpt b/ext/filter/tests/043.phpt index 92ac0517d1..b889e35476 100644 --- a/ext/filter/tests/043.phpt +++ b/ext/filter/tests/043.phpt @@ -3,7 +3,7 @@ Character encoding test --SKIPIF-- <?php if (!extension_loaded("filter")) die("skip"); ?> --FILE-- -<?php +<?php $flags = FILTER_FLAG_ENCODE_AMP|FILTER_FLAG_ENCODE_LOW|FILTER_FLAG_ENCODE_HIGH; for ($i = 0; $i < 256; $i++) { diff --git a/ext/filter/tests/044.phpt b/ext/filter/tests/044.phpt index ff4689381d..c456d473bb 100644 --- a/ext/filter/tests/044.phpt +++ b/ext/filter/tests/044.phpt @@ -5,7 +5,7 @@ Integer validation with spaces --INI-- precision=14 --FILE-- -<?php +<?php $vals = array( " ", diff --git a/ext/filter/tests/045.phpt b/ext/filter/tests/045.phpt index ad8f47ec9a..8fb934c2f0 100644 --- a/ext/filter/tests/045.phpt +++ b/ext/filter/tests/045.phpt @@ -4,7 +4,7 @@ Options must not be changed by filter_var() <?php if (!extension_loaded("filter")) die("skip"); ?> --FILE-- <?php -$a = array("flags"=>(string)FILTER_FLAG_ALLOW_HEX, "options" => array("min_range"=>"0", "max_range"=>"1024")); +$a = array("flags"=>(string)FILTER_FLAG_ALLOW_HEX, "options" => array("min_range"=>"0", "max_range"=>"1024")); $ret = filter_var("0xff", FILTER_VALIDATE_INT, $a); echo ($ret === 255 && $a["options"]["min_range"] === "0")?"ok\n":"bug\n"; echo ($ret === 255 && $a["options"]["max_range"] === "1024")?"ok\n":"bug\n"; diff --git a/ext/filter/tests/055.phpt b/ext/filter/tests/055.phpt index 688dbb2b54..28f94fe408 100644 --- a/ext/filter/tests/055.phpt +++ b/ext/filter/tests/055.phpt @@ -26,7 +26,7 @@ foreach ($values as $value) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- string(17) "01-23-45-67-89-ab" string(17) "01-23-45-67-89-ab" bool(false) diff --git a/ext/filter/tests/056.phpt b/ext/filter/tests/056.phpt index 4a27a9fa10..e3a4570ea7 100644 --- a/ext/filter/tests/056.phpt +++ b/ext/filter/tests/056.phpt @@ -6,7 +6,7 @@ filter_var() and FILTER_VALIDATE_DOMAIN <?php $values = Array( -'example.com', +'example.com', 'www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com', 'toolongtoolongtoolongtoolongtoolongtoolongtoolongtoolongtoolongtoolong.com', 'eauBcFReEmjLcoZwI0RuONNnwU4H9r151juCaqTI5VeIP5jcYIqhx1lh5vV00l2rTs6y7hOp7rYw42QZiq6VIzjcYrRm8gFRMk9U9Wi1grL8Mr5kLVloYLthHgyA94QK3SaXCATklxgo6XvcbXIqAGG7U0KxTr8hJJU1p2ZQ2mXHmp4DhYP8N9SRuEKzaCPcSIcW7uj21jZqBigsLsNAXEzU8SPXZjmVQVtwQATPWeWyGW4GuJhjP4Q8o0.com', @@ -19,9 +19,9 @@ $values = Array( '-.abc.com', 'abc.-.abc.com', 'underscore_.example.com', -'', --1, -array(), +'', +-1, +array(), '\r\n', ); foreach ($values as $value) { @@ -39,7 +39,7 @@ var_dump(filter_var('test._example.com', FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOS echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(11) "example.com" string(71) "www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com" bool(false) diff --git a/ext/filter/tests/PMOPB45.phpt b/ext/filter/tests/PMOPB45.phpt index 532eb219d3..a403b3c6e7 100644 --- a/ext/filter/tests/PMOPB45.phpt +++ b/ext/filter/tests/PMOPB45.phpt @@ -7,5 +7,5 @@ PMOPB-45-2007:PHP ext/filter Email Validation Vulnerability $var = "test@example.com\n"; var_dump(filter_var($var, FILTER_VALIDATE_EMAIL)); ?> ---EXPECT-- +--EXPECT-- bool(false) diff --git a/ext/filter/tests/bug39846.phpt b/ext/filter/tests/bug39846.phpt index 57407f1082..3beeaf8920 100644 --- a/ext/filter/tests/bug39846.phpt +++ b/ext/filter/tests/bug39846.phpt @@ -7,6 +7,6 @@ Bug #39846 (ipv4 trailing data validation) var_dump(filter_var('192.168.1.100random-text-here', FILTER_VALIDATE_IP)); var_dump(filter_var("192.168.1.155\0foo", FILTER_VALIDATE_IP)); ?> ---EXPECT-- +--EXPECT-- bool(false) bool(false) diff --git a/ext/filter/tests/bug44445.phpt b/ext/filter/tests/bug44445.phpt index 36a8641419..a8dcc046ec 100644 --- a/ext/filter/tests/bug44445.phpt +++ b/ext/filter/tests/bug44445.phpt @@ -7,6 +7,6 @@ Bug #44445 (email validator does not handle domains starting/ending with a -) var_dump(filter_var("foo@-foo.com",FILTER_VALIDATE_EMAIL)); var_dump(filter_var("foo@foo-.com",FILTER_VALIDATE_EMAIL)); ?> ---EXPECT-- +--EXPECT-- bool(false) bool(false) diff --git a/ext/filter/tests/bug46973.phpt b/ext/filter/tests/bug46973.phpt index 8c5d9db910..974e14567c 100644 --- a/ext/filter/tests/bug46973.phpt +++ b/ext/filter/tests/bug46973.phpt @@ -8,7 +8,7 @@ Bug #46973 (IPv6 address filter rejects valid address) var_dump(filter_var('1fff::a88:85a3::172.31.128.1', FILTER_VALIDATE_IP,FILTER_FLAG_IPV6)); var_dump(filter_var('3ffe:6a88:85a3:08d3:1319:8a2e:0370:7344', FILTER_VALIDATE_IP,FILTER_FLAG_IPV6)); var_dump(filter_var('1fff::a88:85a3::172.31.128.1', FILTER_VALIDATE_IP,FILTER_FLAG_IPV6)); - + ?> --EXPECT-- bool(false) diff --git a/ext/filter/tests/bug47435.phpt b/ext/filter/tests/bug47435.phpt index 9388679ebb..f192c76a0b 100644 --- a/ext/filter/tests/bug47435.phpt +++ b/ext/filter/tests/bug47435.phpt @@ -19,7 +19,7 @@ var_dump(filter_var("5f::1", FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 | FILTER_FLAG_ var_dump(filter_var("3ff3::1", FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)); var_dump(filter_var("3ff3::1", FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 | FILTER_FLAG_NO_RES_RANGE)); ?> ---EXPECT-- +--EXPECT-- string(7) "FC00::1" bool(false) string(2) "::" diff --git a/ext/filter/tests/bug49274.phpt b/ext/filter/tests/bug49274.phpt index c9141a3956..ff2a4a4ea4 100644 --- a/ext/filter/tests/bug49274.phpt +++ b/ext/filter/tests/bug49274.phpt @@ -6,5 +6,5 @@ <?php var_dump(filter_var(new stdClass, FILTER_VALIDATE_EMAIL)); ?> ---EXPECT-- +--EXPECT-- bool(false) diff --git a/ext/filter/tests/bug50158.phpt b/ext/filter/tests/bug50158.phpt index 8b29e72b2d..1a9c3b1ad2 100644 --- a/ext/filter/tests/bug50158.phpt +++ b/ext/filter/tests/bug50158.phpt @@ -5,17 +5,17 @@ Bug #50158 (FILTER_VALIDATE_EMAIL fails with valid addresses containing = or ?) --FILE-- <?php -$email_address = "test=mail@example.com"; -var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); - -$email_address = "test-mail@example.com"; -var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); - -$email_address = "test+mail@example.com"; -var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); +$email_address = "test=mail@example.com"; +var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); -$email_address = "test?mail@example.com"; -var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); +$email_address = "test-mail@example.com"; +var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); + +$email_address = "test+mail@example.com"; +var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); + +$email_address = "test?mail@example.com"; +var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); ?> --EXPECT-- diff --git a/ext/filter/tests/bug50632.phpt b/ext/filter/tests/bug50632.phpt index 2f33b91ff7..3f11202bb1 100644 --- a/ext/filter/tests/bug50632.phpt +++ b/ext/filter/tests/bug50632.phpt @@ -7,5 +7,5 @@ bug 50632, filter_input() does not return default value if the variable does not $foo = filter_input(INPUT_GET, 'foo', FILTER_VALIDATE_INT, array('flags' => FILTER_REQUIRE_SCALAR, 'options' => array('default' => 23))); var_dump($foo); ?> ---EXPECT-- +--EXPECT-- int(23) diff --git a/ext/filter/tests/bug51192.phpt b/ext/filter/tests/bug51192.phpt index 96c67eae1d..16ffeff644 100644 --- a/ext/filter/tests/bug51192.phpt +++ b/ext/filter/tests/bug51192.phpt @@ -7,7 +7,7 @@ bug 51192, FILTER_VALIDATE_URL will invalidate a hostname that includes '-' var_dump(filter_var('http://example.com/path', FILTER_VALIDATE_URL)); var_dump(filter_var('http://exa-mple.com/path', FILTER_VALIDATE_URL)); var_dump(filter_var('http://exa_mple.com/path', FILTER_VALIDATE_URL)); ---EXPECT-- +--EXPECT-- string(23) "http://example.com/path" string(24) "http://exa-mple.com/path" bool(false) diff --git a/ext/filter/tests/bug52929.phpt b/ext/filter/tests/bug52929.phpt index 29332959f7..1b22318818 100644 --- a/ext/filter/tests/bug52929.phpt +++ b/ext/filter/tests/bug52929.phpt @@ -12,7 +12,7 @@ var_dump(filter_var('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx // An invalid address likely to crash PHP due to stack exhaustion if it goes to // the validation regex. var_dump(filter_var(str_repeat('x', 8000), FILTER_VALIDATE_EMAIL)); ---EXPECT-- +--EXPECT-- string(19) "valid@email.address" bool(false) bool(false) diff --git a/ext/filter/tests/bug53037.phpt b/ext/filter/tests/bug53037.phpt index 4a1e9e318b..82ecc7a75e 100644 --- a/ext/filter/tests/bug53037.phpt +++ b/ext/filter/tests/bug53037.phpt @@ -9,6 +9,6 @@ var_dump( filter_var("", FILTER_DEFAULT, array('flags' => FILTER_FLAG_EMPTY_STRING_NULL)) ); ?> ---EXPECT-- +--EXPECT-- string(0) "" NULL diff --git a/ext/filter/tests/bug53150.phpt b/ext/filter/tests/bug53150.phpt index 4906888bdf..a8030137c3 100644 --- a/ext/filter/tests/bug53150.phpt +++ b/ext/filter/tests/bug53150.phpt @@ -17,7 +17,7 @@ var_dump(filter_var('191.255.0.0', FILTER_VALIDATE_IP)); var_dump(filter_var('191.255.0.0', FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); ?> ---EXPECT-- +--EXPECT-- string(9) "127.0.0.1" string(3) "::1" bool(false) diff --git a/ext/filter/tests/bug55478.phpt b/ext/filter/tests/bug55478.phpt index 243d7078e7..bbfd50e9b7 100644 --- a/ext/filter/tests/bug55478.phpt +++ b/ext/filter/tests/bug55478.phpt @@ -5,7 +5,7 @@ Bug #55478 (FILTER_VALIDATE_EMAIL fails with internationalized domain name addre --FILE-- <?php $email_address = "test@xn--example--7za.de"; // "example-ä.de" -var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); +var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); ?> ---EXPECT-- +--EXPECT-- string(24) "test@xn--example--7za.de" diff --git a/ext/filter/tests/bug7715.phpt b/ext/filter/tests/bug7715.phpt index b281db4f49..2f7766587d 100644 --- a/ext/filter/tests/bug7715.phpt +++ b/ext/filter/tests/bug7715.phpt @@ -22,7 +22,7 @@ foreach ($data as $val) { } echo "\n"; ?> ---EXPECT-- +--EXPECT-- float(0.23) float(-42) float(42) diff --git a/ext/filter/tests/bug8315.phpt b/ext/filter/tests/bug8315.phpt index 094d82f210..89b3be7104 100644 --- a/ext/filter/tests/bug8315.phpt +++ b/ext/filter/tests/bug8315.phpt @@ -1,5 +1,5 @@ --TEST-- -bug 8315, NULL values halt the validation +bug 8315, NULL values halt the validation --SKIPIF-- <?php if (!extension_loaded("filter")) die("skip"); ?> --FILE-- @@ -10,6 +10,6 @@ var_dump(filter_var($var, FILTER_VALIDATE_INT)); $var="3".chr(0)."foo"; var_dump(filter_var($var, FILTER_VALIDATE_FLOAT)); ?> ---EXPECT-- +--EXPECT-- bool(false) bool(false) diff --git a/ext/filter/tests/callback_closure.phpt b/ext/filter/tests/callback_closure.phpt index e27a31b37e..0ece4ab285 100644 --- a/ext/filter/tests/callback_closure.phpt +++ b/ext/filter/tests/callback_closure.phpt @@ -10,5 +10,5 @@ $callback = function ($var) { $var = "test"; var_dump(filter_var($var, FILTER_CALLBACK, array('options'=> $callback))); ?> ---EXPECT-- +--EXPECT-- string(4) "test" diff --git a/ext/filter/tests/callback_non_modified_var.phpt b/ext/filter/tests/callback_non_modified_var.phpt index f0d557577b..e546fcc89d 100644 --- a/ext/filter/tests/callback_non_modified_var.phpt +++ b/ext/filter/tests/callback_non_modified_var.phpt @@ -10,5 +10,5 @@ function callback($var) { $var = "test"; var_dump(filter_var($var, FILTER_CALLBACK, array('options'=>'callback'))); ?> ---EXPECT-- +--EXPECT-- string(4) "test" |