]> granicus.if.org Git - php/commitdiff
MFH
authorArnaud Le Blanc <lbarnaud@php.net>
Fri, 24 Apr 2009 19:48:41 +0000 (19:48 +0000)
committerArnaud Le Blanc <lbarnaud@php.net>
Fri, 24 Apr 2009 19:48:41 +0000 (19:48 +0000)
ext/standard/tests/network/bug20134.phpt
ext/standard/tests/strings/bug40754.phpt
ext/standard/tests/url/bug47174.phpt
ext/standard/tests/versioning/php_sapi_name.phpt
sapi/cgi/tests/002.phpt
sapi/cgi/tests/003.phpt
sapi/cgi/tests/008.phpt
sapi/cgi/tests/009.phpt

index e311f892f774dbe9586c2f4a4931f35dc120e6b8..400e3fb15cc4f96826f2d36ec103bbe3972ae951 100644 (file)
@@ -11,7 +11,7 @@ if (!$fp) {
 }
 else {
        /* Likewise, writes will always appear to succeed */
-    $x = fwrite($fp,"\n");
+    $x = fwrite($fp,b"\n");
        var_dump($x);
        /* But reads should always fail */
     $content = fread($fp, 40);
index e4bba8f440ad78e086fe485ba49fc092c813326c..6cfe47056ba5c8eb9c20096b4a3bfe5f92811c32 100644 (file)
@@ -27,8 +27,8 @@ var_dump(substr("abcde", $v, $v));
 
 ?>
 --EXPECTF--    
-string(4) "bcde"
-string(6) "abcdex"
+%unicode|string%(4) "bcde"
+%unicode|string%(6) "abcdex"
 bool(false)
 bool(false)
 
index 6d080632531a2908b79d9ea0fd53ffaee1b11b85..0296dbe753503a10259148830b30ffcdc1afaeaa 100644 (file)
@@ -2,13 +2,13 @@
 Bug #47174 (base64_decode() interprets pad char in mid string as terminator)
 --FILE--
 <?php
-if (base64_decode("dGVzdA==") == base64_decode("dGVzdA==CRAP")) {
+if (base64_decode(b"dGVzdA==") == base64_decode(b"dGVzdA==CRAP")) {
     echo "Same octect data - Signature Valid\n";
 } else {
     echo "Invalid Signature\n";
 }
 
-$in = base64_encode("foo") . '==' . base64_encode("bar");
+$in = base64_encode(b"foo") . b'==' . base64_encode(b"bar");
 var_dump($in, base64_decode($in));
 
 ?>
index 0747b32d66e4414362a04ab068d797801e5659f6..c9d4988d9532d7481bf83f394418ea554a7828df 100644 (file)
@@ -6,4 +6,4 @@ php_sapi_name test
 var_dump(php_sapi_name());
 
 --EXPECTF--
-string(3) "c%ci"
+%unicode|string%(3) "c%ci"
index 66e2424f2858f31100a0cc49675417fdf3ad6e50..884e6521e2d5098cfcd8426989e0e6c47038d563 100644 (file)
@@ -29,24 +29,24 @@ echo "Done\n";
 ?>
 --EXPECTF--    
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
-string(3) "111"
+%unicode|string%(3) "111"
 "
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
-string(3) "500"
+%unicode|string%(3) "500"
 "
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
-string(3) "555"
+%unicode|string%(3) "555"
 "
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
-string(3) "555"
-string(10) "/test/path"
+%unicode|string%(3) "555"
+%unicode|string%(10) "/test/path"
 "
 Done
index ea418d104ca507585d46eb07989c9f2da8d8dfdc..533743323f9b8d133c236f05a930452f98e96876 100644 (file)
@@ -42,7 +42,7 @@ echo "Done\n";
 ?>
 --EXPECTF--    
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
 
 <?php
@@ -50,12 +50,12 @@ Content-type: text/html
 "
 string(%d) "Status: 404 Not Found
 X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
 No input file specified.
 "
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
 <?php  class test { function foo() {} } ?>
 "
index 40140e87925e40a106c499779535c02b02d7b250..7537664cc8462dd3a0e7c8ed4e0c693761aadb89 100644 (file)
@@ -39,7 +39,7 @@ echo "Done\n";
 ?>
 --EXPECTF--    
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
 <code><span style="color: #000000">
 <br /><span style="color: #0000BB">&lt;?php<br />$test&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"var"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//var<br />/*&nbsp;test&nbsp;class&nbsp;*/<br /></span><span style="color: #007700">class&nbsp;</span><span style="color: #0000BB">test&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;</span><span style="color: #0000BB">$var&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;static&nbsp;function&nbsp;</span><span style="color: #0000BB">foo</span><span style="color: #007700">(</span><span style="color: #0000BB">Test&nbsp;$arg</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"hello"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br /></span><span style="color: #0000BB">$o&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">test</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;<br /></span>
@@ -47,7 +47,7 @@ Content-type: text/html
 </code>"
 string(%d) "Status: 404 Not Found
 X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
 No input file specified.
 "
index 1c429ac1985cc5c57190e24c655c3e6873ba7e26..c8e9ae1af1242a6af3c38c82e9745e063e74f0ef 100644 (file)
@@ -24,7 +24,7 @@ echo "Done\n";
 ?>
 --EXPECTF--
 X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
 string(%d) "%s/x"
 Done