diff options
author | Pedro Magalhães <mail@pmmaga.net> | 2016-11-06 22:28:42 +0100 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2016-11-20 21:11:53 +0100 |
commit | 9c5af4e4cb2f1cadc659542dad8967e9fd05f1d4 (patch) | |
tree | 8223a6d88419c2d2a3008e35c4059b075422dd42 /ext | |
parent | b98357823a816a55097fc7f6f833db88722efeea (diff) | |
download | php-git-9c5af4e4cb2f1cadc659542dad8967e9fd05f1d4.tar.gz |
Remove the b prefix from literals on unrelated tests
Diffstat (limited to 'ext')
299 files changed, 854 insertions, 854 deletions
diff --git a/ext/dom/tests/domxpath.phpt b/ext/dom/tests/domxpath.phpt index 82396b5218..e63c96ba93 100644 --- a/ext/dom/tests/domxpath.phpt +++ b/ext/dom/tests/domxpath.phpt @@ -21,7 +21,7 @@ function MyAverage($nodelist) { } $dom = new DOMDocument; -$dom->loadXML(b'<root xmlns="urn::default"><child>myval</child></root>'); +$dom->loadXML('<root xmlns="urn::default"><child>myval</child></root>'); $xpath = new DOMXPath($dom); diff --git a/ext/hash/tests/hash_copy_001.phpt b/ext/hash/tests/hash_copy_001.phpt index b33d449762..cd1af4de09 100644 --- a/ext/hash/tests/hash_copy_001.phpt +++ b/ext/hash/tests/hash_copy_001.phpt @@ -10,7 +10,7 @@ $algos = hash_algos(); foreach ($algos as $algo) { var_dump($algo); $orig = hash_init($algo); - hash_update($orig, b"I can't remember anything"); + hash_update($orig, "I can't remember anything"); $copy = hash_copy($orig); var_dump(hash_final($orig)); @@ -20,11 +20,11 @@ foreach ($algos as $algo) { foreach ($algos as $algo) { var_dump($algo); $orig = hash_init($algo); - hash_update($orig, b"I can't remember anything"); + hash_update($orig, "I can't remember anything"); $copy = hash_copy($orig); var_dump(hash_final($orig)); - hash_update($copy, b"Can’t tell if this is true or dream"); + hash_update($copy, "Can’t tell if this is true or dream"); var_dump(hash_final($copy)); } diff --git a/ext/iconv/tests/iconv_basic.phpt b/ext/iconv/tests/iconv_basic.phpt index e0e2cb2061..8669af040c 100644 --- a/ext/iconv/tests/iconv_basic.phpt +++ b/ext/iconv/tests/iconv_basic.phpt @@ -19,9 +19,9 @@ function_exists('iconv') or die("skip iconv() is not available in this build"); echo "*** Testing iconv() : basic functionality ***\n"; //All strings are the same when displayed in their respective encodings -$sjis_string = base64_decode(b'k/qWe4zqg2WDTINYg2eCxYK3gUIwMTIzNIJUglWCVoJXgliBQg=='); -$euc_jp_string = base64_decode(b'xvzL3LjspcalraW5pcikx6S5oaMwMTIzNKO1o7ajt6O4o7mhow=='); -$utf8_string = base64_decode(b'5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); +$sjis_string = base64_decode('k/qWe4zqg2WDTINYg2eCxYK3gUIwMTIzNIJUglWCVoJXgliBQg=='); +$euc_jp_string = base64_decode('xvzL3LjspcalraW5pcikx6S5oaMwMTIzNKO1o7ajt6O4o7mhow=='); +$utf8_string = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); echo "\n-- Convert to EUC-JP --\n"; echo "Expected EUC-JP encoded string in base64:\n"; diff --git a/ext/iconv/tests/iconv_mime_decode_variation1.phpt b/ext/iconv/tests/iconv_mime_decode_variation1.phpt index a42b0de234..4d91d68add 100644 --- a/ext/iconv/tests/iconv_mime_decode_variation1.phpt +++ b/ext/iconv/tests/iconv_mime_decode_variation1.phpt @@ -19,7 +19,7 @@ function_exists('iconv_mime_decode') or die("skip iconv_mime_decode() is not ava echo "*** Testing iconv_mime_decode() : usage variations ***\n"; // Initialise function arguments not being substituted -$header = b'Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?='; +$header = 'Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?='; $mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR; $charset = 'ISO-8859-1'; diff --git a/ext/iconv/tests/iconv_mime_decode_variation2.phpt b/ext/iconv/tests/iconv_mime_decode_variation2.phpt index 8a3134edac..f4508e9860 100644 --- a/ext/iconv/tests/iconv_mime_decode_variation2.phpt +++ b/ext/iconv/tests/iconv_mime_decode_variation2.phpt @@ -20,7 +20,7 @@ function_exists('iconv_mime_decode') or die("skip iconv_mime_decode() is not ava echo "*** Testing iconv_mime_decode() : usage variations ***\n"; // Initialise function arguments not being substituted -$header = b'Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?='; +$header = 'Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?='; $mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR; $charset = 'UTF-8'; diff --git a/ext/iconv/tests/iconv_mime_decode_variation3.phpt b/ext/iconv/tests/iconv_mime_decode_variation3.phpt index cd5c719cbb..c077aa10fa 100644 --- a/ext/iconv/tests/iconv_mime_decode_variation3.phpt +++ b/ext/iconv/tests/iconv_mime_decode_variation3.phpt @@ -22,7 +22,7 @@ echo "*** Testing iconv_mime_decode() : usage variations ***\n"; // Some of the parameters actually passed to charset will request to use // a default charset determined by the platform. In order for this test to // run on both linux and windows, the subject will have to be ascii only. -$header = b'Subject: =?UTF-8?B?QSBTYW1wbGUgVGVzdA==?='; +$header = 'Subject: =?UTF-8?B?QSBTYW1wbGUgVGVzdA==?='; $mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR; $charset = 'UTF-8'; diff --git a/ext/iconv/tests/iconv_strlen_basic.phpt b/ext/iconv/tests/iconv_strlen_basic.phpt index 5777435d61..e5d6271f69 100644 --- a/ext/iconv/tests/iconv_strlen_basic.phpt +++ b/ext/iconv/tests/iconv_strlen_basic.phpt @@ -18,9 +18,9 @@ function_exists('iconv_strlen') or die("skip iconv_strlen() is not available in echo "*** Testing iconv_strlen() : basic functionality***\n"; -$string_ascii = b'abc def'; +$string_ascii = 'abc def'; //Japanese string in UTF-8 -$string_mb = base64_decode(b'5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); +$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); echo "\n-- ASCII String --\n"; var_dump(iconv_strlen($string_ascii)); diff --git a/ext/iconv/tests/iconv_strpos_basic.phpt b/ext/iconv/tests/iconv_strpos_basic.phpt index 25f8f1b1fd..1017f8e3b6 100644 --- a/ext/iconv/tests/iconv_strpos_basic.phpt +++ b/ext/iconv/tests/iconv_strpos_basic.phpt @@ -22,22 +22,22 @@ echo "*** Testing iconv_strpos() : basic functionality***\n"; iconv_set_encoding("internal_encoding", "UTF-8"); -$string_ascii = b'abc def'; +$string_ascii = 'abc def'; //Japanese string in UTF-8 -$string_mb = base64_decode(b'5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); +$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); echo "\n-- ASCII string 1 --\n"; -var_dump(iconv_strpos($string_ascii, b'd', 2, 'ISO-8859-1')); +var_dump(iconv_strpos($string_ascii, 'd', 2, 'ISO-8859-1')); echo "\n-- ASCII string 2 --\n"; -var_dump(iconv_strpos($string_ascii, b'123')); +var_dump(iconv_strpos($string_ascii, '123')); echo "\n-- Multibyte string 1 --\n"; $needle1 = base64_decode('5pel5pys6Kqe'); var_dump(iconv_strpos($string_mb, $needle1)); echo "\n-- Multibyte string 2 --\n"; -$needle2 = base64_decode(b"44GT44KT44Gr44Gh44Gv44CB5LiW55WM"); +$needle2 = base64_decode("44GT44KT44Gr44Gh44Gv44CB5LiW55WM"); var_dump(iconv_strpos($string_mb, $needle2)); echo "Done"; diff --git a/ext/iconv/tests/iconv_strpos_variation3.phpt b/ext/iconv/tests/iconv_strpos_variation3.phpt index 6f27b74a52..ea889a07bd 100644 --- a/ext/iconv/tests/iconv_strpos_variation3.phpt +++ b/ext/iconv/tests/iconv_strpos_variation3.phpt @@ -20,8 +20,8 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); echo "*** Testing iconv_strpos() : usage variations ***\n"; // Initialise function arguments not being substituted -$needle = b'a'; -$haystack = b'string_val'; +$needle = 'a'; +$haystack = 'string_val'; $encoding = 'utf-8'; //get an unset variable diff --git a/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt b/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt index 2704493235..c4e3e141a1 100644 --- a/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt +++ b/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt @@ -20,8 +20,8 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); echo "*** Testing iconv_strpos() : usage variations ***\n"; // Initialise function arguments not being substituted -$needle = b'a'; -$haystack = b'string_val'; +$needle = 'a'; +$haystack = 'string_val'; $encoding = 'utf-8'; //get an unset variable diff --git a/ext/iconv/tests/iconv_strpos_variation4.phpt b/ext/iconv/tests/iconv_strpos_variation4.phpt index 43ab3e5781..539305541a 100644 --- a/ext/iconv/tests/iconv_strpos_variation4.phpt +++ b/ext/iconv/tests/iconv_strpos_variation4.phpt @@ -21,8 +21,8 @@ function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in echo "*** Testing iconv_strpos() : usage variations ***\n"; // Initialise function arguments not being substituted -$haystack = b'string_val'; -$needle = b'val'; +$haystack = 'string_val'; +$needle = 'val'; $offset = 0; //get an unset variable diff --git a/ext/iconv/tests/iconv_strpos_variation5.phpt b/ext/iconv/tests/iconv_strpos_variation5.phpt index fcd5aaecae..759294f73a 100644 --- a/ext/iconv/tests/iconv_strpos_variation5.phpt +++ b/ext/iconv/tests/iconv_strpos_variation5.phpt @@ -24,11 +24,11 @@ iconv_set_encoding("internal_encoding", "UTF-8"); echo "*** Testing iconv_strpos() : usage variations ***\n"; -$string_ascii = b'+Is an English string'; //21 chars -$needle_ascii = b'g'; +$string_ascii = '+Is an English string'; //21 chars +$needle_ascii = 'g'; -$string_mb = base64_decode(b'5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); //21 chars -$needle_mb = base64_decode(b'44CC'); +$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); //21 chars +$needle_mb = base64_decode('44CC'); /* * Loop through integers as multiples of ten for $offset argument diff --git a/ext/iconv/tests/iconv_strrpos_basic.phpt b/ext/iconv/tests/iconv_strrpos_basic.phpt index 3d34a23f11..78dfaa0db1 100644 --- a/ext/iconv/tests/iconv_strrpos_basic.phpt +++ b/ext/iconv/tests/iconv_strrpos_basic.phpt @@ -22,22 +22,22 @@ echo "*** Testing iconv_strrpos() : basic ***\n"; iconv_set_encoding("internal_encoding", "UTF-8"); -$string_ascii = b'This is an English string. 0123456789.'; +$string_ascii = 'This is an English string. 0123456789.'; //Japanese string in UTF-8 -$string_mb = base64_decode(b'5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); +$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); echo "\n-- ASCII string 1 --\n"; -var_dump(iconv_strrpos($string_ascii, b'is', 'ISO-8859-1')); +var_dump(iconv_strrpos($string_ascii, 'is', 'ISO-8859-1')); echo "\n-- ASCII string 2 --\n"; -var_dump(iconv_strrpos($string_ascii, b'hello, world')); +var_dump(iconv_strrpos($string_ascii, 'hello, world')); echo "\n-- Multibyte string 1 --\n"; -$needle1 = base64_decode(b'44CC'); +$needle1 = base64_decode('44CC'); var_dump(iconv_strrpos($string_mb, $needle1)); echo "\n-- Multibyte string 2 --\n"; -$needle2 = base64_decode(b'44GT44KT44Gr44Gh44Gv44CB5LiW55WM'); +$needle2 = base64_decode('44GT44KT44Gr44Gh44Gv44CB5LiW55WM'); var_dump(iconv_strrpos($string_mb, $needle2)); echo "Done"; diff --git a/ext/iconv/tests/iconv_strrpos_variation3.phpt b/ext/iconv/tests/iconv_strrpos_variation3.phpt index 87a21bd7a4..373e905173 100644 --- a/ext/iconv/tests/iconv_strrpos_variation3.phpt +++ b/ext/iconv/tests/iconv_strrpos_variation3.phpt @@ -20,8 +20,8 @@ function_exists('iconv_strrpos') or die("skip iconv_strrpos() is not available i echo "*** Testing iconv_strrpos() : usage variations ***\n"; // Initialise function arguments not being substituted -$haystack = b'hello, world'; -$needle = b'world'; +$haystack = 'hello, world'; +$needle = 'world'; //get an unset variable $unset_var = 10; diff --git a/ext/iconv/tests/iconv_substr_basic.phpt b/ext/iconv/tests/iconv_substr_basic.phpt index 0754fc8779..2e33c5aa9b 100644 --- a/ext/iconv/tests/iconv_substr_basic.phpt +++ b/ext/iconv/tests/iconv_substr_basic.phpt @@ -22,9 +22,9 @@ iconv.output_encoding=ISO-8859-1 echo "*** Testing iconv_substr() : basic functionality ***\n"; -$string_ascii = b'ABCDEF'; +$string_ascii = 'ABCDEF'; //Japanese string in UTF-8 -$string_mb = base64_decode(b'5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); +$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); echo "\n-- ASCII string 1 --\n"; var_dump(bin2hex(iconv_substr($string_ascii, 3))); diff --git a/ext/imap/tests/imap_base64_basic.phpt b/ext/imap/tests/imap_base64_basic.phpt index a64be276d9..f5cc6039f3 100644 --- a/ext/imap/tests/imap_base64_basic.phpt +++ b/ext/imap/tests/imap_base64_basic.phpt @@ -13,7 +13,7 @@ extension_loaded('imap') or die('skip imap extension not available in this build echo "*** Testing imap_base64() : basic functionality ***\n"; -$str = b'This is an example string to be base 64 encoded'; +$str = 'This is an example string to be base 64 encoded'; $base64 = base64_encode($str); if (imap_base64($base64) == $str) { echo "TEST PASSED\n"; @@ -21,7 +21,7 @@ if (imap_base64($base64) == $str) { echo "TEST FAILED"; } -$str = b'!£$%^&*()_+-={][];;@~#?/>.<,'; +$str = '!£$%^&*()_+-={][];;@~#?/>.<,'; $base64 = base64_encode($str); if (imap_base64($base64) == $str) { echo "TEST PASSED\n"; @@ -29,7 +29,7 @@ if (imap_base64($base64) == $str) { echo "TEST FAILED"; } -$hex = b'x00\x01\x02\x03\x04\x05\x06\xFA\xFB\xFC\xFD\xFE\xFF'; +$hex = 'x00\x01\x02\x03\x04\x05\x06\xFA\xFB\xFC\xFD\xFE\xFF'; $base64 = base64_encode($hex); if (imap_base64($base64) == $hex) { echo "TEST PASSED\n"; diff --git a/ext/imap/tests/imap_binary_basic.phpt b/ext/imap/tests/imap_binary_basic.phpt index bd4eabba51..3deb51a6a6 100644 --- a/ext/imap/tests/imap_binary_basic.phpt +++ b/ext/imap/tests/imap_binary_basic.phpt @@ -14,22 +14,22 @@ extension_loaded('imap') or die('skip imap extension not available in this build echo "*** Testing imap_binary() : basic functionality ***\n"; echo "Encode as short string\n"; -$str = b'This is an example string to be base 64 encoded'; +$str = 'This is an example string to be base 64 encoded'; $base64 = imap_binary($str); var_dump(bin2hex($base64)); echo "Encode a string which results in more than 60 charters of output\n"; -$str = b'This is a long string with results in more than 60 characters of output'; +$str = 'This is a long string with results in more than 60 characters of output'; $base64 = imap_binary($str); var_dump(bin2hex($base64)); echo "Encode a string with special characters\n"; -$str = b'_+-={][];;@~#?/>.<,'; +$str = '_+-={][];;@~#?/>.<,'; $base64 = imap_binary($str); var_dump(bin2hex($base64)); echo "Encode some hexadecimal data\n"; -$hex = b'x00\x01\x02\x03\x04\x05\x06\xFA\xFB\xFC\xFD\xFE\xFF'; +$hex = 'x00\x01\x02\x03\x04\x05\x06\xFA\xFB\xFC\xFD\xFE\xFF'; $base64 = imap_binary($hex); var_dump(bin2hex($base64)); diff --git a/ext/mbstring/tests/bug43840.phpt b/ext/mbstring/tests/bug43840.phpt index 626cd70f8f..b2dd048186 100644 --- a/ext/mbstring/tests/bug43840.phpt +++ b/ext/mbstring/tests/bug43840.phpt @@ -28,7 +28,7 @@ foreach($offsets as $i) { echo "--Multibyte String:--\n"; var_dump( mb_strpos($string_mb, $needle, $i, 'UTF-8') ); echo"--ASCII String:--\n"; - var_dump(mb_strpos(b'This is na English ta', b'a', $i)); + var_dump(mb_strpos('This is na English ta', 'a', $i)); } ?> --EXPECTF-- diff --git a/ext/mbstring/tests/bug43841.phpt b/ext/mbstring/tests/bug43841.phpt index 9f2583286c..c4be058ffa 100644 --- a/ext/mbstring/tests/bug43841.phpt +++ b/ext/mbstring/tests/bug43841.phpt @@ -28,9 +28,9 @@ foreach ($offsets as $i) { var_dump( mb_strrpos($string_mb, $needle, $i, 'UTF-8') ); echo "ASCII String:\n"; echo "mb_strrpos:\n"; - var_dump(mb_strrpos(b'This is na English ta', b'a', $i)); + var_dump(mb_strrpos('This is na English ta', 'a', $i)); echo "strrpos:\n"; - var_dump(strrpos(b'This is na English ta', b'a', $i)); + var_dump(strrpos('This is na English ta', 'a', $i)); } ?> diff --git a/ext/mbstring/tests/mb_convert_encoding_variation1.phpt b/ext/mbstring/tests/mb_convert_encoding_variation1.phpt index e3f1c83a12..c8d2114380 100644 --- a/ext/mbstring/tests/mb_convert_encoding_variation1.phpt +++ b/ext/mbstring/tests/mb_convert_encoding_variation1.phpt @@ -21,7 +21,7 @@ echo "*** Testing mb_convert_encoding() : usage variations ***\n"; // Initialise function arguments not being substituted mb_internal_encoding('utf-8'); -$sourcestring = b'hello, world'; +$sourcestring = 'hello, world'; //get an unset variable $unset_var = 10; diff --git a/ext/mbstring/tests/mb_ereg.phpt b/ext/mbstring/tests/mb_ereg.phpt index 8fc5b94da7..3b2d13de51 100644 --- a/ext/mbstring/tests/mb_ereg.phpt +++ b/ext/mbstring/tests/mb_ereg.phpt @@ -17,13 +17,13 @@ output_handler= mb_regex_encoding( $test_enc ); $pat = mb_convert_encoding( $pat, $test_enc, $in_enc ); $str = mb_convert_encoding( $str, $test_enc, $in_enc ); - printf( "(%d)%s\n", mb_ereg( $pat, $str, $reg ), ( is_array( $reg )? bin2hex(mb_convert_encoding( implode( b' ', $reg ), $in_enc, $test_enc )) : '' ) ); + printf( "(%d)%s\n", mb_ereg( $pat, $str, $reg ), ( is_array( $reg )? bin2hex(mb_convert_encoding( implode( ' ', $reg ), $in_enc, $test_enc )) : '' ) ); } function do_tests( $enc ) { - test_ereg( $enc, b'abc ([a-z]+) ([a-z]+) ([a-z]+)$', b"abc def ghi jkl" ); - $pat = b'([£á-£ú]+) ([ ¤¢-¤«]+)([¤«-¤Ê]+) ([¤ï-¤ó]+)$'; - test_ereg( $enc, $pat, b'£á£â£ã ¤¢¤ª¤¤ ¤«¤³¤Ê ¤ï¤ñ¤ó' ); - test_ereg( $enc, $pat, b'£í£ú£ø£æ£ð ¤¦¤ª¤« ¤¤« ¤ò¤ð' ); + test_ereg( $enc, 'abc ([a-z]+) ([a-z]+) ([a-z]+)$', "abc def ghi jkl" ); + $pat = '([£á-£ú]+) ([ ¤¢-¤«]+)([¤«-¤Ê]+) ([¤ï-¤ó]+)$'; + test_ereg( $enc, $pat, '£á£â£ã ¤¢¤ª¤¤ ¤«¤³¤Ê ¤ï¤ñ¤ó' ); + test_ereg( $enc, $pat, '£í£ú£ø£æ£ð ¤¦¤ª¤« ¤¤« ¤ò¤ð' ); } foreach( $encs as $enc ) { diff --git a/ext/mbstring/tests/mb_ereg_basic.phpt b/ext/mbstring/tests/mb_ereg_basic.phpt index 6ab15f4a5b..ff64666f08 100644 --- a/ext/mbstring/tests/mb_ereg_basic.phpt +++ b/ext/mbstring/tests/mb_ereg_basic.phpt @@ -23,9 +23,9 @@ if(mb_regex_encoding('utf-8') == true) { } else { echo "Could not set regex encoding to utf-8\n"; } -$string_ascii = b'This is an English string. 0123456789.'; -$regex_ascii1 = b'(.*is)+.*\.[[:blank:]][0-9]{9}'; -$regex_ascii2 = b'.*is+'; +$string_ascii = 'This is an English string. 0123456789.'; +$regex_ascii1 = '(.*is)+.*\.[[:blank:]][0-9]{9}'; +$regex_ascii2 = '.*is+'; $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); $regex_mb1 = base64_decode('KOaXpeacrOiqnikuKj8oWzEtOV0rKQ=='); diff --git a/ext/mbstring/tests/mb_ereg_error.phpt b/ext/mbstring/tests/mb_ereg_error.phpt index 3610aea4eb..21216257cd 100644 --- a/ext/mbstring/tests/mb_ereg_error.phpt +++ b/ext/mbstring/tests/mb_ereg_error.phpt @@ -21,15 +21,15 @@ echo "*** Testing mb_ereg() : error conditions ***\n"; //Test mb_ereg with one more than the expected number of arguments echo "\n-- Testing mb_ereg() function with more than expected no. of arguments --\n"; -$pattern = b'string_val'; -$string = b'string_val'; +$pattern = 'string_val'; +$string = 'string_val'; $registers = array(1, 2); $extra_arg = 10; var_dump( mb_ereg($pattern, $string, $registers, $extra_arg) ); // Testing mb_ereg with one less than the expected number of arguments echo "\n-- Testing mb_ereg() function with less than expected no. of arguments --\n"; -$pattern = b'string_val'; +$pattern = 'string_val'; var_dump( mb_ereg($pattern) ); echo "Done"; diff --git a/ext/mbstring/tests/mb_ereg_match_basic.phpt b/ext/mbstring/tests/mb_ereg_match_basic.phpt index 56710a93e2..c035acc018 100644 --- a/ext/mbstring/tests/mb_ereg_match_basic.phpt +++ b/ext/mbstring/tests/mb_ereg_match_basic.phpt @@ -20,20 +20,20 @@ mb_internal_encoding('UTF-8'); mb_regex_encoding('UTF-8'); echo "*** Testing mb_ereg_match() : basic functionality ***\n"; -$string_ascii = b'abc def, 0123456789'; +$string_ascii = 'abc def, 0123456789'; $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); //will return true as pattern matches from start of string echo "\n-- ASCII string 1 --\n"; -var_dump(mb_ereg_match(b'.*def', $string_ascii)); +var_dump(mb_ereg_match('.*def', $string_ascii)); //will return false as pattern would match half way through string echo "\n-- ASCII string 2 --\n"; -var_dump(mb_ereg_match(b'def', $string_ascii)); +var_dump(mb_ereg_match('def', $string_ascii)); echo "\n-- Multibyte string 1 --\n"; $regex1 = base64_decode('5pel5pys6KqeKC4qKT9bMS05XSs='); -var_dump(mb_ereg_match($regex1, $string_mb, b'i')); +var_dump(mb_ereg_match($regex1, $string_mb, 'i')); echo "\n-- Multibyte string 2 --\n"; $regex2 = base64_decode('5LiW55WM'); diff --git a/ext/mbstring/tests/mb_ereg_match_error1.phpt b/ext/mbstring/tests/mb_ereg_match_error1.phpt index b36c68621b..aab95fe6cd 100644 --- a/ext/mbstring/tests/mb_ereg_match_error1.phpt +++ b/ext/mbstring/tests/mb_ereg_match_error1.phpt @@ -21,15 +21,15 @@ echo "*** Testing mb_ereg_match() : error conditions ***\n"; //Test mb_ereg_match with one more than the expected number of arguments echo "\n-- Testing mb_ereg_match() function with more than expected no. of arguments --\n"; -$pattern = b'string_val'; -$string = b'string_val'; +$pattern = 'string_val'; +$string = 'string_val'; $option = 'string_val'; $extra_arg = 10; var_dump( mb_ereg_match($pattern, $string, $option, $extra_arg) ); // Testing mb_ereg_match with one less than the expected number of arguments echo "\n-- Testing mb_ereg_match() function with less than expected no. of arguments --\n"; -$pattern = b'string_val'; +$pattern = 'string_val'; var_dump( mb_ereg_match($pattern) ); // Testing mb_ereg_match with zero arguments diff --git a/ext/mbstring/tests/mb_ereg_replace_basic.phpt b/ext/mbstring/tests/mb_ereg_replace_basic.phpt index 5a07004d58..746dd4e1a4 100644 --- a/ext/mbstring/tests/mb_ereg_replace_basic.phpt +++ b/ext/mbstring/tests/mb_ereg_replace_basic.phpt @@ -22,25 +22,25 @@ echo "*** Testing mb_ereg_replace() : basic functionality ***\n"; mb_internal_encoding('UTF-8'); mb_regex_encoding('UTF-8'); -$string_ascii = b'abc def'; +$string_ascii = 'abc def'; $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); echo "\n-- ASCII string 1 --\n"; -$result_1 = mb_ereg_replace(b'(.*)def', b'\\1 123', $string_ascii); +$result_1 = mb_ereg_replace('(.*)def', '\\1 123', $string_ascii); var_dump(bin2hex($result_1)); echo "\n-- ASCII string 2 --\n"; -$result_2 = mb_ereg_replace(b'123', b'abc', $string_ascii); +$result_2 = mb_ereg_replace('123', 'abc', $string_ascii); var_dump(bin2hex($result_2)); echo "\n-- Multibyte string 1 --\n"; $regex1 = base64_decode('KOaXpeacrOiqnikuKj8oWzEtOV0rKQ=='); //Japanese regex in UTF-8 -$result_3 = mb_ereg_replace($regex1, b'\\1_____\\2', $string_mb); +$result_3 = mb_ereg_replace($regex1, '\\1_____\\2', $string_mb); var_dump(bin2hex($result_3)); echo "\n-- Multibyte string 2 --\n"; $regex2 = base64_decode('5LiW55WM'); -$result_4 = mb_ereg_replace($regex2, b'_____', $string_mb); +$result_4 = mb_ereg_replace($regex2, '_____', $string_mb); var_dump(bin2hex($result_4)); echo "Done"; diff --git a/ext/mbstring/tests/mb_ereg_replace_error.phpt b/ext/mbstring/tests/mb_ereg_replace_error.phpt index 9413936b2d..4e8a3388dd 100644 --- a/ext/mbstring/tests/mb_ereg_replace_error.phpt +++ b/ext/mbstring/tests/mb_ereg_replace_error.phpt @@ -17,17 +17,17 @@ echo "*** Testing mb_ereg_replace() : error conditions ***\n"; //Test mb_ereg_replace with one more than the expected number of arguments echo "\n-- Testing mb_ereg_replace() function with more than expected no. of arguments --\n"; -$pattern = b'[a-k]'; -$replacement = b'1'; -$string = b'string_val'; +$pattern = '[a-k]'; +$replacement = '1'; +$string = 'string_val'; $option = ''; $extra_arg = 10; var_dump( mb_ereg_replace($pattern, $replacement, $string, $option, $extra_arg) ); // Testing mb_ereg_replace with one less than the expected number of arguments echo "\n-- Testing mb_ereg_replace() function with less than expected no. of arguments --\n"; -$pattern = b'string_val'; -$replacement = b'string_val'; +$pattern = 'string_val'; +$replacement = 'string_val'; var_dump( mb_ereg_replace($pattern, $replacement) ); echo "Done"; diff --git a/ext/mbstring/tests/mb_ereg_variation3.phpt b/ext/mbstring/tests/mb_ereg_variation3.phpt index d30ddc786b..9ccb1a2124 100644 --- a/ext/mbstring/tests/mb_ereg_variation3.phpt +++ b/ext/mbstring/tests/mb_ereg_variation3.phpt @@ -21,18 +21,18 @@ echo "*** Testing mb_ereg() : variation ***\n"; mb_regex_encoding('utf-8'); // have to set otherwise won't match $mb properly $mb = base64_decode('5pel5pys6Kqe'); -$character_classes = array (b'aB1' => b'[[:alnum:]]+', /*1*/ - b'aBcD' => b'[[:alpha:]]+', - b'ab/=' => b'[[:ascii:]]+', - b" \t" => b'[[:blank:]]+', - b'234' => b'[[:digit:]]+', /*5*/ - "$mb" => b'[[:graph:]]+', - b'fjds' => b'[[:lower:]]+', - b"$mb\t" => b'[[:print:]]+', - b'.!"*@' => b'[[:punct:]]+', - b"\t" => b'[[:space:]]+', /*10*/ - b'IDSJV' => b'[[:upper:]]+', - b'3b5D' => b'[[:xdigit:]]+'); /*12*/ +$character_classes = array ('aB1' => '[[:alnum:]]+', /*1*/ + 'aBcD' => '[[:alpha:]]+', + 'ab/=' => '[[:ascii:]]+', + " \t" => '[[:blank:]]+', + '234' => '[[:digit:]]+', /*5*/ + "$mb" => '[[:graph:]]+', + 'fjds' => '[[:lower:]]+', + "$mb\t" => '[[:print:]]+', + '.!"*@' => '[[:punct:]]+', + "\t" => '[[:space:]]+', /*10*/ + 'IDSJV' => '[[:upper:]]+', + '3b5D' => '[[:xdigit:]]+'); /*12*/ $iterator = 1; foreach($character_classes as $string => $pattern) { diff --git a/ext/mbstring/tests/mb_ereg_variation4.phpt b/ext/mbstring/tests/mb_ereg_variation4.phpt index 788d4feffe..7f7d6dfc93 100644 --- a/ext/mbstring/tests/mb_ereg_variation4.phpt +++ b/ext/mbstring/tests/mb_ereg_variation4.phpt @@ -23,19 +23,19 @@ mb_regex_encoding('utf-8'); //contains japanese characters, ASCII digits and different, UTF-8 encoded digits $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); -$character_classes = array (b'[[:alnum:]]+', /*1*/ - b'[[:alpha:]]+', - b'[[:ascii:]]+', - b'[[:blank:]]+', - b'[[:cntrl:]]+',/*5*/ - b'[[:digit:]]+', - b'[[:graph:]]+', - b'[[:lower:]]+', - b'[[:print:]]+', - b'[[:punct:]]+', /*10*/ - b'[[:space:]]+', - b'[[:upper:]]+', - b'[[:xdigit:]]+'); /*13*/ +$character_classes = array ('[[:alnum:]]+', /*1*/ + '[[:alpha:]]+', + '[[:ascii:]]+', + '[[:blank:]]+', + '[[:cntrl:]]+',/*5*/ + '[[:digit:]]+', + '[[:graph:]]+', + '[[:lower:]]+', + '[[:print:]]+', + '[[:punct:]]+', /*10*/ + '[[:space:]]+', + '[[:upper:]]+', + '[[:xdigit:]]+'); /*13*/ $iterator = 1; foreach ($character_classes as $pattern) { diff --git a/ext/mbstring/tests/mb_ereg_variation5.phpt b/ext/mbstring/tests/mb_ereg_variation5.phpt index 1cecb09429..c26d82ead5 100644 --- a/ext/mbstring/tests/mb_ereg_variation5.phpt +++ b/ext/mbstring/tests/mb_ereg_variation5.phpt @@ -20,10 +20,10 @@ echo "*** Testing mb_ereg() : usage variations ***\n"; mb_regex_encoding('utf-8'); -$string_ascii = b'This is an English string. 0123456789.'; +$string_ascii = 'This is an English string. 0123456789.'; $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); -$regex = b'^.*?[[:blank:]]?[[:punct:][:digit:]]+\.?$'; +$regex = '^.*?[[:blank:]]?[[:punct:][:digit:]]+\.?$'; echo "\nASCII String without \$regs arg:\t\t"; var_dump(mb_ereg($regex, $string_ascii)); diff --git a/ext/mbstring/tests/mb_ereg_variation6.phpt b/ext/mbstring/tests/mb_ereg_variation6.phpt index 0d8687b95f..0de5064fed 100644 --- a/ext/mbstring/tests/mb_ereg_variation6.phpt +++ b/ext/mbstring/tests/mb_ereg_variation6.phpt @@ -24,16 +24,16 @@ if(mb_regex_encoding('utf-8') == true) { echo "Could not set regex encoding to utf-8\n"; } -$regex_char = array ('\w+' => b'\w+', - '\W+' => b'\W+', - '\s+' => b'\s+', - '\S+' => b'\S+', - '\d+' => b'\d+', - '\D+' => b'\D+', - '\b' => b'\b', - '\B' => b'\B'); - -$string_ascii = b'This is an English string. 0123456789.'; +$regex_char = array ('\w+' => '\w+', + '\W+' => '\W+', + '\s+' => '\s+', + '\S+' => '\S+', + '\d+' => '\d+', + '\D+' => '\D+', + '\b' => '\b', + '\B' => '\B'); + +$string_ascii = 'This is an English string. 0123456789.'; $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); foreach ($regex_char as $displayChar => $char) { diff --git a/ext/mbstring/tests/mb_ereg_variation7.phpt b/ext/mbstring/tests/mb_ereg_variation7.phpt index 170497d800..41c427162e 100644 --- a/ext/mbstring/tests/mb_ereg_variation7.phpt +++ b/ext/mbstring/tests/mb_ereg_variation7.phpt @@ -27,8 +27,8 @@ if(mb_regex_encoding('utf-8') == true) { echo "Could not set regex encoding to utf-8\n"; } -$string_ascii = b'This is an English string. 0123456789.'; -$regex_ascii = b'([A-Z]\w{1,4}is( [aeiou]|h)) ?.*\.\s[0-9]+(5([6-9][79]){2})[[:punct:]]$'; +$string_ascii = 'This is an English string. 0123456789.'; +$regex_ascii = '([A-Z]\w{1,4}is( [aeiou]|h)) ?.*\.\s[0-9]+(5([6-9][79]){2})[[:punct:]]$'; var_dump(mb_ereg($regex_ascii, $string_ascii, $regs_ascii)); base64_encode_var_dump($regs_ascii); diff --git a/ext/mbstring/tests/mb_split.phpt b/ext/mbstring/tests/mb_split.phpt index 1031cd26d7..45d361c598 100644 --- a/ext/mbstring/tests/mb_split.phpt +++ b/ext/mbstring/tests/mb_split.phpt @@ -24,15 +24,15 @@ mbstring.func_overload=0 } } - var_dump( mb_split( b" ", b"a b c d e f g" ) - == mb_split( b"[[:space:]]", b"a\nb\tc\nd e f g" ) ); + var_dump( mb_split( " ", "a b c d e f g" ) + == mb_split( "[[:space:]]", "a\nb\tc\nd e f g" ) ); for ( $i = 1; $i < 5; ++$i ) { - verify_split( b" ", b"a\tb\tc\td e\tf g", $i ); + verify_split( " ", "a\tb\tc\td e\tf g", $i ); } for ( $i = 1; $i < 5; ++$i ) { - verify_split( b"\xa1\xa1+", b"\xa1\xa1\xa1\xa2\xa2\xa1\xa1\xa1\xa1\xa1\xa1\xa2\xa2\xa1\xa1\xa1", $i ); + verify_split( "\xa1\xa1+", "\xa1\xa1\xa1\xa2\xa2\xa1\xa1\xa1\xa1\xa1\xa1\xa2\xa2\xa1\xa1\xa1", $i ); } ?> diff --git a/ext/mbstring/tests/mb_stripos.phpt b/ext/mbstring/tests/mb_stripos.phpt index 8268872223..ac84b58242 100644 --- a/ext/mbstring/tests/mb_stripos.phpt +++ b/ext/mbstring/tests/mb_stripos.phpt @@ -12,7 +12,7 @@ include_once('common.inc'); // Test string -$euc_jp = b'0123¤³¤Îʸ»úÎó¤ÏÆüËܸì¤Ç¤¹¡£EUC-JP¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£0123ÆüËܸì¤ÏÌÌÅݽ¤¤¡£'; +$euc_jp = '0123¤³¤Îʸ»úÎó¤ÏÆüËܸì¤Ç¤¹¡£EUC-JP¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£0123ÆüËܸì¤ÏÌÌÅݽ¤¤¡£'; $slen = mb_strlen($euc_jp, 'EUC-JP'); echo "String len: $slen\n"; @@ -22,12 +22,12 @@ mb_internal_encoding('UTF-8') or print("mb_internal_encoding() failed\n"); echo "== POSITIVE OFFSET ==\n"; -print mb_stripos($euc_jp, b'ÆüËܸì', 0, 'EUC-JP') . "\n"; -print mb_stripos($euc_jp, b'0', 0, 'EUC-JP') . "\n"; +print mb_stripos($euc_jp, 'ÆüËܸì', 0, 'EUC-JP') . "\n"; +print mb_stripos($euc_jp, '0', 0, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, 3, 0, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, 0, 0, 'EUC-JP') . "\n"; -print mb_stripos($euc_jp, b'ÆüËܸì', 15, 'EUC-JP') . "\n"; -print mb_stripos($euc_jp, b'0', 15, 'EUC-JP') . "\n"; +print mb_stripos($euc_jp, 'ÆüËܸì', 15, 'EUC-JP') . "\n"; +print mb_stripos($euc_jp, '0', 15, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, 3, 15, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, 0, 15, 'EUC-JP') . "\n"; @@ -35,8 +35,8 @@ print mb_stripos($euc_jp, 0, 15, 'EUC-JP') . "\n"; // Negative offset echo "== NEGATIVE OFFSET ==\n"; -print mb_stripos($euc_jp, b'ÆüËܸì', -15, 'EUC-JP') . "\n"; -print mb_stripos($euc_jp, b'0', -15, 'EUC-JP') . "\n"; +print mb_stripos($euc_jp, 'ÆüËܸì', -15, 'EUC-JP') . "\n"; +print mb_stripos($euc_jp, '0', -15, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, 3, -15, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, 0, -15, 'EUC-JP') . "\n"; print mb_stripos($euc_jp, 0, -43, 'EUC-JP') . "\n"; @@ -45,19 +45,19 @@ print mb_stripos($euc_jp, 0, -43, 'EUC-JP') . "\n"; // Invalid offset - should return false with warning print ("== INVALID OFFSET ==\n"); -$r = mb_stripos($euc_jp, b'ÆüËܸì', 44, 'EUC-JP'); +$r = mb_stripos($euc_jp, 'ÆüËܸì', 44, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; -$r = mb_stripos($euc_jp, b'ÆüËܸì', 50, 'EUC-JP'); +$r = mb_stripos($euc_jp, 'ÆüËܸì', 50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; -$r = mb_stripos($euc_jp, b'0', 50, 'EUC-JP'); +$r = mb_stripos($euc_jp, '0', 50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; $r = mb_stripos($euc_jp, 3, 50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; $r = mb_stripos($euc_jp, 0, 50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; -$r = mb_stripos($euc_jp, b'ÆüËܸì', -50, 'EUC-JP'); +$r = mb_stripos($euc_jp, 'ÆüËܸì', -50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; -$r = mb_stripos($euc_jp, b'0', -50, 'EUC-JP'); +$r = mb_stripos($euc_jp, '0', -50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; $r = mb_stripos($euc_jp, 3, -50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; @@ -69,17 +69,17 @@ $r = mb_stripos($euc_jp, 0, -44, 'EUC-JP'); // Out of range - should return false print ("== OUT OF RANGE ==\n"); -$r = mb_stripos($euc_jp, b'ÆüËܸì', 40, 'EUC-JP'); +$r = mb_stripos($euc_jp, 'ÆüËܸì', 40, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; -$r = mb_stripos($euc_jp, b'0', 40, 'EUC-JP'); +$r = mb_stripos($euc_jp, '0', 40, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; $r = mb_stripos($euc_jp, 3, 40, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; $r = mb_stripos($euc_jp, 0, 40, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; -$r = mb_stripos($euc_jp, b'ÆüËܸì', -3, 'EUC-JP'); +$r = mb_stripos($euc_jp, 'ÆüËܸì', -3, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; -$r = mb_stripos($euc_jp, b'0', -3, 'EUC-JP'); +$r = mb_stripos($euc_jp, '0', -3, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; $r = mb_stripos($euc_jp, 3, -3, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; @@ -90,9 +90,9 @@ $r = mb_stripos($euc_jp, 0, -3, 'EUC-JP'); // Non-existent echo "== NON-EXISTENT ==\n"; -$r = mb_stripos($euc_jp, b'´Ú¹ñ¸ì', 0, 'EUC-JP'); +$r = mb_stripos($euc_jp, '´Ú¹ñ¸ì', 0, 'EUC-JP'); ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n"; -$r = mb_stripos($euc_jp, b"\n", 0, 'EUC-JP'); +$r = mb_stripos($euc_jp, "\n", 0, 'EUC-JP'); ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n"; @@ -101,14 +101,14 @@ echo "== NO ENCODING PARAMETER ==\n"; mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n"); -print mb_stripos($euc_jp, b'ÆüËܸì', 0) . "\n"; -print mb_stripos($euc_jp, b'0', 0) . "\n"; +print mb_stripos($euc_jp, 'ÆüËܸì', 0) . "\n"; +print mb_stripos($euc_jp, '0', 0) . "\n"; print mb_stripos($euc_jp, 3, 0) . "\n"; print mb_stripos($euc_jp, 0, 0) . "\n"; -$r = mb_stripos($euc_jp, b'´Ú¹ñ¸ì', 0); +$r = mb_stripos($euc_jp, '´Ú¹ñ¸ì', 0); ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n"; -$r = mb_stripos($euc_jp, b"\n", 0); +$r = mb_stripos($euc_jp, "\n", 0); ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n"; // EUC-JP - No offset and encoding parameter @@ -116,14 +116,14 @@ echo "== NO OFFSET AND ENCODING PARAMETER ==\n"; mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n"); -print mb_stripos($euc_jp, b'ÆüËܸì') . "\n"; -print mb_stripos($euc_jp, b'0') . "\n"; +print mb_stripos($euc_jp, 'ÆüËܸì') . "\n"; +print mb_stripos($euc_jp, '0') . "\n"; print mb_stripos($euc_jp, 3) . "\n"; print mb_stripos($euc_jp, 0) . "\n"; -$r = mb_stripos($euc_jp, b'´Ú¹ñ¸ì'); +$r = mb_stripos($euc_jp, '´Ú¹ñ¸ì'); ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n"; -$r = mb_stripos($euc_jp, b"\n"); +$r = mb_stripos($euc_jp, "\n"); ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n"; diff --git a/ext/mbstring/tests/mb_stripos_basic.phpt b/ext/mbstring/tests/mb_stripos_basic.phpt index bb33bb1076..e061d8f7cc 100644 --- a/ext/mbstring/tests/mb_stripos_basic.phpt +++ b/ext/mbstring/tests/mb_stripos_basic.phpt @@ -23,26 +23,26 @@ mb_internal_encoding('UTF-8'); //ascii strings $ascii_haystacks = array( - b'abc defabc def', - b'ABC DEFABC DEF', - b'Abc dEFaBC Def', + 'abc defabc def', + 'ABC DEFABC DEF', + 'Abc dEFaBC Def', ); $ascii_needles = array( // 4 good ones - b'DE', - b'de', - b'De', - b'dE', + 'DE', + 'de', + 'De', + 'dE', //flag a swap between good and bad '!', // 4 bad ones - b'df', - b'Df', - b'dF', - b'DF' + 'df', + 'Df', + 'dF', + 'DF' ); //greek strings in UTF-8 diff --git a/ext/mbstring/tests/mb_stripos_basic2.phpt b/ext/mbstring/tests/mb_stripos_basic2.phpt index f9131d9879..76a6cc5066 100644 --- a/ext/mbstring/tests/mb_stripos_basic2.phpt +++ b/ext/mbstring/tests/mb_stripos_basic2.phpt @@ -23,17 +23,17 @@ mb_internal_encoding('UTF-8'); //ascii strings $ascii_haystacks = array( - b'abc defabc def', - b'ABC DEFABC DEF', - b'Abc dEFaBC Def', + 'abc defabc def', + 'ABC DEFABC DEF', + 'Abc dEFaBC Def', ); $ascii_needles = array( // 4 good ones - b'DE', - b'de', - b'De', - b'dE', + 'DE', + 'de', + 'De', + 'dE', ); //greek strings in UTF-8 diff --git a/ext/mbstring/tests/mb_stripos_error1.phpt b/ext/mbstring/tests/mb_stripos_error1.phpt index 832a8661bd..4187898f01 100644 --- a/ext/mbstring/tests/mb_stripos_error1.phpt +++ b/ext/mbstring/tests/mb_stripos_error1.phpt @@ -22,8 +22,8 @@ echo "*** Testing mb_stripos() : error conditions ***\n"; //Test mb_stripos with one more than the expected number of arguments echo "\n-- Testing mb_stripos() function with more than expected no. of arguments --\n"; -$haystack = b'string_val'; -$needle = b'string_val'; +$haystack = 'string_val'; +$needle = 'string_val'; $offset = 10; $encoding = 'string_val'; $extra_arg = 10; @@ -31,7 +31,7 @@ var_dump( mb_stripos($haystack, $needle, $offset, $encoding, $extra_arg) ); // Testing mb_stripos with one less than the expected number of arguments echo "\n-- Testing mb_stripos() function with less than expected no. of arguments --\n"; -$haystack = b'string_val'; +$haystack = 'string_val'; var_dump( mb_stripos($haystack) ); echo "Done"; diff --git a/ext/mbstring/tests/mb_stripos_error2.phpt b/ext/mbstring/tests/mb_stripos_error2.phpt index c5e5c8d3bd..82b01b92f3 100644 --- a/ext/mbstring/tests/mb_stripos_error2.phpt +++ b/ext/mbstring/tests/mb_stripos_error2.phpt @@ -18,8 +18,8 @@ function_exists('mb_stripos') or die("skip mb_stripos() is not available in this */ echo "*** Testing mb_stripos() : error conditions ***\n"; -$haystack = b'Hello, world'; -$needle = b'world'; +$haystack = 'Hello, world'; +$needle = 'world'; $offset = 2; $encoding = 'unknown-encoding'; diff --git a/ext/mbstring/tests/mb_stripos_variation1.phpt b/ext/mbstring/tests/mb_stripos_variation1.phpt index 2fe5c022f2..39837aa080 100644 --- a/ext/mbstring/tests/mb_stripos_variation1.phpt +++ b/ext/mbstring/tests/mb_stripos_variation1.phpt @@ -20,7 +20,7 @@ function_exists('mb_stripos') or die("skip mb_stripos() is not available in this echo "*** Testing mb_stripos() : usage variations ***\n"; // Initialise function arguments not being substituted -$needle = b'string_val'; +$needle = 'string_val'; $offset = 0; $encoding = 'utf-8'; diff --git a/ext/mbstring/tests/mb_stripos_variation2.phpt b/ext/mbstring/tests/mb_stripos_variation2.phpt index 95c2d08957..32b75467f7 100644 --- a/ext/mbstring/tests/mb_stripos_variation2.phpt +++ b/ext/mbstring/tests/mb_stripos_variation2.phpt @@ -20,7 +20,7 @@ function_exists('mb_stripos') or die("skip mb_stripos() is not available in this echo "*** Testing mb_stripos() : usage variations ***\n"; // Initialise function arguments not being substituted -$haystack = b'string_val'; +$haystack = 'string_val'; $offset = 0; $encoding = 'utf-8'; @@ -75,8 +75,8 @@ $inputs = array( '', // string data -/*18*/ b"string", - b'string', +/*18*/ "string", + 'string', $heredoc, // object data diff --git a/ext/mbstring/tests/mb_stripos_variation3.phpt b/ext/mbstring/tests/mb_stripos_variation3.phpt index 69c4a9e53b..9907356ccd 100644 --- a/ext/mbstring/tests/mb_stripos_variation3.phpt +++ b/ext/mbstring/tests/mb_stripos_variation3.phpt @@ -20,8 +20,8 @@ if (PHP_INT_SIZE != 8) die('skip 64-bit only'); echo "*** Testing mb_stripos() : usage variations ***\n"; // Initialise function arguments not being substituted -$needle = b'A'; -$haystack = b'string_val'; +$needle = 'A'; +$haystack = 'string_val'; $encoding = 'utf-8'; //get an unset variable diff --git a/ext/mbstring/tests/mb_stripos_variation4.phpt b/ext/mbstring/tests/mb_stripos_variation4.phpt index a8d36f9e45..dc11b48d38 100644 --- a/ext/mbstring/tests/mb_stripos_variation4.phpt +++ b/ext/mbstring/tests/mb_stripos_variation4.phpt @@ -21,8 +21,8 @@ function_exists('mb_stripos') or die("skip mb_stripos() is not available in this echo "*** Testing mb_stripos() : usage variations ***\n"; // Initialise function arguments not being substituted -$haystack = b'string_val'; -$needle = b'VaL'; +$haystack = 'string_val'; +$needle = 'VaL'; $offset = 0; //get an unset variable diff --git a/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt b/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt index 8ffcae5c0f..f2f9555a2b 100644 --- a/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt +++ b/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt @@ -22,8 +22,8 @@ mb_internal_encoding('UTF-8'); echo "*** Testing mb_stripos() : usage variations ***\n"; -$string_ascii = b'+Is an English string'; //21 chars -$needle_ascii = b'G'; +$string_ascii = '+Is an English string'; //21 chars +$needle_ascii = 'G'; $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); //21 chars $needle_mb = base64_decode('44CC'); diff --git a/ext/mbstring/tests/mb_stristr_basic.phpt b/ext/mbstring/tests/mb_stristr_basic.phpt index 9340d35117..58a03dcb2c 100644 --- a/ext/mbstring/tests/mb_stristr_basic.phpt +++ b/ext/mbstring/tests/mb_stristr_basic.phpt @@ -17,10 +17,10 @@ echo "*** Testing mb_stristr() : basic functionality ***\n"; mb_internal_encoding('UTF-8'); -$string_ascii = b'abcdef'; -$needle_ascii_upper = b"BCD"; -$needle_ascii_mixed = b"bCd"; -$needle_ascii_lower = b"bcd"; +$string_ascii = 'abcdef'; +$needle_ascii_upper = "BCD"; +$needle_ascii_mixed = "bCd"; +$needle_ascii_lower = "bcd"; //Greek string in lower case UTF-8 $string_mb = base64_decode('zrHOss6zzrTOtc62zrfOuM65zrrOu868zr3Ovs6/z4DPgc+Dz4TPhc+Gz4fPiM+J'); diff --git a/ext/mbstring/tests/mb_stristr_error1.phpt b/ext/mbstring/tests/mb_stristr_error1.phpt index 8c81b0766d..c20f13470d 100644 --- a/ext/mbstring/tests/mb_stristr_error1.phpt +++ b/ext/mbstring/tests/mb_stristr_error1.phpt @@ -18,8 +18,8 @@ echo "*** Testing mb_stristr() : error conditions ***\n"; //Test mb_stristr with one more than the expected number of arguments echo "\n-- Testing mb_stristr() function with more than expected no. of arguments --\n"; -$haystack = b'string_val'; -$needle = b'string_val'; +$haystack = 'string_val'; +$needle = 'string_val'; $part = true; $encoding = 'string_val'; $extra_arg = 10; @@ -27,7 +27,7 @@ var_dump( mb_stristr($haystack, $needle, $part, $encoding, $extra_arg) ); // Testing mb_stristr with one less than the expected number of arguments echo "\n-- Testing mb_stristr() function with less than expected no. of arguments --\n"; -$haystack = b'string_val'; +$haystack = 'string_val'; var_dump( mb_stristr($haystack) ); ?> diff --git a/ext/mbstring/tests/mb_stristr_error2.phpt b/ext/mbstring/tests/mb_stristr_error2.phpt index 73f13dc856..74f8bfb4eb 100644 --- a/ext/mbstring/tests/mb_stristr_error2.phpt +++ b/ext/mbstring/tests/mb_stristr_error2.phpt @@ -17,8 +17,8 @@ echo "*** Testing mb_stristr() : error conditions ***\n"; echo "\n-- Testing mb_stristr() with unknown encoding --\n"; -$haystack = b'Hello, world'; -$needle = b'world'; +$haystack = 'Hello, world'; +$needle = 'world'; $encoding = 'unknown-encoding'; $part = true; var_dump( mb_stristr($haystack, $needle, $part, $encoding) ); diff --git a/ext/mbstring/tests/mb_stristr_variation1.phpt b/ext/mbstring/tests/mb_stristr_variation1.phpt index 9483c379e0..c8c2ae1f68 100644 --- a/ext/mbstring/tests/mb_stristr_variation1.phpt +++ b/ext/mbstring/tests/mb_stristr_variation1.phpt @@ -25,7 +25,7 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$needle = b'string_val'; +$needle = 'string_val'; $part = true; $encoding = 'utf-8'; @@ -37,7 +37,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -46,7 +46,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mbstring/tests/mb_stristr_variation2.phpt b/ext/mbstring/tests/mb_stristr_variation2.phpt index 0aeea8e68c..498bb3b868 100644 --- a/ext/mbstring/tests/mb_stristr_variation2.phpt +++ b/ext/mbstring/tests/mb_stristr_variation2.phpt @@ -25,7 +25,7 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$haystack = b'string_val'; +$haystack = 'string_val'; $part = true; $encoding = 'utf-8'; @@ -37,7 +37,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -46,7 +46,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mbstring/tests/mb_stristr_variation3.phpt b/ext/mbstring/tests/mb_stristr_variation3.phpt index d06ad15070..cc0e648320 100644 --- a/ext/mbstring/tests/mb_stristr_variation3.phpt +++ b/ext/mbstring/tests/mb_stristr_variation3.phpt @@ -25,8 +25,8 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$haystack = b'string_val'; -$needle = b'_'; +$haystack = 'string_val'; +$needle = '_'; $encoding = 'utf-8'; //get an unset variable @@ -37,7 +37,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -46,7 +46,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mbstring/tests/mb_stristr_variation4.phpt b/ext/mbstring/tests/mb_stristr_variation4.phpt index c735e0c7a7..7da3eeced0 100644 --- a/ext/mbstring/tests/mb_stristr_variation4.phpt +++ b/ext/mbstring/tests/mb_stristr_variation4.phpt @@ -25,8 +25,8 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$haystack = b'string_val'; -$needle = b'_'; +$haystack = 'string_val'; +$needle = '_'; $part = true; //get an unset variable diff --git a/ext/mbstring/tests/mb_stristr_variation5.phpt b/ext/mbstring/tests/mb_stristr_variation5.phpt index 5d54820100..54d527ecf5 100644 --- a/ext/mbstring/tests/mb_stristr_variation5.phpt +++ b/ext/mbstring/tests/mb_stristr_variation5.phpt @@ -18,10 +18,10 @@ echo "*** Testing mb_stristr() : basic functionality ***\n"; mb_internal_encoding('UTF-8'); //ascii mixed case, multiple needles -$string_ascii = b'abcDef zBcDyx'; -$needle_ascii_upper = b"BCD"; -$needle_ascii_mixed = b"bCd"; -$needle_ascii_lower = b"bcd"; +$string_ascii = 'abcDef zBcDyx'; +$needle_ascii_upper = "BCD"; +$needle_ascii_mixed = "bCd"; +$needle_ascii_lower = "bcd"; //Greek string in mixed case UTF-8 with multiple needles $string_mb = base64_decode('zrrOu868zr3Ovs6fzqDOoSDOus67zpzOnc6+zr/OoA=='); diff --git a/ext/mbstring/tests/mb_strlen_basic.phpt b/ext/mbstring/tests/mb_strlen_basic.phpt index a5dbe512b3..6214f3069c 100644 --- a/ext/mbstring/tests/mb_strlen_basic.phpt +++ b/ext/mbstring/tests/mb_strlen_basic.phpt @@ -18,7 +18,7 @@ function_exists('mb_strlen') or die("skip mb_strlen() is not available in this b echo "*** Testing mb_strlen() : basic functionality***\n"; -$string_ascii = b'abc def'; +$string_ascii = 'abc def'; //Japanese string in UTF-8 $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); diff --git a/ext/mbstring/tests/mb_strlen_variation1.phpt b/ext/mbstring/tests/mb_strlen_variation1.phpt index 9388c0547d..4af8dc61aa 100644 --- a/ext/mbstring/tests/mb_strlen_variation1.phpt +++ b/ext/mbstring/tests/mb_strlen_variation1.phpt @@ -29,12 +29,12 @@ unset ($unset_var); class classA { public function __toString() { - return b"Class A object"; + return "Class A object"; } } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; @@ -72,8 +72,8 @@ $inputs = array( '', // string data -/*18*/ b"string", - b'string', +/*18*/ "string", + 'string', $heredoc, // object data diff --git a/ext/mbstring/tests/mb_strpos.phpt b/ext/mbstring/tests/mb_strpos.phpt index 364bc7cc1a..e5a74364ff 100644 --- a/ext/mbstring/tests/mb_strpos.phpt +++ b/ext/mbstring/tests/mb_strpos.phpt @@ -12,7 +12,7 @@ include_once('common.inc'); // Test string -$euc_jp = b'0123¤³¤Îʸ»úÎó¤ÏÆüËܸì¤Ç¤¹¡£EUC-JP¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£0123ÆüËܸì¤ÏÌÌÅݽ¤¤¡£'; +$euc_jp = '0123¤³¤Îʸ»úÎó¤ÏÆüËܸì¤Ç¤¹¡£EUC-JP¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£0123ÆüËܸì¤ÏÌÌÅݽ¤¤¡£'; $slen = mb_strlen($euc_jp, 'EUC-JP'); echo "String len: $slen\n"; @@ -22,12 +22,12 @@ mb_internal_encoding('UTF-8') or print("mb_internal_encoding() failed\n"); echo "== POSITIVE OFFSET ==\n"; -print mb_strpos($euc_jp, b'ÆüËܸì', 0, 'EUC-JP') . "\n"; -print mb_strpos($euc_jp, b'0', 0, 'EUC-JP') . "\n"; +print mb_strpos($euc_jp, 'ÆüËܸì', 0, 'EUC-JP') . "\n"; +print mb_strpos($euc_jp, '0', 0, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, 3, 0, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, 0, 0, 'EUC-JP') . "\n"; -print mb_strpos($euc_jp, b'ÆüËܸì', 15, 'EUC-JP') . "\n"; -print mb_strpos($euc_jp, b'0', 15, 'EUC-JP') . "\n"; +print mb_strpos($euc_jp, 'ÆüËܸì', 15, 'EUC-JP') . "\n"; +print mb_strpos($euc_jp, '0', 15, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, 3, 15, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, 0, 15, 'EUC-JP') . "\n"; @@ -35,8 +35,8 @@ print mb_strpos($euc_jp, 0, 15, 'EUC-JP') . "\n"; // Negative offset echo "== NEGATIVE OFFSET ==\n"; -print mb_strpos($euc_jp, b'ÆüËܸì', -15, 'EUC-JP') . "\n"; -print mb_strpos($euc_jp, b'0', -15, 'EUC-JP') . "\n"; +print mb_strpos($euc_jp, 'ÆüËܸì', -15, 'EUC-JP') . "\n"; +print mb_strpos($euc_jp, '0', -15, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, 3, -15, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, 0, -15, 'EUC-JP') . "\n"; print mb_strpos($euc_jp, 0, -43, 'EUC-JP') . "\n"; @@ -45,19 +45,19 @@ print mb_strpos($euc_jp, 0, -43, 'EUC-JP') . "\n"; // Invalid offset - should return false with warning print ("== INVALID OFFSET ==\n"); -$r = mb_strpos($euc_jp, b'ÆüËܸì', 44, 'EUC-JP'); +$r = mb_strpos($euc_jp, 'ÆüËܸì', 44, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; -$r = mb_strpos($euc_jp, b'ÆüËܸì', 50, 'EUC-JP'); +$r = mb_strpos($euc_jp, 'ÆüËܸì', 50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; -$r = mb_strpos($euc_jp, b'0', 50, 'EUC-JP'); +$r = mb_strpos($euc_jp, '0', 50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; $r = mb_strpos($euc_jp, 3, 50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; $r = mb_strpos($euc_jp, 0, 50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; -$r = mb_strpos($euc_jp, b'ÆüËܸì', -50, 'EUC-JP'); +$r = mb_strpos($euc_jp, 'ÆüËܸì', -50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; -$r = mb_strpos($euc_jp, b'0', -50, 'EUC-JP'); +$r = mb_strpos($euc_jp, '0', -50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; $r = mb_strpos($euc_jp, 3, -50, 'EUC-JP'); ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n"; @@ -69,17 +69,17 @@ $r = mb_strpos($euc_jp, 0, -44, 'EUC-JP'); // Out of range - should return false print ("== OUT OF RANGE ==\n"); -$r = mb_strpos($euc_jp, b'ÆüËܸì', 40, 'EUC-JP'); +$r = mb_strpos($euc_jp, 'ÆüËܸì', 40, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; -$r = mb_strpos($euc_jp, b'0', 40, 'EUC-JP'); +$r = mb_strpos($euc_jp, '0', 40, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; $r = mb_strpos($euc_jp, 3, 40, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; $r = mb_strpos($euc_jp, 0, 40, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; -$r = mb_strpos($euc_jp, b'ÆüËܸì', -3, 'EUC-JP'); +$r = mb_strpos($euc_jp, 'ÆüËܸì', -3, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; -$r = mb_strpos($euc_jp, b'0', -3, 'EUC-JP'); +$r = mb_strpos($euc_jp, '0', -3, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; $r = mb_strpos($euc_jp, 3, -3, 'EUC-JP'); ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n"; @@ -90,9 +90,9 @@ $r = mb_strpos($euc_jp, 0, -3, 'EUC-JP'); // Non-existent echo "== NON-EXISTENT ==\n"; -$r = mb_strpos($euc_jp, b'´Ú¹ñ¸ì', 0, 'EUC-JP'); +$r = mb_strpos($euc_jp, '´Ú¹ñ¸ì', 0, 'EUC-JP'); ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n"; -$r = mb_strpos($euc_jp, b"\n", 0, 'EUC-JP'); +$r = mb_strpos($euc_jp, "\n", 0, 'EUC-JP'); ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n"; @@ -101,14 +101,14 @@ echo "== NO ENCODING PARAMETER ==\n"; mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n"); -print mb_strpos($euc_jp, b'ÆüËܸì', 0) . "\n"; -print mb_strpos($euc_jp, b'0', 0) . "\n"; +print mb_strpos($euc_jp, 'ÆüËܸì', 0) . "\n"; +print mb_strpos($euc_jp, '0', 0) . "\n"; print mb_strpos($euc_jp, 3, 0) . "\n"; print mb_strpos($euc_jp, 0, 0) . "\n"; -$r = mb_strpos($euc_jp, b'´Ú¹ñ¸ì', 0); +$r = mb_strpos($euc_jp, '´Ú¹ñ¸ì', 0); ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n"; -$r = mb_strpos($euc_jp, b"\n", 0); +$r = mb_strpos($euc_jp, "\n", 0); ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n"; // EUC-JP - No offset and encoding parameter @@ -116,14 +116,14 @@ echo "== NO OFFSET AND ENCODING PARAMETER ==\n"; mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n"); -print mb_strpos($euc_jp, b'ÆüËܸì') . "\n"; -print mb_strpos($euc_jp, b'0') . "\n"; +print mb_strpos($euc_jp, 'ÆüËܸì') . "\n"; +print mb_strpos($euc_jp, '0') . "\n"; print mb_strpos($euc_jp, 3) . "\n"; print mb_strpos($euc_jp, 0) . "\n"; -$r = mb_strpos($euc_jp, b'´Ú¹ñ¸ì'); +$r = mb_strpos($euc_jp, '´Ú¹ñ¸ì'); ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n"; -$r = mb_strpos($euc_jp, b"\n"); +$r = mb_strpos($euc_jp, "\n"); ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n"; diff --git a/ext/mbstring/tests/mb_strpos_basic.phpt b/ext/mbstring/tests/mb_strpos_basic.phpt index 36641b127b..1197fbadd7 100644 --- a/ext/mbstring/tests/mb_strpos_basic.phpt +++ b/ext/mbstring/tests/mb_strpos_basic.phpt @@ -20,12 +20,12 @@ echo "*** Testing mb_strpos() : basic functionality***\n"; mb_internal_encoding('UTF-8'); -$string_ascii = b'abc def'; +$string_ascii = 'abc def'; //Japanese string in UTF-8 $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); echo "\n-- ASCII string 1 --\n"; -var_dump(mb_strpos($string_ascii, b'd', 2, 'ISO-8859-1')); +var_dump(mb_strpos($string_ascii, 'd', 2, 'ISO-8859-1')); echo "\n-- ASCII string 2 --\n"; var_dump(mb_strpos($string_ascii, '123')); diff --git a/ext/mbstring/tests/mb_strpos_variation2.phpt b/ext/mbstring/tests/mb_strpos_variation2.phpt index 486b2bb3e5..fb2d7227b9 100644 --- a/ext/mbstring/tests/mb_strpos_variation2.phpt +++ b/ext/mbstring/tests/mb_strpos_variation2.phpt @@ -19,7 +19,7 @@ function_exists('mb_strpos') or die("skip mb_strpos() is not available in this b echo "*** Testing mb_strpos() : usage variations ***\n"; // Initialise function arguments not being substituted -$haystack = b'string_val'; +$haystack = 'string_val'; $offset = 0; $encoding = 'utf-8'; @@ -31,12 +31,12 @@ unset ($unset_var); class classA { public function __toString() { - return b"Class A object"; + return "Class A object"; } } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; @@ -74,8 +74,8 @@ $inputs = array( '', // string data -/*18*/ b"string", - b'string', +/*18*/ "string", + 'string', $heredoc, // object data diff --git a/ext/mbstring/tests/mb_strpos_variation3.phpt b/ext/mbstring/tests/mb_strpos_variation3.phpt index f30b708183..ce43080dc3 100644 --- a/ext/mbstring/tests/mb_strpos_variation3.phpt +++ b/ext/mbstring/tests/mb_strpos_variation3.phpt @@ -20,8 +20,8 @@ if (PHP_INT_SIZE != 8) die('skip 64-bit only'); echo "*** Testing mb_strpos() : usage variations ***\n"; // Initialise function arguments not being substituted -$needle = b'a'; -$haystack = b'string_val'; +$needle = 'a'; +$haystack = 'string_val'; $encoding = 'utf-8'; //get an unset variable diff --git a/ext/mbstring/tests/mb_strpos_variation4.phpt b/ext/mbstring/tests/mb_strpos_variation4.phpt index 4051646ae4..31b43bacb7 100644 --- a/ext/mbstring/tests/mb_strpos_variation4.phpt +++ b/ext/mbstring/tests/mb_strpos_variation4.phpt @@ -20,8 +20,8 @@ function_exists('mb_strpos') or die("skip mb_strpos() is not available in this b echo "*** Testing mb_strpos() : usage variations ***\n"; // Initialise function arguments not being substituted -$haystack = b'string_val'; -$needle = b'val'; +$haystack = 'string_val'; +$needle = 'val'; $offset = 0; //get an unset variable diff --git a/ext/mbstring/tests/mb_strpos_variation5.phpt b/ext/mbstring/tests/mb_strpos_variation5.phpt index 23bfa22b61..1dccce6385 100644 --- a/ext/mbstring/tests/mb_strpos_variation5.phpt +++ b/ext/mbstring/tests/mb_strpos_variation5.phpt @@ -22,8 +22,8 @@ mb_internal_encoding('UTF-8'); echo "*** Testing mb_strpos() : usage variations ***\n"; -$string_ascii = b'+Is an English string'; //21 chars -$needle_ascii = b'g'; +$string_ascii = '+Is an English string'; //21 chars +$needle_ascii = 'g'; $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); //21 chars $needle_mb = base64_decode('44CC'); diff --git a/ext/mbstring/tests/mb_strrchr_basic.phpt b/ext/mbstring/tests/mb_strrchr_basic.phpt index 595d808d4d..8c227487f0 100644 --- a/ext/mbstring/tests/mb_strrchr_basic.phpt +++ b/ext/mbstring/tests/mb_strrchr_basic.phpt @@ -17,18 +17,18 @@ echo "*** Testing mb_strrchr() : basic functionality ***\n"; mb_internal_encoding('UTF-8'); -$string_ascii = b'abc def'; +$string_ascii = 'abc def'; //Japanese string in UTF-8 $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); echo "\n-- ASCII string: needle exists --\n"; -var_dump(bin2hex(mb_strrchr($string_ascii, b'd', false, 'ISO-8859-1'))); -var_dump(bin2hex(mb_strrchr($string_ascii, b'd'))); -var_dump(bin2hex(mb_strrchr($string_ascii, b'd', true))); +var_dump(bin2hex(mb_strrchr($string_ascii, 'd', false, 'ISO-8859-1'))); +var_dump(bin2hex(mb_strrchr($string_ascii, 'd'))); +var_dump(bin2hex(mb_strrchr($string_ascii, 'd', true))); echo "\n-- ASCII string: needle doesn't exist --\n"; -var_dump(mb_strrchr($string_ascii, b'123')); +var_dump(mb_strrchr($string_ascii, '123')); echo "\n-- Multibyte string: needle exists --\n"; $needle1 = base64_decode('5pel5pys6Kqe'); diff --git a/ext/mbstring/tests/mb_strrchr_error1.phpt b/ext/mbstring/tests/mb_strrchr_error1.phpt index bb6ff0fab0..42346afbf0 100644 --- a/ext/mbstring/tests/mb_strrchr_error1.phpt +++ b/ext/mbstring/tests/mb_strrchr_error1.phpt @@ -18,8 +18,8 @@ echo "*** Testing mb_strrchr() : error conditions ***\n"; //Test mb_strrchr with one more than the expected number of arguments echo "\n-- Testing mb_strrchr() function with more than expected no. of arguments --\n"; -$haystack = b'string_val'; -$needle = b'string_val'; +$haystack = 'string_val'; +$needle = 'string_val'; $part = true; $encoding = 'string_val'; $extra_arg = 10; @@ -27,7 +27,7 @@ var_dump( mb_strrchr($haystack, $needle, $part, $encoding, $extra_arg) ); // Testing mb_strrchr with one less than the expected number of arguments echo "\n-- Testing mb_strrchr() function with less than expected no. of arguments --\n"; -$haystack = b'string_val'; +$haystack = 'string_val'; var_dump( mb_strrchr($haystack) ); ?> diff --git a/ext/mbstring/tests/mb_strrchr_error2.phpt b/ext/mbstring/tests/mb_strrchr_error2.phpt index cfbcd66a09..11abee609b 100644 --- a/ext/mbstring/tests/mb_strrchr_error2.phpt +++ b/ext/mbstring/tests/mb_strrchr_error2.phpt @@ -17,8 +17,8 @@ echo "*** Testing mb_strrchr() : error conditions ***\n"; echo "\n-- Testing mb_strrchr() with unknown encoding --\n"; -$haystack = b'Hello, world'; -$needle = b'world'; +$haystack = 'Hello, world'; +$needle = 'world'; $encoding = 'unknown-encoding'; $part = true; var_dump( mb_strrchr($haystack, $needle, $part, $encoding) ); diff --git a/ext/mbstring/tests/mb_strrchr_variation1.phpt b/ext/mbstring/tests/mb_strrchr_variation1.phpt index a0952a87ea..7284939a57 100644 --- a/ext/mbstring/tests/mb_strrchr_variation1.phpt +++ b/ext/mbstring/tests/mb_strrchr_variation1.phpt @@ -25,7 +25,7 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$needle = b'string_val'; +$needle = 'string_val'; $part = true; $encoding = 'utf-8'; @@ -37,7 +37,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -46,7 +46,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mbstring/tests/mb_strrchr_variation2.phpt b/ext/mbstring/tests/mb_strrchr_variation2.phpt index c368bd8c9d..074cdda108 100644 --- a/ext/mbstring/tests/mb_strrchr_variation2.phpt +++ b/ext/mbstring/tests/mb_strrchr_variation2.phpt @@ -25,7 +25,7 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$haystack = b'string_val'; +$haystack = 'string_val'; $part = true; $encoding = 'utf-8'; @@ -37,7 +37,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -46,7 +46,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mbstring/tests/mb_strrchr_variation3.phpt b/ext/mbstring/tests/mb_strrchr_variation3.phpt index ad9c4e356d..c93895c7a5 100644 --- a/ext/mbstring/tests/mb_strrchr_variation3.phpt +++ b/ext/mbstring/tests/mb_strrchr_variation3.phpt @@ -25,8 +25,8 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$haystack = b'string_val'; -$needle = b'_'; +$haystack = 'string_val'; +$needle = '_'; $encoding = 'utf-8'; //get an unset variable @@ -37,7 +37,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -46,7 +46,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mbstring/tests/mb_strrchr_variation4.phpt b/ext/mbstring/tests/mb_strrchr_variation4.phpt index f9dadab5f0..a85979c988 100644 --- a/ext/mbstring/tests/mb_strrchr_variation4.phpt +++ b/ext/mbstring/tests/mb_strrchr_variation4.phpt @@ -25,8 +25,8 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$haystack = b'string_val'; -$needle = b'_'; +$haystack = 'string_val'; +$needle = '_'; $part = true; //get an unset variable diff --git a/ext/mbstring/tests/mb_strrchr_variation5.phpt b/ext/mbstring/tests/mb_strrchr_variation5.phpt index 84a73a2f52..fa37db646c 100644 --- a/ext/mbstring/tests/mb_strrchr_variation5.phpt +++ b/ext/mbstring/tests/mb_strrchr_variation5.phpt @@ -18,8 +18,8 @@ echo "*** Testing mb_strrchr() : variation ***\n"; mb_internal_encoding('UTF-8'); //with repeated needles -$string_ascii = b'abcdef zbcdyx'; -$needle_ascii = b"bcd"; +$string_ascii = 'abcdef zbcdyx'; +$needle_ascii = "bcd"; //Japanese string in UTF-8 with repeated needles $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OIMzTvvJXvvJbml6XmnKzoqp7jg4bjgq3jgrnjg4g='); diff --git a/ext/mbstring/tests/mb_strrchr_variation6.phpt b/ext/mbstring/tests/mb_strrchr_variation6.phpt index 86009496e1..2c941c5114 100644 --- a/ext/mbstring/tests/mb_strrchr_variation6.phpt +++ b/ext/mbstring/tests/mb_strrchr_variation6.phpt @@ -18,10 +18,10 @@ echo "*** Testing mb_strrchr() : variation ***\n"; mb_internal_encoding('UTF-8'); //ascii -$string_ascii = b'abcdef'; -$needle_ascii_upper = b"BCD"; -$needle_ascii_mixed = b"bCd"; -$needle_ascii_lower = b"bcd"; +$string_ascii = 'abcdef'; +$needle_ascii_upper = "BCD"; +$needle_ascii_mixed = "bCd"; +$needle_ascii_lower = "bcd"; //Greek string in lower case UTF-8 $string_mb = base64_decode('zrHOss6zzrTOtc62zrfOuM65zrrOu868zr3Ovs6/z4DPgc+Dz4TPhc+Gz4fPiM+J'); diff --git a/ext/mbstring/tests/mb_strrichr_basic.phpt b/ext/mbstring/tests/mb_strrichr_basic.phpt index 5a38e6506f..2670de774c 100644 --- a/ext/mbstring/tests/mb_strrichr_basic.phpt +++ b/ext/mbstring/tests/mb_strrichr_basic.phpt @@ -17,10 +17,10 @@ echo "*** Testing mb_strrichr() : basic functionality ***\n"; mb_internal_encoding('UTF-8'); -$string_ascii = b'abcdef'; -$needle_ascii_upper = b"BCD"; -$needle_ascii_mixed = b"bCd"; -$needle_ascii_lower = b"bcd"; +$string_ascii = 'abcdef'; +$needle_ascii_upper = "BCD"; +$needle_ascii_mixed = "bCd"; +$needle_ascii_lower = "bcd"; //Greek string in lower case UTF-8 $string_mb = base64_decode('zrHOss6zzrTOtc62zrfOuM65zrrOu868zr3Ovs6/z4DPgc+Dz4TPhc+Gz4fPiM+J'); @@ -35,7 +35,7 @@ var_dump(bin2hex(mb_strrichr($string_ascii, $needle_ascii_mixed, true))); echo "\n-- ASCII string: needle doesn't exist --\n"; -var_dump(mb_strrichr($string_ascii, b'123')); +var_dump(mb_strrichr($string_ascii, '123')); echo "\n-- Multibyte string: needle exists --\n"; var_dump(bin2hex(mb_strrichr($string_mb, $needle_mb_upper))); diff --git a/ext/mbstring/tests/mb_strrichr_error1.phpt b/ext/mbstring/tests/mb_strrichr_error1.phpt index 01d33f342f..7280c53085 100644 --- a/ext/mbstring/tests/mb_strrichr_error1.phpt +++ b/ext/mbstring/tests/mb_strrichr_error1.phpt @@ -18,8 +18,8 @@ echo "*** Testing mb_strrichr() : error conditions ***\n"; //Test mb_strrichr with one more than the expected number of arguments echo "\n-- Testing mb_strrichr() function with more than expected no. of arguments --\n"; -$haystack = b'string_val'; -$needle = b'string_val'; +$haystack = 'string_val'; +$needle = 'string_val'; $part = true; $encoding = 'string_val'; $extra_arg = 10; @@ -27,7 +27,7 @@ var_dump( mb_strrichr($haystack, $needle, $part, $encoding, $extra_arg) ); // Testing mb_strrichr with one less than the expected number of arguments echo "\n-- Testing mb_strrichr() function with less than expected no. of arguments --\n"; -$haystack = b'string_val'; +$haystack = 'string_val'; var_dump( mb_strrichr($haystack) ); ?> diff --git a/ext/mbstring/tests/mb_strrichr_error2.phpt b/ext/mbstring/tests/mb_strrichr_error2.phpt index e8f98ef442..b1877db9c1 100644 --- a/ext/mbstring/tests/mb_strrichr_error2.phpt +++ b/ext/mbstring/tests/mb_strrichr_error2.phpt @@ -17,8 +17,8 @@ echo "*** Testing mb_strrichr() : error conditions ***\n"; echo "\n-- Testing mb_strrichr() with unknown encoding --\n"; -$haystack = b'Hello, world'; -$needle = b'world'; +$haystack = 'Hello, world'; +$needle = 'world'; $encoding = 'unknown-encoding'; $part = true; var_dump( mb_strrichr($haystack, $needle, $part, $encoding) ); diff --git a/ext/mbstring/tests/mb_strrichr_variation1.phpt b/ext/mbstring/tests/mb_strrichr_variation1.phpt index e350718e77..06ca5e31c9 100644 --- a/ext/mbstring/tests/mb_strrichr_variation1.phpt +++ b/ext/mbstring/tests/mb_strrichr_variation1.phpt @@ -25,7 +25,7 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$needle = b'string_val'; +$needle = 'string_val'; $part = true; $encoding = 'utf-8'; @@ -37,7 +37,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -46,7 +46,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mbstring/tests/mb_strrichr_variation2.phpt b/ext/mbstring/tests/mb_strrichr_variation2.phpt index 3300ea5a61..e2c979b428 100644 --- a/ext/mbstring/tests/mb_strrichr_variation2.phpt +++ b/ext/mbstring/tests/mb_strrichr_variation2.phpt @@ -25,7 +25,7 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$haystack = b'string_val'; +$haystack = 'string_val'; $part = true; $encoding = 'utf-8'; @@ -37,7 +37,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -46,7 +46,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mbstring/tests/mb_strrichr_variation3.phpt b/ext/mbstring/tests/mb_strrichr_variation3.phpt index b57f309022..3949c148d1 100644 --- a/ext/mbstring/tests/mb_strrichr_variation3.phpt +++ b/ext/mbstring/tests/mb_strrichr_variation3.phpt @@ -25,8 +25,8 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$haystack = b'string_val'; -$needle = b'_'; +$haystack = 'string_val'; +$needle = '_'; $encoding = 'utf-8'; //get an unset variable diff --git a/ext/mbstring/tests/mb_strrichr_variation4.phpt b/ext/mbstring/tests/mb_strrichr_variation4.phpt index 2d04665884..f9d9f68037 100644 --- a/ext/mbstring/tests/mb_strrichr_variation4.phpt +++ b/ext/mbstring/tests/mb_strrichr_variation4.phpt @@ -25,8 +25,8 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$haystack = b'string_val'; -$needle = b'_'; +$haystack = 'string_val'; +$needle = '_'; $part = true; //get an unset variable diff --git a/ext/mbstring/tests/mb_strrichr_variation5.phpt b/ext/mbstring/tests/mb_strrichr_variation5.phpt index 417f53fde6..0e5d472fd8 100644 --- a/ext/mbstring/tests/mb_strrichr_variation5.phpt +++ b/ext/mbstring/tests/mb_strrichr_variation5.phpt @@ -18,10 +18,10 @@ echo "*** Testing mb_strrichr() : basic functionality ***\n"; mb_internal_encoding('UTF-8'); //ascii mixed case, multiple needles -$string_ascii = b'abcDef zBcDyx'; -$needle_ascii_upper = b"BCD"; -$needle_ascii_mixed = b"bCd"; -$needle_ascii_lower = b"bcd"; +$string_ascii = 'abcDef zBcDyx'; +$needle_ascii_upper = "BCD"; +$needle_ascii_mixed = "bCd"; +$needle_ascii_lower = "bcd"; //Greek string in mixed case UTF-8 with multiple needles $string_mb = base64_decode('zrrOu868zr3Ovs6fzqDOoSDOus67zpzOnc6+zr/OoA=='); diff --git a/ext/mbstring/tests/mb_strripos_basic.phpt b/ext/mbstring/tests/mb_strripos_basic.phpt index 32787a6eb9..c9e1ff84fc 100644 --- a/ext/mbstring/tests/mb_strripos_basic.phpt +++ b/ext/mbstring/tests/mb_strripos_basic.phpt @@ -23,26 +23,26 @@ mb_internal_encoding('UTF-8'); //ascii strings $ascii_haystacks = array( - b'abc defabc def', - b'ABC DEFABC DEF', - b'Abc dEFaBC Def', + 'abc defabc def', + 'ABC DEFABC DEF', + 'Abc dEFaBC Def', ); $ascii_needles = array( // 4 good ones - b'DE', - b'de', - b'De', - b'dE', + 'DE', + 'de', + 'De', + 'dE', //flag a swap between good and bad '!', // 4 bad ones - b'df', - b'Df', - b'dF', - b'DF' + 'df', + 'Df', + 'dF', + 'DF' ); //greek strings in UTF-8 diff --git a/ext/mbstring/tests/mb_strripos_basic2.phpt b/ext/mbstring/tests/mb_strripos_basic2.phpt index 9d7befc931..b330323c7e 100644 --- a/ext/mbstring/tests/mb_strripos_basic2.phpt +++ b/ext/mbstring/tests/mb_strripos_basic2.phpt @@ -23,17 +23,17 @@ mb_internal_encoding('UTF-8'); //ascii strings $ascii_haystacks = array( - b'abc defabc def', - b'ABC DEFABC DEF', - b'Abc dEFaBC Def', + 'abc defabc def', + 'ABC DEFABC DEF', + 'Abc dEFaBC Def', ); $ascii_needles = array( // 4 good ones - b'DE', - b'de', - b'De', - b'dE', + 'DE', + 'de', + 'De', + 'dE', ); //greek strings in UTF-8 diff --git a/ext/mbstring/tests/mb_strripos_error1.phpt b/ext/mbstring/tests/mb_strripos_error1.phpt index 955482b66f..3e2f6d928d 100644 --- a/ext/mbstring/tests/mb_strripos_error1.phpt +++ b/ext/mbstring/tests/mb_strripos_error1.phpt @@ -22,8 +22,8 @@ echo "*** Testing mb_strripos() : error conditions ***\n"; //Test mb_strripos with one more than the expected number of arguments echo "\n-- Testing mb_strripos() function with more than expected no. of arguments --\n"; -$haystack = b'string_val'; -$needle = b'string_val'; +$haystack = 'string_val'; +$needle = 'string_val'; $offset = 10; $encoding = 'string_val'; $extra_arg = 10; @@ -31,7 +31,7 @@ var_dump( mb_strripos($haystack, $needle, $offset, $encoding, $extra_arg) ); // Testing mb_strripos with one less than the expected number of arguments echo "\n-- Testing mb_strripos() function with less than expected no. of arguments --\n"; -$haystack = b'string_val'; +$haystack = 'string_val'; var_dump( mb_strripos($haystack) ); echo "Done"; diff --git a/ext/mbstring/tests/mb_strripos_error2.phpt b/ext/mbstring/tests/mb_strripos_error2.phpt index 4790ffbcb5..d01a774107 100644 --- a/ext/mbstring/tests/mb_strripos_error2.phpt +++ b/ext/mbstring/tests/mb_strripos_error2.phpt @@ -18,8 +18,8 @@ function_exists('mb_strripos') or die("skip mb_strripos() is not available in th */ echo "*** Testing mb_strripos() : error conditions ***\n"; -$haystack = b'Hello, world'; -$needle = b'world'; +$haystack = 'Hello, world'; +$needle = 'world'; $offset = 2; $encoding = 'unknown-encoding'; diff --git a/ext/mbstring/tests/mb_strripos_variation1.phpt b/ext/mbstring/tests/mb_strripos_variation1.phpt index 858705afc2..0a3be0a7da 100644 --- a/ext/mbstring/tests/mb_strripos_variation1.phpt +++ b/ext/mbstring/tests/mb_strripos_variation1.phpt @@ -20,7 +20,7 @@ function_exists('mb_strripos') or die("skip mb_strripos() is not available in th echo "*** Testing mb_strripos() : usage variations ***\n"; // Initialise function arguments not being substituted -$needle = b'string_val'; +$needle = 'string_val'; $offset = 0; $encoding = 'utf-8'; @@ -32,12 +32,12 @@ unset ($unset_var); class classA { public function __toString() { - return b"Class A object"; + return "Class A object"; } } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mbstring/tests/mb_strripos_variation2.phpt b/ext/mbstring/tests/mb_strripos_variation2.phpt index d16c250078..eafe7f79e9 100644 --- a/ext/mbstring/tests/mb_strripos_variation2.phpt +++ b/ext/mbstring/tests/mb_strripos_variation2.phpt @@ -20,7 +20,7 @@ function_exists('mb_strripos') or die("skip mb_strripos() is not available in th echo "*** Testing mb_strripos() : usage variations ***\n"; // Initialise function arguments not being substituted -$haystack = b'string_val'; +$haystack = 'string_val'; $offset = 0; $encoding = 'utf-8'; @@ -32,12 +32,12 @@ unset ($unset_var); class classA { public function __toString() { - return b"Class A object"; + return "Class A object"; } } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; @@ -75,8 +75,8 @@ $inputs = array( '', // string data -/*18*/ b"string", - b'string', +/*18*/ "string", + 'string', $heredoc, // object data diff --git a/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt b/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt index d580000463..cc3843e102 100644 --- a/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt +++ b/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt @@ -21,8 +21,8 @@ if (PHP_INT_SIZE != 8) die('skip 64-bit only'); echo "*** Testing mb_strripos() : usage variations ***\n"; // Initialise function arguments not being substituted -$needle = b'A'; -$haystack = b'string_val'; +$needle = 'A'; +$haystack = 'string_val'; $encoding = 'utf-8'; //get an unset variable @@ -33,12 +33,12 @@ unset ($unset_var); class classA { public function __toString() { - return b"Class A object"; + return "Class A object"; } } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; @@ -76,8 +76,8 @@ $inputs = array( '', // string data -/*18*/ b"string", - b'string', +/*18*/ "string", + 'string', $heredoc, // object data diff --git a/ext/mbstring/tests/mb_strripos_variation4.phpt b/ext/mbstring/tests/mb_strripos_variation4.phpt index c58568b697..27973e51ea 100644 --- a/ext/mbstring/tests/mb_strripos_variation4.phpt +++ b/ext/mbstring/tests/mb_strripos_variation4.phpt @@ -21,8 +21,8 @@ function_exists('mb_strripos') or die("skip mb_strripos() is not available in th echo "*** Testing mb_strripos() : usage variations ***\n"; // Initialise function arguments not being substituted -$haystack = b'string_val'; -$needle = b'VaL'; +$haystack = 'string_val'; +$needle = 'VaL'; $offset = 0; //get an unset variable diff --git a/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt b/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt index 8bd0e2e8bf..ce3074abf0 100644 --- a/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt +++ b/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt @@ -23,8 +23,8 @@ mb_internal_encoding('UTF-8'); echo "*** Testing mb_strripos() : usage variations ***\n"; -$string_ascii = b'+Is an English string'; //21 chars -$needle_ascii = b'G'; +$string_ascii = '+Is an English string'; //21 chars +$needle_ascii = 'G'; $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); //21 chars $needle_mb = base64_decode('44CC'); diff --git a/ext/mbstring/tests/mb_strrpos_basic.phpt b/ext/mbstring/tests/mb_strrpos_basic.phpt index ec6b86c292..9de0388f43 100644 --- a/ext/mbstring/tests/mb_strrpos_basic.phpt +++ b/ext/mbstring/tests/mb_strrpos_basic.phpt @@ -20,15 +20,15 @@ echo "*** Testing mb_strrpos() : basic ***\n"; mb_internal_encoding('UTF-8'); -$string_ascii = b'This is an English string. 0123456789.'; +$string_ascii = 'This is an English string. 0123456789.'; //Japanese string in UTF-8 $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); echo "\n-- ASCII string 1 --\n"; -var_dump(mb_strrpos($string_ascii, b'is', 4, 'ISO-8859-1')); +var_dump(mb_strrpos($string_ascii, 'is', 4, 'ISO-8859-1')); echo "\n-- ASCII string 2 --\n"; -var_dump(mb_strrpos($string_ascii, b'hello, world')); +var_dump(mb_strrpos($string_ascii, 'hello, world')); echo "\n-- Multibyte string 1 --\n"; $needle1 = base64_decode('44CC'); diff --git a/ext/mbstring/tests/mb_strrpos_variation1.phpt b/ext/mbstring/tests/mb_strrpos_variation1.phpt index 8b1713f9f1..f0e6e47987 100644 --- a/ext/mbstring/tests/mb_strrpos_variation1.phpt +++ b/ext/mbstring/tests/mb_strrpos_variation1.phpt @@ -19,7 +19,7 @@ function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this echo "*** Testing mb_strrpos() : usage variations ***\n"; // Initialise function arguments not being substituted -$needle = b'world'; +$needle = 'world'; $offset = 0; $encoding = 'utf-8'; @@ -31,12 +31,12 @@ unset ($unset_var); class classA { public function __toString() { - return b"hello, world"; + return "hello, world"; } } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello, world EOT; @@ -74,8 +74,8 @@ $inputs = array( '', // string data -/*18*/ b"hello, world", - b'hello, world', +/*18*/ "hello, world", + 'hello, world', $heredoc, // object data diff --git a/ext/mbstring/tests/mb_strrpos_variation3.phpt b/ext/mbstring/tests/mb_strrpos_variation3.phpt index 95840f9e73..da28d6ed7c 100644 --- a/ext/mbstring/tests/mb_strrpos_variation3.phpt +++ b/ext/mbstring/tests/mb_strrpos_variation3.phpt @@ -19,8 +19,8 @@ function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this echo "*** Testing mb_strrpos() : usage variations ***\n"; // Initialise function arguments not being substituted -$needle = b'a'; -$haystack = b'string_val'; +$needle = 'a'; +$haystack = 'string_val'; $encoding = 'utf-8'; //get an unset variable @@ -31,12 +31,12 @@ unset ($unset_var); class classA { public function __toString() { - return b"7"; + return "7"; } } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mbstring/tests/mb_strrpos_variation4.phpt b/ext/mbstring/tests/mb_strrpos_variation4.phpt index 9d9a5f2358..287142793b 100644 --- a/ext/mbstring/tests/mb_strrpos_variation4.phpt +++ b/ext/mbstring/tests/mb_strrpos_variation4.phpt @@ -20,8 +20,8 @@ function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this echo "*** Testing mb_strrpos() : usage variations ***\n"; // Initialise function arguments not being substituted -$haystack = b'hello, world'; -$needle = b'world'; +$haystack = 'hello, world'; +$needle = 'world'; $offset = 0; //get an unset variable diff --git a/ext/mbstring/tests/mb_strstr_basic.phpt b/ext/mbstring/tests/mb_strstr_basic.phpt index efa11056a1..2b41707a6a 100644 --- a/ext/mbstring/tests/mb_strstr_basic.phpt +++ b/ext/mbstring/tests/mb_strstr_basic.phpt @@ -17,18 +17,18 @@ echo "*** Testing mb_strstr() : basic functionality ***\n"; mb_internal_encoding('UTF-8'); -$string_ascii = b'abc def'; +$string_ascii = 'abc def'; //Japanese string in UTF-8 $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); echo "\n-- ASCII string: needle exists --\n"; -var_dump(bin2hex(mb_strstr($string_ascii, b'd', false, 'ISO-8859-1'))); -var_dump(bin2hex(mb_strstr($string_ascii, b'd'))); -var_dump(bin2hex(mb_strstr($string_ascii, b'd', true))); +var_dump(bin2hex(mb_strstr($string_ascii, 'd', false, 'ISO-8859-1'))); +var_dump(bin2hex(mb_strstr($string_ascii, 'd'))); +var_dump(bin2hex(mb_strstr($string_ascii, 'd', true))); echo "\n-- ASCII string: needle doesn't exist --\n"; -var_dump(mb_strstr($string_ascii, b'123')); +var_dump(mb_strstr($string_ascii, '123')); echo "\n-- Multibyte string: needle exists --\n"; $needle1 = base64_decode('5pel5pys6Kqe'); diff --git a/ext/mbstring/tests/mb_strstr_error1.phpt b/ext/mbstring/tests/mb_strstr_error1.phpt index ffbb636160..cf7c0b1f17 100644 --- a/ext/mbstring/tests/mb_strstr_error1.phpt +++ b/ext/mbstring/tests/mb_strstr_error1.phpt @@ -18,8 +18,8 @@ echo "*** Testing mb_strstr() : error conditions ***\n"; //Test mb_strstr with one more than the expected number of arguments echo "\n-- Testing mb_strstr() function with more than expected no. of arguments --\n"; -$haystack = b'string_val'; -$needle = b'string_val'; +$haystack = 'string_val'; +$needle = 'string_val'; $part = true; $encoding = 'string_val'; $extra_arg = 10; @@ -27,7 +27,7 @@ var_dump( mb_strstr($haystack, $needle, $part, $encoding, $extra_arg) ); // Testing mb_strstr with one less than the expected number of arguments echo "\n-- Testing mb_strstr() function with less than expected no. of arguments --\n"; -$haystack = b'string_val'; +$haystack = 'string_val'; var_dump( mb_strstr($haystack) ); ?> diff --git a/ext/mbstring/tests/mb_strstr_error2.phpt b/ext/mbstring/tests/mb_strstr_error2.phpt index 163c80026a..8df700080e 100644 --- a/ext/mbstring/tests/mb_strstr_error2.phpt +++ b/ext/mbstring/tests/mb_strstr_error2.phpt @@ -17,8 +17,8 @@ echo "*** Testing mb_strstr() : error conditions ***\n"; echo "\n-- Testing mb_strstr() with unknown encoding --\n"; -$haystack = b'Hello, world'; -$needle = b'world'; +$haystack = 'Hello, world'; +$needle = 'world'; $encoding = 'unknown-encoding'; $part = true; var_dump( mb_strstr($haystack, $needle, $part, $encoding) ); diff --git a/ext/mbstring/tests/mb_strstr_variation1.phpt b/ext/mbstring/tests/mb_strstr_variation1.phpt index 826014feae..a9406f1cad 100644 --- a/ext/mbstring/tests/mb_strstr_variation1.phpt +++ b/ext/mbstring/tests/mb_strstr_variation1.phpt @@ -25,7 +25,7 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$needle = b'string_val'; +$needle = 'string_val'; $part = true; $encoding = 'utf-8'; @@ -37,7 +37,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -46,7 +46,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mbstring/tests/mb_strstr_variation2.phpt b/ext/mbstring/tests/mb_strstr_variation2.phpt index 18820bab0f..8c059cb6b2 100644 --- a/ext/mbstring/tests/mb_strstr_variation2.phpt +++ b/ext/mbstring/tests/mb_strstr_variation2.phpt @@ -25,7 +25,7 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$haystack = b'string_val'; +$haystack = 'string_val'; $part = true; $encoding = 'utf-8'; @@ -37,7 +37,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -46,7 +46,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mbstring/tests/mb_strstr_variation3.phpt b/ext/mbstring/tests/mb_strstr_variation3.phpt index 7a8b7c6757..6bb1c88729 100644 --- a/ext/mbstring/tests/mb_strstr_variation3.phpt +++ b/ext/mbstring/tests/mb_strstr_variation3.phpt @@ -25,8 +25,8 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$haystack = b'string_val'; -$needle = b'_'; +$haystack = 'string_val'; +$needle = '_'; $encoding = 'utf-8'; //get an unset variable @@ -37,7 +37,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -46,7 +46,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mbstring/tests/mb_strstr_variation4.phpt b/ext/mbstring/tests/mb_strstr_variation4.phpt index e13428f633..8a0efcba8e 100644 --- a/ext/mbstring/tests/mb_strstr_variation4.phpt +++ b/ext/mbstring/tests/mb_strstr_variation4.phpt @@ -25,8 +25,8 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$haystack = b'string_val'; -$needle = b'_'; +$haystack = 'string_val'; +$needle = '_'; $part = true; //get an unset variable diff --git a/ext/mbstring/tests/mb_strstr_variation5.phpt b/ext/mbstring/tests/mb_strstr_variation5.phpt index 3bfbd61642..ab6315be44 100644 --- a/ext/mbstring/tests/mb_strstr_variation5.phpt +++ b/ext/mbstring/tests/mb_strstr_variation5.phpt @@ -18,8 +18,8 @@ echo "*** Testing mb_strstr() : variation ***\n"; mb_internal_encoding('UTF-8'); //with repeated needles -$string_ascii = b'abcdef zbcdyx'; -$needle_ascii = b"bcd"; +$string_ascii = 'abcdef zbcdyx'; +$needle_ascii = "bcd"; //Japanese string in UTF-8 with repeated needles $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OIMzTvvJXvvJbml6XmnKzoqp7jg4bjgq3jgrnjg4g='); diff --git a/ext/mbstring/tests/mb_strstr_variation6.phpt b/ext/mbstring/tests/mb_strstr_variation6.phpt index 1242e02d17..d00f15cfa3 100644 --- a/ext/mbstring/tests/mb_strstr_variation6.phpt +++ b/ext/mbstring/tests/mb_strstr_variation6.phpt @@ -18,10 +18,10 @@ echo "*** Testing mb_strstr() : variation ***\n"; mb_internal_encoding('UTF-8'); //ascii -$string_ascii = b'abcdef'; -$needle_ascii_upper = b"BCD"; -$needle_ascii_mixed = b"bCd"; -$needle_ascii_lower = b"bcd"; +$string_ascii = 'abcdef'; +$needle_ascii_upper = "BCD"; +$needle_ascii_mixed = "bCd"; +$needle_ascii_lower = "bcd"; //Greek string in lower case UTF-8 $string_mb = base64_decode('zrHOss6zzrTOtc62zrfOuM65zrrOu868zr3Ovs6/z4DPgc+Dz4TPhc+Gz4fPiM+J'); diff --git a/ext/mbstring/tests/mb_strtolower_variation2.phpt b/ext/mbstring/tests/mb_strtolower_variation2.phpt index 293c9559a9..43d0f53728 100644 --- a/ext/mbstring/tests/mb_strtolower_variation2.phpt +++ b/ext/mbstring/tests/mb_strtolower_variation2.phpt @@ -20,7 +20,7 @@ function_exists('mb_strtolower') or die("skip mb_strtolower() is not available i echo "*** Testing mb_strtolower() : usage variations ***\n"; // Initialise function arguments not being substituted -$sourcestring = b'Hello, World'; +$sourcestring = 'Hello, World'; //get an unset variable $unset_var = 10; diff --git a/ext/mbstring/tests/mb_strtolower_variation4.phpt b/ext/mbstring/tests/mb_strtolower_variation4.phpt index 37357a1898..f08b508798 100644 --- a/ext/mbstring/tests/mb_strtolower_variation4.phpt +++ b/ext/mbstring/tests/mb_strtolower_variation4.phpt @@ -18,10 +18,10 @@ function_exists('mb_strtolower') or die("skip mb_strtolower() is not available i echo "*** Testing mb_strtolower() : usage variations ***\n"; -$uppers = array('Basic Latin' => b'ABCDEFGHIJKLMNOPQRSTUVWXYZ', +$uppers = array('Basic Latin' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'Characters With Accents' => base64_decode('w4DDgcOCw4PDhMOFw4bDh8OIw4nDisOLw4zDjcOOw4/DkMORw5LDk8OUw5XDlg=='), 'Russian' => base64_decode('0JDQkdCS0JPQlNCV0JbQlw==')); -$lowers = array('Basic Latin' => b'abcdefghijklmnopqrstuvwxyz', +$lowers = array('Basic Latin' => 'abcdefghijklmnopqrstuvwxyz', 'Characters With Accents' => base64_decode('w6DDocOiw6PDpMOlw6bDp8Oow6nDqsOrw6zDrcOuw6/DsMOxw7LDs8O0w7XDtg=='), 'Russian' => base64_decode('0LDQsdCy0LPQtNC10LbQtw==')); diff --git a/ext/mbstring/tests/mb_strtoupper_basic.phpt b/ext/mbstring/tests/mb_strtoupper_basic.phpt index e77646923c..e8f48345fe 100644 --- a/ext/mbstring/tests/mb_strtoupper_basic.phpt +++ b/ext/mbstring/tests/mb_strtoupper_basic.phpt @@ -19,8 +19,8 @@ function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available i echo "*** Testing mb_strtoupper() : basic functionality ***\n"; mb_internal_encoding('utf-8'); -$ascii_lower = b'abcdefghijklmnopqrstuvwxyz'; -$ascii_upper = b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; +$ascii_lower = 'abcdefghijklmnopqrstuvwxyz'; +$ascii_upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $greek_lower = base64_decode('zrHOss6zzrTOtc62zrfOuM65zrrOu868zr3Ovs6/z4DPgc+Dz4TPhc+Gz4fPiM+J'); $greek_upper = base64_decode('zpHOks6TzpTOlc6WzpfOmM6ZzprOm86czp3Ons6fzqDOoc6jzqTOpc6mzqfOqM6p'); diff --git a/ext/mbstring/tests/mb_strtoupper_variation2.phpt b/ext/mbstring/tests/mb_strtoupper_variation2.phpt index 035cd63f49..52beb3d741 100644 --- a/ext/mbstring/tests/mb_strtoupper_variation2.phpt +++ b/ext/mbstring/tests/mb_strtoupper_variation2.phpt @@ -20,7 +20,7 @@ function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available i echo "*** Testing mb_strtoupper() : usage variations ***\n"; // Initialise function arguments not being substituted -$sourcestring = b'Hello, World'; +$sourcestring = 'Hello, World'; //get an unset variable $unset_var = 10; diff --git a/ext/mbstring/tests/mb_strtoupper_variation4.phpt b/ext/mbstring/tests/mb_strtoupper_variation4.phpt index 7d91c8a2de..8f5abe7269 100644 --- a/ext/mbstring/tests/mb_strtoupper_variation4.phpt +++ b/ext/mbstring/tests/mb_strtoupper_variation4.phpt @@ -19,10 +19,10 @@ function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available i echo "*** Testing mb_strtoupper() : usage variations ***\n"; -$uppers = array('Basic Latin' => b'ABCDEFGHIJKLMNOPQRSTUVWXYZ', +$uppers = array('Basic Latin' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'Characters With Accents' => base64_decode('w4DDgcOCw4PDhMOFw4bDh8OIw4nDisOLw4zDjcOOw4/DkMORw5LDk8OUw5XDlg=='), 'Russian' => base64_decode('0JDQkdCS0JPQlNCV0JbQlw==')); -$lowers = array('Basic Latin' => b'abcdefghijklmnopqrstuvwxyz', +$lowers = array('Basic Latin' => 'abcdefghijklmnopqrstuvwxyz', 'Characters With Accents' => base64_decode('w6DDocOiw6PDpMOlw6bDp8Oow6nDqsOrw6zDrcOuw6/DsMOxw7LDs8O0w7XDtg=='), 'Russian' => base64_decode('0LDQsdCy0LPQtNC10LbQtw==')); diff --git a/ext/mbstring/tests/mb_substr.phpt b/ext/mbstring/tests/mb_substr.phpt index d9269c3777..94a0d8e368 100644 --- a/ext/mbstring/tests/mb_substr.phpt +++ b/ext/mbstring/tests/mb_substr.phpt @@ -12,7 +12,7 @@ ini_set('include_path','.'); include_once('common.inc'); // EUC-JP -$euc_jp = b'0123¤³¤Îʸ»úÎó¤ÏÆüËܸì¤Ç¤¹¡£EUC-JP¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£ÆüËܸì¤ÏÌÌÅݽ¤¤¡£'; +$euc_jp = '0123¤³¤Îʸ»úÎó¤ÏÆüËܸì¤Ç¤¹¡£EUC-JP¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£ÆüËܸì¤ÏÌÌÅݽ¤¤¡£'; print "1: ". bin2hex(mb_substr($euc_jp, 10, 10,'EUC-JP')) . "\n"; print "2: ". bin2hex(mb_substr($euc_jp, 0, 100,'EUC-JP')) . "\n"; diff --git a/ext/mbstring/tests/mb_substr_count_variation3.phpt b/ext/mbstring/tests/mb_substr_count_variation3.phpt index 65c8769b0b..d2e7a60566 100644 --- a/ext/mbstring/tests/mb_substr_count_variation3.phpt +++ b/ext/mbstring/tests/mb_substr_count_variation3.phpt @@ -20,8 +20,8 @@ function_exists('mb_substr_count') or die("skip mb_substr_count() is not availab echo "*** Testing mb_substr_count() : usage variations ***\n"; // Initialise function arguments not being substituted (if any) -$haystack = b'hello, world'; -$needle = b'world'; +$haystack = 'hello, world'; +$needle = 'world'; //get an unset variable $unset_var = 10; diff --git a/ext/mbstring/tests/mb_substr_count_variation4.phpt b/ext/mbstring/tests/mb_substr_count_variation4.phpt index 624c95a956..21c9f956fb 100644 --- a/ext/mbstring/tests/mb_substr_count_variation4.phpt +++ b/ext/mbstring/tests/mb_substr_count_variation4.phpt @@ -22,8 +22,8 @@ echo "*** Testing mb_substr_count() : usage variations ***\n"; echo "\n-- ASCII String --\n"; -$string_ascii = b'abcabcabc'; -var_dump(mb_substr_count($string_ascii, b'abcabc')); //needle overlaps in haystack +$string_ascii = 'abcabcabc'; +var_dump(mb_substr_count($string_ascii, 'abcabc')); //needle overlaps in haystack echo "\n-- Multibyte String --\n"; $string_mb = base64_decode('5pel5pys6Kqe5pel5pys6Kqe5pel5pys6Kqe'); diff --git a/ext/mbstring/tests/mb_substr_variation2.phpt b/ext/mbstring/tests/mb_substr_variation2.phpt index 7c02601f17..7c763f3616 100644 --- a/ext/mbstring/tests/mb_substr_variation2.phpt +++ b/ext/mbstring/tests/mb_substr_variation2.phpt @@ -20,7 +20,7 @@ function_exists('mb_substr') or die("skip mb_substr() is not available in this b echo "*** Testing mb_substr() : usage variations ***\n"; // Initialise function arguments not being substituted -$str = b'string_val'; +$str = 'string_val'; $start = 1; $length = 5; diff --git a/ext/mbstring/tests/mb_substr_variation4.phpt b/ext/mbstring/tests/mb_substr_variation4.phpt index c4a723a0a1..ce4df53005 100644 --- a/ext/mbstring/tests/mb_substr_variation4.phpt +++ b/ext/mbstring/tests/mb_substr_variation4.phpt @@ -20,7 +20,7 @@ echo "*** Testing mb_substr() : usage variations ***\n"; mb_internal_encoding('UTF-8'); -$string_ascii = b'+Is an English string'; //21 chars +$string_ascii = '+Is an English string'; //21 chars $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); //21 chars diff --git a/ext/mbstring/tests/mb_substr_variation5.phpt b/ext/mbstring/tests/mb_substr_variation5.phpt index 11caa9cab3..1ec92be993 100644 --- a/ext/mbstring/tests/mb_substr_variation5.phpt +++ b/ext/mbstring/tests/mb_substr_variation5.phpt @@ -20,7 +20,7 @@ echo "*** Testing mb_substr() : usage variations ***\n"; mb_internal_encoding('UTF-8'); -$string_ascii = b'+Is an English string'; //21 chars +$string_ascii = '+Is an English string'; //21 chars //Japanese string, 21 characters $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); diff --git a/ext/mbstring/tests/mb_substr_variation6.phpt b/ext/mbstring/tests/mb_substr_variation6.phpt index 20ee1ec156..aa75c70c00 100644 --- a/ext/mbstring/tests/mb_substr_variation6.phpt +++ b/ext/mbstring/tests/mb_substr_variation6.phpt @@ -20,7 +20,7 @@ echo "*** Testing mb_substr() : usage variations ***\n"; mb_internal_encoding('UTF-8'); -$string_ascii = b'+Is an English string'; //21 chars +$string_ascii = '+Is an English string'; //21 chars $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); //21 chars diff --git a/ext/mbstring/tests/mb_substr_variation7.phpt b/ext/mbstring/tests/mb_substr_variation7.phpt index 4d68097df6..22b5fa2fe3 100644 --- a/ext/mbstring/tests/mb_substr_variation7.phpt +++ b/ext/mbstring/tests/mb_substr_variation7.phpt @@ -20,7 +20,7 @@ echo "*** Testing mb_substr() : usage variations ***\n"; mb_internal_encoding('UTF-8'); -$string_ascii = b'+Is an English string'; //21 chars +$string_ascii = '+Is an English string'; //21 chars //Japanese string, 21 characters $string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); diff --git a/ext/mcrypt/tests/mcrypt_cbc_3des_decrypt.phpt b/ext/mcrypt/tests/mcrypt_cbc_3des_decrypt.phpt index b306a8a94e..01a150de6c 100644 --- a/ext/mcrypt/tests/mcrypt_cbc_3des_decrypt.phpt +++ b/ext/mcrypt/tests/mcrypt_cbc_3des_decrypt.phpt @@ -15,14 +15,14 @@ if (!extension_loaded("mcrypt")) { */ $cipher = MCRYPT_TRIPLEDES; -$data = b"This is the secret message which must be encrypted"; +$data = "This is the secret message which must be encrypted"; // tripledes uses keys with exactly 192 bits (24 bytes) $keys = array( - b'12345678', - b'12345678901234567890', - b'123456789012345678901234', - b'12345678901234567890123456' + '12345678', + '12345678901234567890', + '123456789012345678901234', + '12345678901234567890123456' ); $data1 = array( 'IleMhoxiOthmHua4tFBHOw==', @@ -32,9 +32,9 @@ $data1 = array( ); // tripledes is a block cipher of 64 bits (8 bytes) $ivs = array( - b'1234', - b'12345678', - b'123456789' + '1234', + '12345678', + '123456789' ); // data represented in base64 (ascii) $data2 = array( @@ -43,14 +43,14 @@ $data2 = array( '+G7nGcWIxij3TZjpI9lJdQ==' ); -$iv = b'12345678'; +$iv = '12345678'; echo "\n--- testing different key lengths\n"; for ($i = 0; $i < sizeof($keys); $i++) { echo "\nkey length=".strlen($keys[$i])."\n"; special_var_dump(mcrypt_decrypt($cipher, $keys[$i], base64_decode($data1[$i]), MCRYPT_MODE_CBC, $iv)); } -$key = b'123456789012345678901234'; +$key = '123456789012345678901234'; echo "\n--- testing different iv lengths\n"; for ($i = 0; $i < sizeof($ivs); $i++) { echo "\niv length=".strlen($ivs[$i])."\n"; diff --git a/ext/mcrypt/tests/mcrypt_cbc_3des_encrypt.phpt b/ext/mcrypt/tests/mcrypt_cbc_3des_encrypt.phpt index 0fea9063df..53bd186d26 100644 --- a/ext/mcrypt/tests/mcrypt_cbc_3des_encrypt.phpt +++ b/ext/mcrypt/tests/mcrypt_cbc_3des_encrypt.phpt @@ -15,29 +15,29 @@ if (!extension_loaded("mcrypt")) { */ $cipher = MCRYPT_TRIPLEDES; -$data = b"This is the secret message which must be encrypted"; +$data = "This is the secret message which must be encrypted"; // tripledes uses keys with exactly 192 bits (24 bytes) $keys = array( - b'12345678', - b'12345678901234567890', - b'123456789012345678901234', - b'12345678901234567890123456'); + '12345678', + '12345678901234567890', + '123456789012345678901234', + '12345678901234567890123456'); // tripledes is a block cipher of 64 bits (8 bytes) $ivs = array( - b'1234', - b'12345678', - b'123456789'); + '1234', + '12345678', + '123456789'); -$iv = b'12345678'; +$iv = '12345678'; echo "\n--- testing different key lengths\n"; foreach ($keys as $key) { echo "\nkey length=".strlen($key)."\n"; var_dump(bin2hex(mcrypt_encrypt($cipher, $key, $data, MCRYPT_MODE_CBC, $iv))); } -$key = b'123456789012345678901234'; +$key = '123456789012345678901234'; echo "\n--- testing different iv lengths\n"; foreach ($ivs as $iv) { echo "\niv length=".strlen($iv)."\n"; diff --git a/ext/mcrypt/tests/mcrypt_decrypt_3des_cbc.phpt b/ext/mcrypt/tests/mcrypt_decrypt_3des_cbc.phpt index cc5996d410..6379b47ac1 100644 --- a/ext/mcrypt/tests/mcrypt_decrypt_3des_cbc.phpt +++ b/ext/mcrypt/tests/mcrypt_decrypt_3des_cbc.phpt @@ -23,10 +23,10 @@ $mode = MCRYPT_MODE_CBC; // tripledes uses keys with exactly 192 bits (24 bytes) $keys = array( - b'12345678', - b'12345678901234567890', - b'123456789012345678901234', - b'12345678901234567890123456' + '12345678', + '12345678901234567890', + '123456789012345678901234', + '12345678901234567890123456' ); $data1 = array( 'IleMhoxiOthmHua4tFBHOw==', @@ -36,9 +36,9 @@ $data1 = array( ); // tripledes is a block cipher of 64 bits (8 bytes) $ivs = array( - b'1234', - b'12345678', - b'123456789' + '1234', + '12345678', + '123456789' ); $data2 = array( '+G7nGcWIxij3TZjpI9lJdQ==', @@ -46,14 +46,14 @@ $data2 = array( '+G7nGcWIxij3TZjpI9lJdQ==' ); -$iv = b'12345678'; +$iv = '12345678'; echo "\n--- testing different key lengths\n"; for ($i = 0; $i < sizeof($keys); $i++) { echo "\nkey length=".strlen($keys[$i])."\n"; special_var_dump(mcrypt_decrypt($cipher, $keys[$i], base64_decode($data1[$i]), $mode, $iv)); } -$key = b'123456789012345678901234'; +$key = '123456789012345678901234'; echo "\n--- testing different iv lengths\n"; for ($i = 0; $i < sizeof($ivs); $i++) { echo "\niv length=".strlen($ivs[$i])."\n"; diff --git a/ext/mcrypt/tests/mcrypt_decrypt_3des_ecb.phpt b/ext/mcrypt/tests/mcrypt_decrypt_3des_ecb.phpt index e86a5650fe..4bc78f817d 100644 --- a/ext/mcrypt/tests/mcrypt_decrypt_3des_ecb.phpt +++ b/ext/mcrypt/tests/mcrypt_decrypt_3des_ecb.phpt @@ -23,10 +23,10 @@ $mode = MCRYPT_MODE_ECB; // tripledes uses keys with exactly 192 bits (24 bytes) $keys = array( - b'12345678', - b'12345678901234567890', - b'123456789012345678901234', - b'12345678901234567890123456' + '12345678', + '12345678901234567890', + '123456789012345678901234', + '12345678901234567890123456' ); $data1 = array( '0D4ArM3ejyhic9rnCcIW9A==', @@ -36,9 +36,9 @@ $data1 = array( ); // tripledes is a block cipher of 64 bits (8 bytes) $ivs = array( - b'1234', - b'12345678', - b'123456789' + '1234', + '12345678', + '123456789' ); $data2 = array( '+G7nGcWIxigQcJD+2P14HA==', @@ -52,7 +52,7 @@ for ($i = 0; $i < sizeof($keys); $i++) { special_var_dump(mcrypt_decrypt($cipher, $keys[$i], base64_decode($data1[$i]), $mode)); } -$key = b'123456789012345678901234'; +$key = '123456789012345678901234'; echo "\n--- testing different iv lengths\n"; for ($i = 0; $i < sizeof($ivs); $i++) { echo "\niv length=".strlen($ivs[$i])."\n"; diff --git a/ext/mcrypt/tests/mcrypt_decrypt_variation1.phpt b/ext/mcrypt/tests/mcrypt_decrypt_variation1.phpt index 37fffad4d7..4f44d5bdcf 100644 --- a/ext/mcrypt/tests/mcrypt_decrypt_variation1.phpt +++ b/ext/mcrypt/tests/mcrypt_decrypt_variation1.phpt @@ -26,10 +26,10 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$key = b'string_val'; -$data = b'string_val'; +$key = 'string_val'; +$data = 'string_val'; $mode = MCRYPT_MODE_ECB; -$iv = b'string_val'; +$iv = 'string_val'; //get an unset variable $unset_var = 10; diff --git a/ext/mcrypt/tests/mcrypt_decrypt_variation2.phpt b/ext/mcrypt/tests/mcrypt_decrypt_variation2.phpt index 25cc371f75..df273de155 100644 --- a/ext/mcrypt/tests/mcrypt_decrypt_variation2.phpt +++ b/ext/mcrypt/tests/mcrypt_decrypt_variation2.phpt @@ -27,9 +27,9 @@ set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) $cipher = MCRYPT_TRIPLEDES; -$data = b'string_val'; +$data = 'string_val'; $mode = MCRYPT_MODE_ECB; -$iv = b'01234567'; +$iv = '01234567'; //get an unset variable $unset_var = 10; @@ -39,7 +39,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -48,7 +48,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mcrypt/tests/mcrypt_decrypt_variation3.phpt b/ext/mcrypt/tests/mcrypt_decrypt_variation3.phpt index caa3635986..49365d984e 100644 --- a/ext/mcrypt/tests/mcrypt_decrypt_variation3.phpt +++ b/ext/mcrypt/tests/mcrypt_decrypt_variation3.phpt @@ -27,9 +27,9 @@ set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) $cipher = MCRYPT_TRIPLEDES; -$key = b"string_val\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; +$key = "string_val\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; $mode = MCRYPT_MODE_ECB; -$iv = b'01234567'; +$iv = '01234567'; //get an unset variable $unset_var = 10; @@ -39,7 +39,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -48,7 +48,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mcrypt/tests/mcrypt_decrypt_variation4.phpt b/ext/mcrypt/tests/mcrypt_decrypt_variation4.phpt index 575ed8e9d7..ff6bf978ae 100644 --- a/ext/mcrypt/tests/mcrypt_decrypt_variation4.phpt +++ b/ext/mcrypt/tests/mcrypt_decrypt_variation4.phpt @@ -27,9 +27,9 @@ set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) $cipher = MCRYPT_TRIPLEDES; -$key = b'string_val'; -$data = b'string_val'; -$iv = b'01234567'; +$key = 'string_val'; +$data = 'string_val'; +$iv = '01234567'; //get an unset variable $unset_var = 10; diff --git a/ext/mcrypt/tests/mcrypt_decrypt_variation5.phpt b/ext/mcrypt/tests/mcrypt_decrypt_variation5.phpt index 9fd28498d1..e4b6894109 100644 --- a/ext/mcrypt/tests/mcrypt_decrypt_variation5.phpt +++ b/ext/mcrypt/tests/mcrypt_decrypt_variation5.phpt @@ -27,8 +27,8 @@ set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) $cipher = MCRYPT_TRIPLEDES; -$key = b"string_val\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; -$data = b'string_val'; +$key = "string_val\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; +$data = 'string_val'; $mode = MCRYPT_MODE_CBC; //get an unset variable @@ -39,7 +39,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -48,7 +48,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt b/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt index 635ca25a55..1a52955844 100644 --- a/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt +++ b/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt @@ -17,14 +17,14 @@ error_reporting(E_ALL); */ $cipher = MCRYPT_TRIPLEDES; -$data = b"This is the secret message which must be encrypted"; +$data = "This is the secret message which must be encrypted"; // tripledes uses keys up to 192 bits (24 bytes) $keys = array( - b'12345678', - b'12345678901234567890', - b'123456789012345678901234', - b'12345678901234567890123456' + '12345678', + '12345678901234567890', + '123456789012345678901234', + '12345678901234567890123456' ); $data1 = array( '0D4ArM3ejyhic9rnCcIW9A==', @@ -34,9 +34,9 @@ $data1 = array( ); // tripledes is a block cipher of 64 bits (8 bytes) $ivs = array( - b'1234', - b'12345678', - b'123456789' + '1234', + '12345678', + '123456789' ); $data2 = array( '+G7nGcWIxigQcJD+2P14HA==', @@ -44,14 +44,14 @@ $data2 = array( '+G7nGcWIxigQcJD+2P14HA==' ); -$iv = b'12345678'; +$iv = '12345678'; echo "\n--- testing different key lengths\n"; for ($i = 0; $i < sizeof($keys); $i++) { echo "\nkey length=".strlen($keys[$i])."\n"; special_var_dump(mcrypt_decrypt($cipher, $keys[$i], base64_decode($data1[$i]), MCRYPT_MODE_ECB, $iv)); } -$key = b'123456789012345678901234'; +$key = '123456789012345678901234'; echo "\n--- testing different iv lengths\n"; for ($i = 0; $i < sizeof($ivs); $i++) { echo "\niv length=".strlen($ivs[$i])."\n"; diff --git a/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt b/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt index 68f056c510..1d0dcdf907 100644 --- a/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt +++ b/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt @@ -17,30 +17,30 @@ error_reporting(E_ALL); */ $cipher = MCRYPT_TRIPLEDES; -$data = b"This is the secret message which must be encrypted"; +$data = "This is the secret message which must be encrypted"; // tripledes uses keys up to 192 bits (24 bytes) $keys = array( - b'12345678', - b'12345678901234567890', - b'123456789012345678901234', - b'12345678901234567890123456' + '12345678', + '12345678901234567890', + '123456789012345678901234', + '12345678901234567890123456' ); // tripledes is a block cipher of 64 bits (8 bytes) $ivs = array( - b'1234', - b'12345678', - b'123456789' + '1234', + '12345678', + '123456789' ); -$iv = b'12345678'; +$iv = '12345678'; echo "\n--- testing different key lengths\n"; foreach ($keys as $key) { echo "\nkey length=".strlen($key)."\n"; var_dump(bin2hex(mcrypt_encrypt($cipher, $key, $data, MCRYPT_MODE_ECB, $iv))); } -$key = b"1234567890123456\0\0\0\0\0\0\0\0"; +$key = "1234567890123456\0\0\0\0\0\0\0\0"; echo "\n--- testing different iv lengths\n"; foreach ($ivs as $iv) { echo "\niv length=".strlen($iv)."\n"; diff --git a/ext/mcrypt/tests/mcrypt_encrypt_3des_cbc.phpt b/ext/mcrypt/tests/mcrypt_encrypt_3des_cbc.phpt index 15b3c886fa..9386e6125d 100644 --- a/ext/mcrypt/tests/mcrypt_encrypt_3des_cbc.phpt +++ b/ext/mcrypt/tests/mcrypt_encrypt_3des_cbc.phpt @@ -25,31 +25,31 @@ echo "*** Testing mcrypt_encrypt() : TripleDES functionality ***\n"; $cipher = MCRYPT_TRIPLEDES; $mode = MCRYPT_MODE_CBC; -$data = b'This is the secret message which must be encrypted'; +$data = 'This is the secret message which must be encrypted'; // tripledes uses keys up to 192 bits (24 bytes) $keys = array( - b'12345678', - b'12345678901234567890', - b'123456789012345678901234', - b'12345678901234567890123456' + '12345678', + '12345678901234567890', + '123456789012345678901234', + '12345678901234567890123456' ); // tripledes is a block cipher of 64 bits (8 bytes) $ivs = array( - b'1234', - b'12345678', - b'123456789' + '1234', + '12345678', + '123456789' ); -$iv = b'12345678'; +$iv = '12345678'; echo "\n--- testing different key lengths\n"; foreach ($keys as $key) { echo "\nkey length=".strlen($key)."\n"; var_dump(bin2hex(mcrypt_encrypt($cipher, $key, $data, $mode, $iv))); } -$key = b'123456789012345678901234'; +$key = '123456789012345678901234'; echo "\n--- testing different iv lengths\n"; foreach ($ivs as $iv) { echo "\niv length=".strlen($iv)."\n"; diff --git a/ext/mcrypt/tests/mcrypt_encrypt_3des_ecb.phpt b/ext/mcrypt/tests/mcrypt_encrypt_3des_ecb.phpt index ffcabf8f5f..55bb4959bd 100644 --- a/ext/mcrypt/tests/mcrypt_encrypt_3des_ecb.phpt +++ b/ext/mcrypt/tests/mcrypt_encrypt_3des_ecb.phpt @@ -18,14 +18,14 @@ echo "*** Testing mcrypt_encrypt() : TripleDES functionality ***\n"; $cipher = MCRYPT_TRIPLEDES; $mode = MCRYPT_MODE_ECB; -$data = b'This is the secret message which must be encrypted'; +$data = 'This is the secret message which must be encrypted'; // tripledes uses keys up to 192 bits (24 bytes) $keys = array( - b'12345678', - b'12345678901234567890', - b'123456789012345678901234', - b'12345678901234567890123456' + '12345678', + '12345678901234567890', + '123456789012345678901234', + '12345678901234567890123456' ); echo "\n--- testing different key lengths\n"; @@ -34,11 +34,11 @@ foreach ($keys as $key) { var_dump(bin2hex(mcrypt_encrypt($cipher, $key, $data, $mode))); } -$key = b'123456789012345678901234'; +$key = '123456789012345678901234'; $ivs = array( - b'1234', - b'12345678', - b'123456789' + '1234', + '12345678', + '123456789' ); // ivs should be ignored in ecb mode diff --git a/ext/mcrypt/tests/mcrypt_encrypt_variation1.phpt b/ext/mcrypt/tests/mcrypt_encrypt_variation1.phpt index 88b6edef3d..1f007ef65f 100644 --- a/ext/mcrypt/tests/mcrypt_encrypt_variation1.phpt +++ b/ext/mcrypt/tests/mcrypt_encrypt_variation1.phpt @@ -26,10 +26,10 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) -$key = b'string_val'; -$data = b'string_val'; +$key = 'string_val'; +$data = 'string_val'; $mode = MCRYPT_MODE_ECB; -$iv = b'string_val'; +$iv = 'string_val'; //get an unset variable $unset_var = 10; diff --git a/ext/mcrypt/tests/mcrypt_encrypt_variation2.phpt b/ext/mcrypt/tests/mcrypt_encrypt_variation2.phpt index fa0cd81665..2bd2c3a63b 100644 --- a/ext/mcrypt/tests/mcrypt_encrypt_variation2.phpt +++ b/ext/mcrypt/tests/mcrypt_encrypt_variation2.phpt @@ -27,9 +27,9 @@ set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) $cipher = MCRYPT_TRIPLEDES; -$data = b'string_val'; +$data = 'string_val'; $mode = MCRYPT_MODE_ECB; -$iv = b'01234567'; +$iv = '01234567'; //get an unset variable $unset_var = 10; @@ -39,7 +39,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -48,7 +48,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mcrypt/tests/mcrypt_encrypt_variation3.phpt b/ext/mcrypt/tests/mcrypt_encrypt_variation3.phpt index 17698d20d9..3bbcc7d520 100644 --- a/ext/mcrypt/tests/mcrypt_encrypt_variation3.phpt +++ b/ext/mcrypt/tests/mcrypt_encrypt_variation3.phpt @@ -27,9 +27,9 @@ set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) $cipher = MCRYPT_TRIPLEDES; -$key = b"string_val\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; +$key = "string_val\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; $mode = MCRYPT_MODE_ECB; -$iv = b'01234567'; +$iv = '01234567'; //get an unset variable $unset_var = 10; @@ -39,7 +39,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -48,7 +48,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mcrypt/tests/mcrypt_encrypt_variation4.phpt b/ext/mcrypt/tests/mcrypt_encrypt_variation4.phpt index 363defdcf0..0969c23ea4 100644 --- a/ext/mcrypt/tests/mcrypt_encrypt_variation4.phpt +++ b/ext/mcrypt/tests/mcrypt_encrypt_variation4.phpt @@ -27,9 +27,9 @@ set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) $cipher = MCRYPT_TRIPLEDES; -$key = b'string_val'; -$data = b'string_val'; -$iv = b'01234567'; +$key = 'string_val'; +$data = 'string_val'; +$iv = '01234567'; //get an unset variable $unset_var = 10; diff --git a/ext/mcrypt/tests/mcrypt_encrypt_variation5.phpt b/ext/mcrypt/tests/mcrypt_encrypt_variation5.phpt index 7ad6dd5f9a..028698b216 100644 --- a/ext/mcrypt/tests/mcrypt_encrypt_variation5.phpt +++ b/ext/mcrypt/tests/mcrypt_encrypt_variation5.phpt @@ -27,8 +27,8 @@ set_error_handler('test_error_handler'); // Initialise function arguments not being substituted (if any) $cipher = MCRYPT_TRIPLEDES; -$key = b"string_val\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; -$data = b'string_val'; +$key = "string_val\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; +$data = 'string_val'; //in php, it incorrectly reports problems with iv in ECB mode. $mode = MCRYPT_MODE_CBC; @@ -40,7 +40,7 @@ unset ($unset_var); class classWithToString { public function __toString() { - return b"Class A object"; + return "Class A object"; } } @@ -49,7 +49,7 @@ class classWithoutToString } // heredoc string -$heredoc = b<<<EOT +$heredoc = <<<EOT hello world EOT; diff --git a/ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt b/ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt index d9e7d96bbc..e0ca23f044 100644 --- a/ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt +++ b/ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt @@ -28,26 +28,26 @@ echo "*** Testing mcrypt : Rijndael128 functionality ***\n"; $cipher = MCRYPT_RIJNDAEL_128; $mode = MCRYPT_MODE_CBC; -$data = b'This is the secret message which must be encrypted'; +$data = 'This is the secret message which must be encrypted'; // keys up to 128 bits (16 bytes) $keys = array( null, '', - b'12345678', - b'1234567890123456' + '12345678', + '1234567890123456' ); // rijndael128 is a block cipher of 128 bits (16 bytes) $ivs = array( null, '', - b'12345678', - b'1234567890123456', - b'12345678901234567' + '12345678', + '1234567890123456', + '12345678901234567' ); -$iv = b'1234567890123456'; +$iv = '1234567890123456'; echo "\n--- testing different key lengths\n"; foreach ($keys as $key) { echo "\nkey length=".strlen($key)."\n"; @@ -55,7 +55,7 @@ foreach ($keys as $key) { var_dump(bin2hex($res)); } -$key = b'1234567890123456'; +$key = '1234567890123456'; echo "\n--- testing different iv lengths\n"; foreach ($ivs as $iv) { echo "\niv length=".strlen($iv)."\n"; diff --git a/ext/mcrypt/tests/mcrypt_rijndael128_256BitKey.phpt b/ext/mcrypt/tests/mcrypt_rijndael128_256BitKey.phpt index 7fef8af36d..710866ad47 100644 --- a/ext/mcrypt/tests/mcrypt_rijndael128_256BitKey.phpt +++ b/ext/mcrypt/tests/mcrypt_rijndael128_256BitKey.phpt @@ -33,18 +33,18 @@ echo "*** Testing mcrypt : Rijndael128 functionality ***\n"; $cipher = MCRYPT_RIJNDAEL_128; $mode = MCRYPT_MODE_CBC; -$data = b'This is the secret message which must be encrypted'; +$data = 'This is the secret message which must be encrypted'; // keys : 20 bytes, 24 bytes, 30 Bytes, 32 Bytes, 40 Bytes $keys = array( - b'12345678901234567890', - b'123456789012345678901234', - b'123456789012345678901234567890', - b'12345678901234567890123456789012', - b'1234567890123456789012345678901234567890' + '12345678901234567890', + '123456789012345678901234', + '123456789012345678901234567890', + '12345678901234567890123456789012', + '1234567890123456789012345678901234567890' ); // rijndael128 is a block cipher of 128 bits (16 bytes) -$iv = b'1234567890123456'; +$iv = '1234567890123456'; echo "\n--- testing different key lengths\n"; foreach ($keys as $key) { diff --git a/ext/mysqli/tests/061.phpt b/ext/mysqli/tests/061.phpt index 5817d8230d..b2d67014ff 100644 --- a/ext/mysqli/tests/061.phpt +++ b/ext/mysqli/tests/061.phpt @@ -32,7 +32,7 @@ mysqli_close($link); /* create temporary file */ $filename = dirname(__FILE__) . "061.csv"; $fp = fopen($filename, "w"); - fwrite($fp, b"foo;bar"); + fwrite($fp, "foo;bar"); fclose($fp); if (!mysqli_query($link,"DROP TABLE IF EXISTS t_061")) diff --git a/ext/mysqli/tests/mysqli_info.phpt b/ext/mysqli/tests/mysqli_info.phpt index 759c7bd4c1..d60ffd9fbe 100644 --- a/ext/mysqli/tests/mysqli_info.phpt +++ b/ext/mysqli/tests/mysqli_info.phpt @@ -63,9 +63,9 @@ require_once('skipifconnectfailure.inc'); /* ignore this error */ break; - if (!fwrite($fp, b"100;'a';\n") || - !fwrite($fp, b"101;'b';\n") || - !fwrite($fp, b"102;'c';\n")) { + if (!fwrite($fp, "100;'a';\n") || + !fwrite($fp, "101;'b';\n") || + !fwrite($fp, "102;'c';\n")) { @unlink($file); break; } diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt index c16b077871..52e9d4b24b 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt @@ -274,9 +274,9 @@ require_once('skipifconnectfailure.inc'); // Note: you cannot insert any blob values this way. But you can check the API at least partly this way // Extra BLOB tests are in mysqli_stmt_send_long() - func_mysqli_stmt_bind_result($link, $engine, "b", "BLOB", b"", 1580); + func_mysqli_stmt_bind_result($link, $engine, "b", "BLOB", "", 1580); func_mysqli_stmt_bind_result($link, $engine, "b", "TEXT", "", 1600, 'string'); - func_mysqli_stmt_bind_result($link, $engine, "b", "MEDIUMBLOB", b"", 1620); + func_mysqli_stmt_bind_result($link, $engine, "b", "MEDIUMBLOB", "", 1620); func_mysqli_stmt_bind_result($link, $engine, "b", "MEDIUMTEXT", "", 1640, 'string'); /* Is this one related? http://bugs.php.net/bug.php?id=35759 */ diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt index 1e7da1f944..7b6d3c26a0 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt @@ -232,9 +232,9 @@ mysqli_stmt_get_result - data types // Note: you cannot insert any blob values this way. But you can check the API at least partly this way // Extra BLOB tests are in mysqli_stmt_send_long() - func_mysqli_stmt_get_result($link, $engine, "b", "BLOB", b"", 1580); + func_mysqli_stmt_get_result($link, $engine, "b", "BLOB", "", 1580); func_mysqli_stmt_get_result($link, $engine, "b", "TEXT", "", 1600, 'string'); - func_mysqli_stmt_get_result($link, $engine, "b", "MEDIUMBLOB", b"", 1620); + func_mysqli_stmt_get_result($link, $engine, "b", "MEDIUMBLOB", "", 1620); func_mysqli_stmt_get_result($link, $engine, "b", "MEDIUMTEXT", "", 1640, 'string'); /* Is this one related? http://bugs.php.net/bug.php?id=35759 */ diff --git a/ext/pcntl/tests/pcntl_exec_2.phpt b/ext/pcntl/tests/pcntl_exec_2.phpt index e18527dba0..95214bc55b 100644 --- a/ext/pcntl/tests/pcntl_exec_2.phpt +++ b/ext/pcntl/tests/pcntl_exec_2.phpt @@ -15,9 +15,9 @@ if (getenv("PCNTL_EXEC_TEST_IS_CHILD")) { } echo "ok\n"; pcntl_exec(getenv("TEST_PHP_EXECUTABLE"), array('-n', __FILE__), array( - b"PCNTL_EXEC_TEST_IS_CHILD" => b"1", - b"FOO" => b"BAR", - 1 => b"long") + "PCNTL_EXEC_TEST_IS_CHILD" => "1", + "FOO" => "BAR", + 1 => "long") ); echo "nok\n"; diff --git a/ext/pcre/tests/invalid_utf8_offset.phpt b/ext/pcre/tests/invalid_utf8_offset.phpt index 50716ca9b2..2b9e7fa239 100644 --- a/ext/pcre/tests/invalid_utf8_offset.phpt +++ b/ext/pcre/tests/invalid_utf8_offset.phpt @@ -9,13 +9,13 @@ if (@preg_match('/./u', '') === false) { --FILE-- <?php -$string = b"\xc3\xa9 uma string utf8 bem formada"; +$string = "\xc3\xa9 uma string utf8 bem formada"; -var_dump(preg_match(b'~.*~u', $string, $m, 0, 1)); +var_dump(preg_match('~.*~u', $string, $m, 0, 1)); var_dump($m); var_dump(preg_last_error() == PREG_BAD_UTF8_OFFSET_ERROR); -var_dump(preg_match(b'~.*~u', $string, $m, 0, 2)); +var_dump(preg_match('~.*~u', $string, $m, 0, 2)); var_dump($m); var_dump(preg_last_error() == PREG_NO_ERROR); diff --git a/ext/pdo_mysql/tests/pdo_mysql_exec_load_data.phpt b/ext/pdo_mysql/tests/pdo_mysql_exec_load_data.phpt index ebf22ef61b..80b7c2bbcd 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_exec_load_data.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_exec_load_data.phpt @@ -66,8 +66,8 @@ if (($tmp[1] !== 'localhost') && ($tmp[1] !== '127.0.0.1')) } $fp = fopen($filename, "w"); - fwrite($fp, b"1;foo\n"); - fwrite($fp, b"2;bar"); + fwrite($fp, "1;foo\n"); + fwrite($fp, "2;bar"); fclose($fp); $sql = sprintf("LOAD DATA LOCAL INFILE %s INTO TABLE test FIELDS TERMINATED BY ';' LINES TERMINATED BY '\n'", $db->quote($filename)); diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_load_data.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_load_data.phpt index 37d9cbdb77..dcf648248f 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_load_data.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_load_data.phpt @@ -68,8 +68,8 @@ if (($tmp[1] !== 'localhost') && ($tmp[1] !== '127.0.0.1')) } $fp = fopen($filename, "w"); - fwrite($fp, b"1;foo\n"); - fwrite($fp, b"2;bar"); + fwrite($fp, "1;foo\n"); + fwrite($fp, "2;bar"); fclose($fp); // This should fail, the PS protocol should not support it. diff --git a/ext/phar/tests/009.phpt b/ext/phar/tests/009.phpt index 61933b3814..7f55f3987d 100644 --- a/ext/phar/tests/009.phpt +++ b/ext/phar/tests/009.phpt @@ -6,7 +6,7 @@ Phar::mapPhar too many manifest entries phar.require_hash=0 --FILE-- <?php -$file = b"<?php +$file = "<?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?>"; $file .= (binary) pack(b'VVnVVV', 500, 500, 0x1000, 0x00000000, 0, 0) . (binary) str_repeat((binary)'A', 500); diff --git a/ext/phar/tests/010.phpt b/ext/phar/tests/010.phpt index d1e2f40c9c..3dce5f8f4c 100644 --- a/ext/phar/tests/010.phpt +++ b/ext/phar/tests/010.phpt @@ -6,13 +6,13 @@ Phar::mapPhar buffer overrun phar.require_hash=0 --FILE-- <?php -$file = b"<?php +$file = "<?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?>"; // this fails because the manifest length does not include the other 10 byte manifest data -$manifest = pack('V', 1) . 'a' . pack('VVVVVV', 0, time(), 0, crc32(b''), 0x00000000, 0); +$manifest = pack('V', 1) . 'a' . pack('VVVVVV', 0, time(), 0, crc32(''), 0x00000000, 0); $file .= pack('VVnVV', strlen($manifest), 1, 0x1000, 0x00000000, 3) . 'hio' . pack('V', 0) . $manifest; file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file); diff --git a/ext/phar/tests/014.phpt b/ext/phar/tests/014.phpt index cb83ea55bd..d08e6550b6 100644 --- a/ext/phar/tests/014.phpt +++ b/ext/phar/tests/014.phpt @@ -12,7 +12,7 @@ $file = "<?php __HALT_COMPILER(); ?>"; // wrong crc32 $files = array(); -$files['a'] = array('cont'=>'a', 'crc32'=>crc32(b'aX')); +$files['a'] = array('cont'=>'a', 'crc32'=>crc32('aX')); include 'files/phar_test.inc'; echo file_get_contents($pname.'/a'); diff --git a/ext/phar/tests/016.phpt b/ext/phar/tests/016.phpt index 3288e8eca4..302d06d3cb 100644 --- a/ext/phar/tests/016.phpt +++ b/ext/phar/tests/016.phpt @@ -9,14 +9,14 @@ phar.require_hash=0 <?php $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$file = b"<?php __HALT_COMPILER(); ?>"; +$file = "<?php __HALT_COMPILER(); ?>"; // file length is too short $files = array(); // "hi" gzdeflated -$files['a'] = array('cont'=>b'a','comp'=> (binary)pack('H*', 'cbc80400'),'flags'=>0x00001000, 'ulen' => 1, 'clen' => 4); +$files['a'] = array('cont'=>'a','comp'=> pack('H*', 'cbc80400'),'flags'=>0x00001000, 'ulen' => 1, 'clen' => 4); $files['b'] = $files['a']; -$files['c'] = array('cont'=>b'*'); +$files['c'] = array('cont'=>'*'); $files['d'] = $files['a']; include 'files/phar_test.inc'; diff --git a/ext/phar/tests/019.phpt b/ext/phar/tests/019.phpt index 0a5a7d7b57..860edad236 100644 --- a/ext/phar/tests/019.phpt +++ b/ext/phar/tests/019.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$file = b"<?php +$file = "<?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?>"; diff --git a/ext/phar/tests/020.phpt b/ext/phar/tests/020.phpt index 7d01681b6f..289fc39c95 100644 --- a/ext/phar/tests/020.phpt +++ b/ext/phar/tests/020.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 <?php $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$file = b"<?php +$file = "<?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?>"; diff --git a/ext/phar/tests/021.phpt b/ext/phar/tests/021.phpt index bfd6576952..3e3278b9f8 100644 --- a/ext/phar/tests/021.phpt +++ b/ext/phar/tests/021.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 <?php $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$file = b"<?php +$file = "<?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?>"; diff --git a/ext/phar/tests/033a.phpt b/ext/phar/tests/033a.phpt index 4586f35e3f..e8725bdda6 100644 --- a/ext/phar/tests/033a.phpt +++ b/ext/phar/tests/033a.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 <?php $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php'; $pname = 'phar://hio'; -$file = b'<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>'; +$file = '<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>'; $files = array(); $files['a.php'] = '<?php echo "This is a\n"; include "'.$pname.'/b.php"; ?>'; diff --git a/ext/phar/tests/cache_list/files/frontcontroller12.phar b/ext/phar/tests/cache_list/files/frontcontroller12.phar Binary files differindex 1cf3629282..beebf034cb 100644 --- a/ext/phar/tests/cache_list/files/frontcontroller12.phar +++ b/ext/phar/tests/cache_list/files/frontcontroller12.phar diff --git a/ext/phar/tests/cache_list/files/frontcontroller12.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller12.phar.inc index f1e4645e2f..ba17df37e1 100644 --- a/ext/phar/tests/cache_list/files/frontcontroller12.phar.inc +++ b/ext/phar/tests/cache_list/files/frontcontroller12.phar.inc @@ -3,13 +3,13 @@ $a = new Phar(dirname(__FILE__) . '/frontcontroller12.phar'); $a['index.php'] = '<?php var_dump($_SERVER["PHP_SELF"]); -var_dump($_SERVER[b"SCRIPT_NAME"]); -var_dump($_SERVER[b"SCRIPT_FILENAME"]); -var_dump($_SERVER[b"REQUEST_URI"]); -var_dump($_SERVER[b"PHAR_PHP_SELF"]); -var_dump($_SERVER[b"PHAR_SCRIPT_NAME"]); -var_dump($_SERVER[b"PHAR_SCRIPT_FILENAME"]); -var_dump($_SERVER[b"PHAR_REQUEST_URI"]); +var_dump($_SERVER["SCRIPT_NAME"]); +var_dump($_SERVER["SCRIPT_FILENAME"]); +var_dump($_SERVER["REQUEST_URI"]); +var_dump($_SERVER["PHAR_PHP_SELF"]); +var_dump($_SERVER["PHAR_SCRIPT_NAME"]); +var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]); +var_dump($_SERVER["PHAR_REQUEST_URI"]); '; $a->setStub('<?php Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI")); diff --git a/ext/phar/tests/cache_list/files/frontcontroller14.phar b/ext/phar/tests/cache_list/files/frontcontroller14.phar Binary files differindex ebc3e9b408..31b4cb92d6 100644 --- a/ext/phar/tests/cache_list/files/frontcontroller14.phar +++ b/ext/phar/tests/cache_list/files/frontcontroller14.phar diff --git a/ext/phar/tests/cache_list/files/frontcontroller14.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller14.phar.inc index 23104a642f..d0ebd9a45a 100644 --- a/ext/phar/tests/cache_list/files/frontcontroller14.phar.inc +++ b/ext/phar/tests/cache_list/files/frontcontroller14.phar.inc @@ -2,8 +2,8 @@ @unlink(dirname(__FILE__) . '/frontcontroller14.phar'); $a = new Phar(dirname(__FILE__) . '/frontcontroller14.phar'); $a['html/index.php'] = '<?php -var_dump($_SERVER[b"PATH_INFO"]); -var_dump($_SERVER[b"PATH_TRANSLATED"]); +var_dump($_SERVER["PATH_INFO"]); +var_dump($_SERVER["PATH_TRANSLATED"]); '; $a->setStub('<?php function s($a) diff --git a/ext/phar/tests/cache_list/files/frontcontroller3.phar b/ext/phar/tests/cache_list/files/frontcontroller3.phar Binary files differindex 35a23eadff..04a7ae7b95 100644 --- a/ext/phar/tests/cache_list/files/frontcontroller3.phar +++ b/ext/phar/tests/cache_list/files/frontcontroller3.phar diff --git a/ext/phar/tests/cache_list/files/frontcontroller3.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller3.phar.inc index 6f9126ff44..2759d9ee45 100644 --- a/ext/phar/tests/cache_list/files/frontcontroller3.phar.inc +++ b/ext/phar/tests/cache_list/files/frontcontroller3.phar.inc @@ -7,7 +7,7 @@ $a['a.phps'] = '<?php function hio(){}'; $a->setStub('<?php function s($a) { - static $b = array(b"/hi" => "a.phps"); + static $b = array("/hi" => "a.phps"); if (isset($b[$a])) return $b[$a]; return $a; } diff --git a/ext/phar/tests/cache_list/files/frontcontroller4.phar b/ext/phar/tests/cache_list/files/frontcontroller4.phar Binary files differindex 8359461810..439f74479d 100644 --- a/ext/phar/tests/cache_list/files/frontcontroller4.phar +++ b/ext/phar/tests/cache_list/files/frontcontroller4.phar diff --git a/ext/phar/tests/cache_list/files/frontcontroller4.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller4.phar.inc index daf807e419..5c6a43f954 100644 --- a/ext/phar/tests/cache_list/files/frontcontroller4.phar.inc +++ b/ext/phar/tests/cache_list/files/frontcontroller4.phar.inc @@ -7,7 +7,7 @@ $a['a.phps'] = '<?php function hio(){}'; $a->setStub('<?php function s($a) { - static $b = array(b"/hi" => false); + static $b = array("/hi" => false); if (isset($b[$a])) return $b[$a]; return $a; } diff --git a/ext/phar/tests/cache_list/files/frontcontroller8.phar b/ext/phar/tests/cache_list/files/frontcontroller8.phar Binary files differindex c9c0e409ec..fe133dfba1 100644 --- a/ext/phar/tests/cache_list/files/frontcontroller8.phar +++ b/ext/phar/tests/cache_list/files/frontcontroller8.phar diff --git a/ext/phar/tests/cache_list/files/frontcontroller8.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller8.phar.inc index 8629f0890d..1dfb654a03 100644 --- a/ext/phar/tests/cache_list/files/frontcontroller8.phar.inc +++ b/ext/phar/tests/cache_list/files/frontcontroller8.phar.inc @@ -2,7 +2,7 @@ @unlink(dirname(__FILE__) . '/frontcontroller8.phar'); $a = new Phar(dirname(__FILE__) . '/frontcontroller8.phar'); $a['a.phps'] = 'hio1'; -$a['a1.phps'] = '<?php var_dump($_SERVER[b"REQUEST_URI"], $_SERVER[b"PATH_INFO"]);'; +$a['a1.phps'] = '<?php var_dump($_SERVER["REQUEST_URI"], $_SERVER["PATH_INFO"]);'; $a['a.jpg'] = 'hio2'; $a['a.php'] = '<?php function hio(){}'; $a['fronk.gronk'] = 'hio3'; diff --git a/ext/phar/tests/cache_list/files/write24.phar b/ext/phar/tests/cache_list/files/write24.phar Binary files differindex 36972f3663..50759703e4 100644 --- a/ext/phar/tests/cache_list/files/write24.phar +++ b/ext/phar/tests/cache_list/files/write24.phar diff --git a/ext/phar/tests/cache_list/files/write24.phar.inc b/ext/phar/tests/cache_list/files/write24.phar.inc index 216f7c46d0..ac96731960 100644 --- a/ext/phar/tests/cache_list/files/write24.phar.inc +++ b/ext/phar/tests/cache_list/files/write24.phar.inc @@ -8,7 +8,7 @@ $phar->setStub('<?php $p = new Phar(__FILE__); var_dump(isset($p["newname"])); $fp = fopen("phar://" . __FILE__ . "/newname", "w"); -fwrite($fp, b"hi"); +fwrite($fp, "hi"); fclose($fp); var_dump(isset($p["newname"])); echo "ok\n"; diff --git a/ext/phar/tests/create_new_and_modify.phpt b/ext/phar/tests/create_new_and_modify.phpt index c924d74c68..940e3e9776 100644 --- a/ext/phar/tests/create_new_and_modify.phpt +++ b/ext/phar/tests/create_new_and_modify.phpt @@ -35,9 +35,9 @@ file_put_contents($pname .'/b.php', "another!\n"); $phar = new Phar($fname); $sig2 = $phar->getSignature(); -var_dump($sig1[b'hash']); -var_dump($sig2[b'hash']); -var_dump($sig1[b'hash'] != $sig2[b'hash']); +var_dump($sig1['hash']); +var_dump($sig2['hash']); +var_dump($sig1['hash'] != $sig2['hash']); include $pname . '/a.php'; include $pname . '/b.php'; diff --git a/ext/phar/tests/files/frontcontroller12.phar b/ext/phar/tests/files/frontcontroller12.phar Binary files differindex 315c2901e0..2a654baf7f 100644 --- a/ext/phar/tests/files/frontcontroller12.phar +++ b/ext/phar/tests/files/frontcontroller12.phar diff --git a/ext/phar/tests/files/frontcontroller12.phar.inc b/ext/phar/tests/files/frontcontroller12.phar.inc index f1e4645e2f..ba17df37e1 100644 --- a/ext/phar/tests/files/frontcontroller12.phar.inc +++ b/ext/phar/tests/files/frontcontroller12.phar.inc @@ -3,13 +3,13 @@ $a = new Phar(dirname(__FILE__) . '/frontcontroller12.phar'); $a['index.php'] = '<?php var_dump($_SERVER["PHP_SELF"]); -var_dump($_SERVER[b"SCRIPT_NAME"]); -var_dump($_SERVER[b"SCRIPT_FILENAME"]); -var_dump($_SERVER[b"REQUEST_URI"]); -var_dump($_SERVER[b"PHAR_PHP_SELF"]); -var_dump($_SERVER[b"PHAR_SCRIPT_NAME"]); -var_dump($_SERVER[b"PHAR_SCRIPT_FILENAME"]); -var_dump($_SERVER[b"PHAR_REQUEST_URI"]); +var_dump($_SERVER["SCRIPT_NAME"]); +var_dump($_SERVER["SCRIPT_FILENAME"]); +var_dump($_SERVER["REQUEST_URI"]); +var_dump($_SERVER["PHAR_PHP_SELF"]); +var_dump($_SERVER["PHAR_SCRIPT_NAME"]); +var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]); +var_dump($_SERVER["PHAR_REQUEST_URI"]); '; $a->setStub('<?php Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI")); diff --git a/ext/phar/tests/files/frontcontroller14.phar b/ext/phar/tests/files/frontcontroller14.phar Binary files differindex 2bca006653..ecfc5d7864 100644 --- a/ext/phar/tests/files/frontcontroller14.phar +++ b/ext/phar/tests/files/frontcontroller14.phar diff --git a/ext/phar/tests/files/frontcontroller14.phar.inc b/ext/phar/tests/files/frontcontroller14.phar.inc index 23104a642f..d0ebd9a45a 100644 --- a/ext/phar/tests/files/frontcontroller14.phar.inc +++ b/ext/phar/tests/files/frontcontroller14.phar.inc @@ -2,8 +2,8 @@ @unlink(dirname(__FILE__) . '/frontcontroller14.phar'); $a = new Phar(dirname(__FILE__) . '/frontcontroller14.phar'); $a['html/index.php'] = '<?php -var_dump($_SERVER[b"PATH_INFO"]); -var_dump($_SERVER[b"PATH_TRANSLATED"]); +var_dump($_SERVER["PATH_INFO"]); +var_dump($_SERVER["PATH_TRANSLATED"]); '; $a->setStub('<?php function s($a) diff --git a/ext/phar/tests/files/frontcontroller3.phar b/ext/phar/tests/files/frontcontroller3.phar Binary files differindex 5c5ff9cae7..4859fdd10f 100644 --- a/ext/phar/tests/files/frontcontroller3.phar +++ b/ext/phar/tests/files/frontcontroller3.phar diff --git a/ext/phar/tests/files/frontcontroller3.phar.inc b/ext/phar/tests/files/frontcontroller3.phar.inc index c2095947bd..2759d9ee45 100644 --- a/ext/phar/tests/files/frontcontroller3.phar.inc +++ b/ext/phar/tests/files/frontcontroller3.phar.inc @@ -7,7 +7,7 @@ $a['a.phps'] = '<?php function hio(){}'; $a->setStub('<?php function s($a) { - static $b = array(b"/hi" => b"a.phps"); + static $b = array("/hi" => "a.phps"); if (isset($b[$a])) return $b[$a]; return $a; } diff --git a/ext/phar/tests/files/frontcontroller4.phar b/ext/phar/tests/files/frontcontroller4.phar Binary files differindex 004d1ffd16..3d4783f64b 100644 --- a/ext/phar/tests/files/frontcontroller4.phar +++ b/ext/phar/tests/files/frontcontroller4.phar diff --git a/ext/phar/tests/files/frontcontroller4.phar.inc b/ext/phar/tests/files/frontcontroller4.phar.inc index daf807e419..5c6a43f954 100644 --- a/ext/phar/tests/files/frontcontroller4.phar.inc +++ b/ext/phar/tests/files/frontcontroller4.phar.inc @@ -7,7 +7,7 @@ $a['a.phps'] = '<?php function hio(){}'; $a->setStub('<?php function s($a) { - static $b = array(b"/hi" => false); + static $b = array("/hi" => false); if (isset($b[$a])) return $b[$a]; return $a; } diff --git a/ext/phar/tests/files/frontcontroller8.phar b/ext/phar/tests/files/frontcontroller8.phar Binary files differindex 27280a3270..295143edb9 100644 --- a/ext/phar/tests/files/frontcontroller8.phar +++ b/ext/phar/tests/files/frontcontroller8.phar diff --git a/ext/phar/tests/files/frontcontroller8.phar.inc b/ext/phar/tests/files/frontcontroller8.phar.inc index 8629f0890d..1dfb654a03 100644 --- a/ext/phar/tests/files/frontcontroller8.phar.inc +++ b/ext/phar/tests/files/frontcontroller8.phar.inc @@ -2,7 +2,7 @@ @unlink(dirname(__FILE__) . '/frontcontroller8.phar'); $a = new Phar(dirname(__FILE__) . '/frontcontroller8.phar'); $a['a.phps'] = 'hio1'; -$a['a1.phps'] = '<?php var_dump($_SERVER[b"REQUEST_URI"], $_SERVER[b"PATH_INFO"]);'; +$a['a1.phps'] = '<?php var_dump($_SERVER["REQUEST_URI"], $_SERVER["PATH_INFO"]);'; $a['a.jpg'] = 'hio2'; $a['a.php'] = '<?php function hio(){}'; $a['fronk.gronk'] = 'hio3'; diff --git a/ext/phar/tests/fopen_edgecases2.phpt b/ext/phar/tests/fopen_edgecases2.phpt index d55c97d228..4510fbd801 100644 --- a/ext/phar/tests/fopen_edgecases2.phpt +++ b/ext/phar/tests/fopen_edgecases2.phpt @@ -13,14 +13,14 @@ $pname = 'phar://' . $fname; fopen(array(), 'r'); chdir(dirname(__FILE__)); -file_put_contents($fname, b"blah\n"); -file_put_contents("foob", b"test\n"); +file_put_contents($fname, "blah\n"); +file_put_contents("foob", "test\n"); $a = fopen($fname, 'rb'); echo fread($a, 1000); fclose($a); unlink($fname); mkdir($pname . '/oops'); -file_put_contents($pname . '/foo/hi', b'<?php +file_put_contents($pname . '/foo/hi', '<?php $context = stream_context_create(); $a = fopen("foob", "rb", false, $context); echo fread($a, 1000); diff --git a/ext/phar/tests/open_for_write_existing.phpt b/ext/phar/tests/open_for_write_existing.phpt index 9d27cd84ec..2a3ec8b824 100644 --- a/ext/phar/tests/open_for_write_existing.phpt +++ b/ext/phar/tests/open_for_write_existing.phpt @@ -18,7 +18,7 @@ $files['b/c.php'] = '<?php echo "This is b/c\n"; ?>'; include 'files/phar_test.inc'; $fp = fopen($pname . '/b/c.php', 'wb'); -fwrite($fp, b'extra'); +fwrite($fp, 'extra'); fclose($fp); include $pname . '/b/c.php'; ?> diff --git a/ext/phar/tests/open_for_write_newfile.phpt b/ext/phar/tests/open_for_write_newfile.phpt index 735e3b4dd7..13114072da 100644 --- a/ext/phar/tests/open_for_write_newfile.phpt +++ b/ext/phar/tests/open_for_write_newfile.phpt @@ -18,7 +18,7 @@ $files['b/c.php'] = '<?php echo "This is b/c\n"; ?>'; include 'files/phar_test.inc'; $fp = fopen($pname . '/b/new.php', 'wb'); -fwrite($fp, b'extra'); +fwrite($fp, 'extra'); fclose($fp); include $pname . '/b/c.php'; include $pname . '/b/new.php'; diff --git a/ext/phar/tests/phar_ctx_001.phpt b/ext/phar/tests/phar_ctx_001.phpt index 72edc5a99e..13b4d6a781 100644 --- a/ext/phar/tests/phar_ctx_001.phpt +++ b/ext/phar/tests/phar_ctx_001.phpt @@ -28,12 +28,12 @@ var_dump($phar['b']->isCompressed()); var_dump(file_get_contents($pname . '/c')); var_dump($phar['c']->isCompressed()); -$context = stream_context_create(array('phar'=> array('compress'=>Phar::GZ, 'metadata' => array(2, b'hi' => 3)))); +$context = stream_context_create(array('phar'=> array('compress'=>Phar::GZ, 'metadata' => array(2, 'hi' => 3)))); $context2 = stream_context_create(array('phar' => array('metadata' => array(4)))); -file_put_contents($pname . '/a', b'new a', 0); // no compression -file_put_contents($pname . '/b', b'new b', 0, $context); -file_put_contents($pname . '/d', b'new d', 0, $context2); +file_put_contents($pname . '/a', 'new a', 0); // no compression +file_put_contents($pname . '/b', 'new b', 0, $context); +file_put_contents($pname . '/d', 'new d', 0, $context2); $phar = new Phar($fname); var_dump(file_get_contents($pname . '/a')); diff --git a/ext/phar/tests/phar_oo_compressed_002.phpt b/ext/phar/tests/phar_oo_compressed_002.phpt index d4ec5cb720..d03d6f1a98 100644 --- a/ext/phar/tests/phar_oo_compressed_002.phpt +++ b/ext/phar/tests/phar_oo_compressed_002.phpt @@ -30,10 +30,10 @@ var_dump($phar['c']->isCompressed()); $context = stream_context_create(array('phar'=>array('compress'=>Phar::GZ))); -file_put_contents($pname . '/b', b'new b'); -file_put_contents($pname . '/c', b'new c', 0, $context); -file_put_contents($pname . '/d', b'new d'); -file_put_contents($pname . '/e', b'new e', 0, $context); +file_put_contents($pname . '/b', 'new b'); +file_put_contents($pname . '/c', 'new c', 0, $context); +file_put_contents($pname . '/d', 'new d'); +file_put_contents($pname . '/e', 'new e', 0, $context); $phar = new Phar($fname); var_dump(file_get_contents($pname . '/a')); diff --git a/ext/phar/tests/phar_oo_compressed_002b.phpt b/ext/phar/tests/phar_oo_compressed_002b.phpt index d7213fdbaa..0e167012b7 100644 --- a/ext/phar/tests/phar_oo_compressed_002b.phpt +++ b/ext/phar/tests/phar_oo_compressed_002b.phpt @@ -30,10 +30,10 @@ var_dump($phar['c']->isCompressed()); $context = stream_context_create(array('phar'=>array('compress'=>Phar::BZ2))); -file_put_contents($pname . '/b', b'new b'); -file_put_contents($pname . '/c', b'new c', 0, $context); -file_put_contents($pname . '/d', b'new d'); -file_put_contents($pname . '/e', b'new e', 0, $context); +file_put_contents($pname . '/b', 'new b'); +file_put_contents($pname . '/c', 'new c', 0, $context); +file_put_contents($pname . '/d', 'new d'); +file_put_contents($pname . '/e', 'new e', 0, $context); $phar = new Phar($fname); var_dump(file_get_contents($pname . '/a')); diff --git a/ext/phar/tests/phar_stub.phpt b/ext/phar/tests/phar_stub.phpt index 832dc409bd..ed306816e2 100644 --- a/ext/phar/tests/phar_stub.phpt +++ b/ext/phar/tests/phar_stub.phpt @@ -33,7 +33,7 @@ echo fread($fp, strlen($file)) . "\n"; fclose($fp); $fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phartmp.php'; -$file = b'<?php echo "third stub\n"; __HALT_COMPILER(); ?>'; +$file = '<?php echo "third stub\n"; __HALT_COMPILER(); ?>'; $fp = fopen($fname2, 'wb'); fwrite($fp, $file); fclose($fp); @@ -48,7 +48,7 @@ echo fread($fp, strlen($file)) . "\n"; fclose($fp); $fp = fopen($fname2, 'ab'); -fwrite($fp, b'booya'); +fwrite($fp, 'booya'); fclose($fp); echo file_get_contents($fname2) . "\n"; diff --git a/ext/phar/tests/phar_stub_error.phpt b/ext/phar/tests/phar_stub_error.phpt index bb5d63bcf7..99f313bc2f 100644 --- a/ext/phar/tests/phar_stub_error.phpt +++ b/ext/phar/tests/phar_stub_error.phpt @@ -9,7 +9,7 @@ phar.readonly=0 <?php $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$stub = b'<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; +$stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; $file = $stub; $files = array(); diff --git a/ext/phar/tests/phar_stub_write.phpt b/ext/phar/tests/phar_stub_write.phpt index ecdb3b9b63..9e5d6d5635 100644 --- a/ext/phar/tests/phar_stub_write.phpt +++ b/ext/phar/tests/phar_stub_write.phpt @@ -9,7 +9,7 @@ phar.readonly=0 <?php $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$stub = b'<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; +$stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; $file = $stub; $files = array(); diff --git a/ext/phar/tests/phar_stub_write_file.phpt b/ext/phar/tests/phar_stub_write_file.phpt index e4c8676816..c5a0a1eba9 100644 --- a/ext/phar/tests/phar_stub_write_file.phpt +++ b/ext/phar/tests/phar_stub_write_file.phpt @@ -10,7 +10,7 @@ allow_url_fopen=1 <?php $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$stub = b'<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; +$stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; $file = $stub; $files = array(); diff --git a/ext/phar/tests/refcount1.phpt b/ext/phar/tests/refcount1.phpt index 67ba93641b..3c717eb37d 100644 --- a/ext/phar/tests/refcount1.phpt +++ b/ext/phar/tests/refcount1.phpt @@ -10,7 +10,7 @@ phar.require_hash=0 <?php $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$file = b"<?php __HALT_COMPILER(); ?>"; +$file = "<?php __HALT_COMPILER(); ?>"; $files = array(); $files['a.php'] = '<?php echo "This is a\n"; ?>'; @@ -19,7 +19,7 @@ $files['b/c.php'] = '<?php echo "This is b/c\n"; ?>'; include 'files/phar_test.inc'; $fp = fopen($pname . '/b/c.php', 'wb'); -fwrite($fp, b"extra"); +fwrite($fp, "extra"); fclose($fp); echo "===CLOSE===\n"; $p = new Phar($fname); diff --git a/ext/phar/tests/rmdir.phpt b/ext/phar/tests/rmdir.phpt index 726e2cfbac..ef061bf7c2 100644 --- a/ext/phar/tests/rmdir.phpt +++ b/ext/phar/tests/rmdir.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 <?php $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$file = b"<?php +$file = "<?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?>"; diff --git a/ext/phar/tests/tar/files/frontcontroller12.phar.inc b/ext/phar/tests/tar/files/frontcontroller12.phar.inc index 0a9422a299..693ef0aa01 100644 --- a/ext/phar/tests/tar/files/frontcontroller12.phar.inc +++ b/ext/phar/tests/tar/files/frontcontroller12.phar.inc @@ -3,13 +3,13 @@ $a = new Phar(dirname(__FILE__) . '/frontcontroller12.phar.tar'); $a['index.php'] = '<?php var_dump($_SERVER["PHP_SELF"]); -var_dump($_SERVER[b"SCRIPT_NAME"]); -var_dump($_SERVER[b"SCRIPT_FILENAME"]); -var_dump($_SERVER[b"REQUEST_URI"]); -var_dump($_SERVER[b"PHAR_PHP_SELF"]); -var_dump($_SERVER[b"PHAR_SCRIPT_NAME"]); -var_dump($_SERVER[b"PHAR_SCRIPT_FILENAME"]); -var_dump($_SERVER[b"PHAR_REQUEST_URI"]); +var_dump($_SERVER["SCRIPT_NAME"]); +var_dump($_SERVER["SCRIPT_FILENAME"]); +var_dump($_SERVER["REQUEST_URI"]); +var_dump($_SERVER["PHAR_PHP_SELF"]); +var_dump($_SERVER["PHAR_SCRIPT_NAME"]); +var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]); +var_dump($_SERVER["PHAR_REQUEST_URI"]); '; $a->setStub('<?php Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI")); diff --git a/ext/phar/tests/tar/files/frontcontroller12.phar.tar b/ext/phar/tests/tar/files/frontcontroller12.phar.tar Binary files differindex e945e49bd4..2d31581373 100644 --- a/ext/phar/tests/tar/files/frontcontroller12.phar.tar +++ b/ext/phar/tests/tar/files/frontcontroller12.phar.tar diff --git a/ext/phar/tests/tar/files/frontcontroller3.phar.inc b/ext/phar/tests/tar/files/frontcontroller3.phar.inc index 800f65e819..9729d0065b 100644 --- a/ext/phar/tests/tar/files/frontcontroller3.phar.inc +++ b/ext/phar/tests/tar/files/frontcontroller3.phar.inc @@ -7,7 +7,7 @@ $a['a.phps'] = '<?php function hio(){}'; $a->setStub('<?php function s($a) { - static $b = array(b"/hi" => b"a.phps"); + static $b = array("/hi" => "a.phps"); if (isset($b[$a])) return $b[$a]; return $a; } diff --git a/ext/phar/tests/tar/files/frontcontroller3.phar.tar b/ext/phar/tests/tar/files/frontcontroller3.phar.tar Binary files differindex 16853bd10f..81a89b23c3 100644 --- a/ext/phar/tests/tar/files/frontcontroller3.phar.tar +++ b/ext/phar/tests/tar/files/frontcontroller3.phar.tar diff --git a/ext/phar/tests/tar/files/frontcontroller4.phar.inc b/ext/phar/tests/tar/files/frontcontroller4.phar.inc index bfb9b4104c..eb1d56f0d4 100644 --- a/ext/phar/tests/tar/files/frontcontroller4.phar.inc +++ b/ext/phar/tests/tar/files/frontcontroller4.phar.inc @@ -7,7 +7,7 @@ $a['a.phps'] = '<?php function hio(){}'; $a->setStub('<?php function s($a) { - static $b = array(b"/hi" => false); + static $b = array("/hi" => false); if (isset($b[$a])) return $b[$a]; return $a; } diff --git a/ext/phar/tests/tar/files/frontcontroller4.phar.tar b/ext/phar/tests/tar/files/frontcontroller4.phar.tar Binary files differindex 5a1d4ee10c..04787536e8 100644 --- a/ext/phar/tests/tar/files/frontcontroller4.phar.tar +++ b/ext/phar/tests/tar/files/frontcontroller4.phar.tar diff --git a/ext/phar/tests/tar/open_for_write_existing.phpt b/ext/phar/tests/tar/open_for_write_existing.phpt index a034b8fc3c..641e5ce21d 100644 --- a/ext/phar/tests/tar/open_for_write_existing.phpt +++ b/ext/phar/tests/tar/open_for_write_existing.phpt @@ -27,7 +27,7 @@ foreach ($files as $n => $file) { $phar->stopBuffering(); $fp = fopen($alias . '/b/c.php', 'wb'); -fwrite($fp, b'extra'); +fwrite($fp, 'extra'); fclose($fp); include $alias . '/b/c.php'; diff --git a/ext/phar/tests/tar/open_for_write_existing_b.phpt b/ext/phar/tests/tar/open_for_write_existing_b.phpt index 8d80847733..752192835d 100644 --- a/ext/phar/tests/tar/open_for_write_existing_b.phpt +++ b/ext/phar/tests/tar/open_for_write_existing_b.phpt @@ -36,7 +36,7 @@ function err_handler($errno, $errstr, $errfile, $errline) { set_error_handler("err_handler", E_RECOVERABLE_ERROR); $fp = fopen($alias . '/b/c.php', 'wb'); -fwrite($fp, b'extra'); +fwrite($fp, 'extra'); fclose($fp); include $alias . '/b/c.php'; diff --git a/ext/phar/tests/tar/open_for_write_newfile.phpt b/ext/phar/tests/tar/open_for_write_newfile.phpt index e2efb3486a..31e9d4a7e9 100644 --- a/ext/phar/tests/tar/open_for_write_newfile.phpt +++ b/ext/phar/tests/tar/open_for_write_newfile.phpt @@ -27,7 +27,7 @@ foreach ($files as $n => $file) { $phar->stopBuffering(); $fp = fopen($alias . '/b/new.php', 'wb'); -fwrite($fp, b'extra'); +fwrite($fp, 'extra'); fclose($fp); include $alias . '/b/c.php'; diff --git a/ext/phar/tests/tar/phar_stub.phpt b/ext/phar/tests/tar/phar_stub.phpt index 5a61eae4a2..e0d728f6f8 100644 --- a/ext/phar/tests/tar/phar_stub.phpt +++ b/ext/phar/tests/tar/phar_stub.phpt @@ -22,14 +22,14 @@ copy($fname2, $fname); $phar = new Phar($fname); echo $phar->getStub(); -$file = b'<?php echo "second stub\n"; __HALT_COMPILER(); ?>'; +$file = '<?php echo "second stub\n"; __HALT_COMPILER(); ?>'; //// 2 $phar->setStub($file); echo $phar->getStub(); $fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phartmp.php'; -$file = b'<?php echo "third stub\n"; __HALT_COMPILER(); ?>'; +$file = '<?php echo "third stub\n"; __HALT_COMPILER(); ?>'; $fp = fopen($fname3, 'wb'); fwrite($fp, $file); fclose($fp); @@ -42,7 +42,7 @@ fclose($fp); echo $phar->getStub(); $fp = fopen($fname3, 'ab'); -fwrite($fp, b'booya'); +fwrite($fp, 'booya'); fclose($fp); echo file_get_contents($fname3) . "\n"; diff --git a/ext/phar/tests/tar/refcount1.phpt b/ext/phar/tests/tar/refcount1.phpt index 4d2c34e51e..9d1cb5e415 100644 --- a/ext/phar/tests/tar/refcount1.phpt +++ b/ext/phar/tests/tar/refcount1.phpt @@ -30,7 +30,7 @@ foreach ($files as $n => $file) { $tar->close(); $fp = fopen($alias . '/b/c.php', 'wb'); -fwrite($fp, b"extra"); +fwrite($fp, "extra"); fclose($fp); echo "===CLOSE===\n"; $phar = new Phar($fname); diff --git a/ext/phar/tests/zip/files/frontcontroller12.phar.inc b/ext/phar/tests/zip/files/frontcontroller12.phar.inc index c5f38ffd19..77c4a1dd0e 100644 --- a/ext/phar/tests/zip/files/frontcontroller12.phar.inc +++ b/ext/phar/tests/zip/files/frontcontroller12.phar.inc @@ -3,13 +3,13 @@ $a = new Phar(dirname(__FILE__) . '/frontcontroller12.phar.zip'); $a['index.php'] = '<?php var_dump($_SERVER["PHP_SELF"]); -var_dump($_SERVER[b"SCRIPT_NAME"]); -var_dump($_SERVER[b"SCRIPT_FILENAME"]); -var_dump($_SERVER[b"REQUEST_URI"]); -var_dump($_SERVER[b"PHAR_PHP_SELF"]); -var_dump($_SERVER[b"PHAR_SCRIPT_NAME"]); -var_dump($_SERVER[b"PHAR_SCRIPT_FILENAME"]); -var_dump($_SERVER[b"PHAR_REQUEST_URI"]); +var_dump($_SERVER["SCRIPT_NAME"]); +var_dump($_SERVER["SCRIPT_FILENAME"]); +var_dump($_SERVER["REQUEST_URI"]); +var_dump($_SERVER["PHAR_PHP_SELF"]); +var_dump($_SERVER["PHAR_SCRIPT_NAME"]); +var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]); +var_dump($_SERVER["PHAR_REQUEST_URI"]); '; $a->setStub('<?php Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI")); diff --git a/ext/phar/tests/zip/files/frontcontroller12.phar.zip b/ext/phar/tests/zip/files/frontcontroller12.phar.zip Binary files differindex ed9be3d00b..41ae5873d6 100644 --- a/ext/phar/tests/zip/files/frontcontroller12.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller12.phar.zip diff --git a/ext/phar/tests/zip/files/frontcontroller3.phar.inc b/ext/phar/tests/zip/files/frontcontroller3.phar.inc index ccd55b73f9..ab28f7b3d0 100644 --- a/ext/phar/tests/zip/files/frontcontroller3.phar.inc +++ b/ext/phar/tests/zip/files/frontcontroller3.phar.inc @@ -7,7 +7,7 @@ $a['a.phps'] = '<?php function hio(){}'; $a->setStub('<?php function s($a) { - static $b = array(b"/hi" => b"a.phps"); + static $b = array("/hi" => "a.phps"); if (isset($b[$a])) return $b[$a]; return $a; } diff --git a/ext/phar/tests/zip/files/frontcontroller3.phar.zip b/ext/phar/tests/zip/files/frontcontroller3.phar.zip Binary files differindex 6f35a8042c..c830fd060e 100644 --- a/ext/phar/tests/zip/files/frontcontroller3.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller3.phar.zip diff --git a/ext/phar/tests/zip/files/frontcontroller4.phar.inc b/ext/phar/tests/zip/files/frontcontroller4.phar.inc index 9f664cf2c6..d78399142e 100644 --- a/ext/phar/tests/zip/files/frontcontroller4.phar.inc +++ b/ext/phar/tests/zip/files/frontcontroller4.phar.inc @@ -7,7 +7,7 @@ $a['a.phps'] = '<?php function hio(){}'; $a->setStub('<?php function s($a) { - static $b = array(b"/hi" => false); + static $b = array("/hi" => false); if (isset($b[$a])) return $b[$a]; return $a; } diff --git a/ext/phar/tests/zip/files/frontcontroller4.phar.zip b/ext/phar/tests/zip/files/frontcontroller4.phar.zip Binary files differindex fb27ccb0b1..d87fbd8406 100644 --- a/ext/phar/tests/zip/files/frontcontroller4.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller4.phar.zip diff --git a/ext/phar/tests/zip/open_for_write_existing.phpt b/ext/phar/tests/zip/open_for_write_existing.phpt index bbf036ce7e..94f85b4e3f 100644 --- a/ext/phar/tests/zip/open_for_write_existing.phpt +++ b/ext/phar/tests/zip/open_for_write_existing.phpt @@ -26,7 +26,7 @@ foreach ($files as $n => $file) { $phar->stopBuffering(); $fp = fopen($alias . '/b/c.php', 'wb'); -fwrite($fp, b'extra'); +fwrite($fp, 'extra'); fclose($fp); include $alias . '/b/c.php'; ?> diff --git a/ext/phar/tests/zip/open_for_write_existing_b.phpt b/ext/phar/tests/zip/open_for_write_existing_b.phpt index 24368ad34b..d8efa51050 100644 --- a/ext/phar/tests/zip/open_for_write_existing_b.phpt +++ b/ext/phar/tests/zip/open_for_write_existing_b.phpt @@ -36,7 +36,7 @@ function err_handler($errno, $errstr, $errfile, $errline) { set_error_handler("err_handler", E_RECOVERABLE_ERROR); $fp = fopen($alias . '/b/c.php', 'wb'); -fwrite($fp, b'extra'); +fwrite($fp, 'extra'); fclose($fp); include $alias . '/b/c.php'; ?> diff --git a/ext/phar/tests/zip/open_for_write_existing_c.phpt b/ext/phar/tests/zip/open_for_write_existing_c.phpt index 3e769cf427..43d862a2f1 100644 --- a/ext/phar/tests/zip/open_for_write_existing_c.phpt +++ b/ext/phar/tests/zip/open_for_write_existing_c.phpt @@ -30,7 +30,7 @@ $phar->stopBuffering(); ini_set('phar.readonly', 1); $fp = fopen($alias . '/b/c.php', 'wb'); -fwrite($fp, b'extra'); +fwrite($fp, 'extra'); fclose($fp); include $alias . '/b/c.php'; ?> diff --git a/ext/phar/tests/zip/open_for_write_newfile.phpt b/ext/phar/tests/zip/open_for_write_newfile.phpt index ffcae0f833..c3782d4fd3 100644 --- a/ext/phar/tests/zip/open_for_write_newfile.phpt +++ b/ext/phar/tests/zip/open_for_write_newfile.phpt @@ -26,7 +26,7 @@ foreach ($files as $n => $file) { $phar->stopBuffering(); $fp = fopen($alias . '/b/new.php', 'wb'); -fwrite($fp, b'extra'); +fwrite($fp, 'extra'); fclose($fp); include $alias . '/b/c.php'; diff --git a/ext/phar/tests/zip/open_for_write_newfile_b.phpt b/ext/phar/tests/zip/open_for_write_newfile_b.phpt index 9303a457e0..6457a029d9 100644 --- a/ext/phar/tests/zip/open_for_write_newfile_b.phpt +++ b/ext/phar/tests/zip/open_for_write_newfile_b.phpt @@ -36,7 +36,7 @@ function err_handler($errno, $errstr, $errfile, $errline) { set_error_handler("err_handler", E_RECOVERABLE_ERROR); $fp = fopen($alias . '/b/new.php', 'wb'); -fwrite($fp, b'extra'); +fwrite($fp, 'extra'); fclose($fp); include $alias . '/b/c.php'; diff --git a/ext/phar/tests/zip/open_for_write_newfile_c.phpt b/ext/phar/tests/zip/open_for_write_newfile_c.phpt index f50a152243..b4a254c358 100644 --- a/ext/phar/tests/zip/open_for_write_newfile_c.phpt +++ b/ext/phar/tests/zip/open_for_write_newfile_c.phpt @@ -30,7 +30,7 @@ $phar->stopBuffering(); ini_set('phar.readonly', 1); $fp = fopen($alias . '/b/new.php', 'wb'); -fwrite($fp, b'extra'); +fwrite($fp, 'extra'); fclose($fp); include $alias . '/b/c.php'; diff --git a/ext/phar/tests/zip/phar_stub.phpt b/ext/phar/tests/zip/phar_stub.phpt index 72c1f17d78..a2a6aa6f2a 100644 --- a/ext/phar/tests/zip/phar_stub.phpt +++ b/ext/phar/tests/zip/phar_stub.phpt @@ -22,14 +22,14 @@ copy($fname2, $fname); $phar = new Phar($fname); echo $phar->getStub(); -$file = b'<?php echo "second stub\n"; __HALT_COMPILER(); ?>'; +$file = '<?php echo "second stub\n"; __HALT_COMPILER(); ?>'; //// 2 $phar->setStub($file); echo $phar->getStub(); $fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phartmp.php'; -$file = b'<?php echo "third stub\n"; __HALT_COMPILER(); ?>'; +$file = '<?php echo "third stub\n"; __HALT_COMPILER(); ?>'; $fp = fopen($fname3, 'wb'); fwrite($fp, $file); fclose($fp); @@ -42,7 +42,7 @@ fclose($fp); echo $phar->getStub(); $fp = fopen($fname3, 'ab'); -fwrite($fp, b'booya'); +fwrite($fp, 'booya'); fclose($fp); echo file_get_contents($fname3) . "\n"; diff --git a/ext/phar/tests/zip/refcount1.phpt b/ext/phar/tests/zip/refcount1.phpt index 9917871148..5b8085bdbc 100644 --- a/ext/phar/tests/zip/refcount1.phpt +++ b/ext/phar/tests/zip/refcount1.phpt @@ -28,7 +28,7 @@ foreach ($files as $n => $file) { $phar->stopBuffering(); $fp = fopen($alias . '/b/c.php', 'wb'); -fwrite($fp, b"extra"); +fwrite($fp, "extra"); fclose($fp); echo "===CLOSE===\n"; $b = fopen($alias . '/b/c.php', 'rb'); diff --git a/ext/simplexml/tests/bug38406.phpt b/ext/simplexml/tests/bug38406.phpt index f439e33e5e..c64b52b847 100644 --- a/ext/simplexml/tests/bug38406.phpt +++ b/ext/simplexml/tests/bug38406.phpt @@ -5,8 +5,8 @@ Bug #38406 (crash when assigning objects to SimpleXML attributes) --FILE-- <?php -$item = new SimpleXMLElement(b'<something />'); -$item->attribute = b'something'; +$item = new SimpleXMLElement('<something />'); +$item->attribute = 'something'; var_dump($item->attribute); $item->otherAttribute = $item->attribute; diff --git a/ext/spl/tests/iterator_006.phpt b/ext/spl/tests/iterator_006.phpt index 54da89cbd7..794eca0da9 100644 --- a/ext/spl/tests/iterator_006.phpt +++ b/ext/spl/tests/iterator_006.phpt @@ -5,7 +5,7 @@ SPL: IteratorIterator and SimpleXMlElement --FILE-- <?php -$root = simplexml_load_string(b'<?xml version="1.0"?> +$root = simplexml_load_string('<?xml version="1.0"?> <root> <child>Hello</child> <child>World</child> diff --git a/ext/spl/tests/multiple_iterator_001.phpt b/ext/spl/tests/multiple_iterator_001.phpt index eb77f79371..be7eeeac7e 100644 --- a/ext/spl/tests/multiple_iterator_001.phpt +++ b/ext/spl/tests/multiple_iterator_001.phpt @@ -68,7 +68,7 @@ try { echo "-- Flags |= MultipleIterator::MIT_KEYS_ASSOC --\n"; $m->attachIterator($iter1, "iter1"); -$m->attachIterator($iter2, b"iter2"); +$m->attachIterator($iter2, "iter2"); $m->attachIterator($iter3, 3); foreach($m as $key => $value) { diff --git a/ext/standard/tests/array/bug14580.phpt b/ext/standard/tests/array/bug14580.phpt index bf0121ad69..8a80bddcb4 100644 --- a/ext/standard/tests/array/bug14580.phpt +++ b/ext/standard/tests/array/bug14580.phpt @@ -2,7 +2,7 @@ Bug #14580 (key() not binary safe) --FILE-- <?php - $arr = array (b"foo\0bar" => b"foo\0bar"); + $arr = array ("foo\0bar" => "foo\0bar"); $key = key($arr); echo strlen($key), ': '; echo urlencode($key), "\n"; diff --git a/ext/standard/tests/array/bug44929.phpt b/ext/standard/tests/array/bug44929.phpt index 9dc85acd1f..efcbcda1cc 100644 --- a/ext/standard/tests/array/bug44929.phpt +++ b/ext/standard/tests/array/bug44929.phpt @@ -2,7 +2,7 @@ Bug #44929 (natsort doesn't handle leading zeros well) --FILE-- <?php -$a = array(b'001',b'008',b'005',b'00011',b'03',b'000014',b'-123',b'0.002',b'00',b'0',b'0_0',b'0-0'); +$a = array('001','008','005','00011','03','000014','-123','0.002','00','0','0_0','0-0'); natsort($a); var_dump($a); ?> diff --git a/ext/standard/tests/bug49244.phpt b/ext/standard/tests/bug49244.phpt index 1ba24fb9b4..60942966a7 100644 --- a/ext/standard/tests/bug49244.phpt +++ b/ext/standard/tests/bug49244.phpt @@ -5,7 +5,7 @@ Bug #49244 (Floating point NaN cause garbage characters) for ($i = 0; $i < 10; $i++) { printf("{%f} %1\$f\n", pow(-1.0, 0.3)); - printf(b"{%f} %1\$f\n", pow(-1.0, 0.3)); + printf("{%f} %1\$f\n", pow(-1.0, 0.3)); } ?> diff --git a/ext/standard/tests/file/005_variation-win32.phpt b/ext/standard/tests/file/005_variation-win32.phpt index 34558758e3..ffcdc33cd6 100644 --- a/ext/standard/tests/file/005_variation-win32.phpt +++ b/ext/standard/tests/file/005_variation-win32.phpt @@ -81,7 +81,7 @@ sleep(2); /* filemtime + 2 & filectime + 2 */ echo "\n-- Checking different times, after writing into the file --\n"; $file_write_handle = fopen($file_name, "w"); -fwrite($file_write_handle, b"Hello, world"); +fwrite($file_write_handle, "Hello, world"); fclose($file_write_handle); stat_fn($file_name); sleep(2); diff --git a/ext/standard/tests/file/007_variation15.phpt b/ext/standard/tests/file/007_variation15.phpt index 1a2d530b65..6174933df5 100644 --- a/ext/standard/tests/file/007_variation15.phpt +++ b/ext/standard/tests/file/007_variation15.phpt @@ -21,7 +21,7 @@ Test fopen and fclose() functions - usage variations - "xt" mode and fclose function */ $file_path = dirname(__FILE__); -$string = b"abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; +$string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation15.tmp"; echo "*** Test fopen() & fclose() functions: with 'xt' mode ***\n"; diff --git a/ext/standard/tests/file/007_variation23.phpt b/ext/standard/tests/file/007_variation23.phpt index 1826296a06..8820dbc7d5 100644 --- a/ext/standard/tests/file/007_variation23.phpt +++ b/ext/standard/tests/file/007_variation23.phpt @@ -21,7 +21,7 @@ Test fopen and fclose() functions - usage variations - "xb" mode and fclose function */ $file_path = dirname(__FILE__); -$string = b"abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; +$string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation23.tmp"; echo "*** Test fopen() & fclose() functions: with 'xb' mode ***\n"; diff --git a/ext/standard/tests/file/007_variation7.phpt b/ext/standard/tests/file/007_variation7.phpt index 06bf9117f3..541e5a0d1d 100644 --- a/ext/standard/tests/file/007_variation7.phpt +++ b/ext/standard/tests/file/007_variation7.phpt @@ -21,7 +21,7 @@ Test fopen and fclose() functions - usage variations - "x" mode and fclose function */ $file_path = dirname(__FILE__); -$string = b"abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; +$string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation7.tmp"; echo "*** Test fopen() & fclose() functions: with 'x' mode ***\n"; diff --git a/ext/standard/tests/file/bug27508.phpt b/ext/standard/tests/file/bug27508.phpt index 188080aa25..361095da5f 100644 --- a/ext/standard/tests/file/bug27508.phpt +++ b/ext/standard/tests/file/bug27508.phpt @@ -56,9 +56,9 @@ if (!$fp) { die("fopen failed"); } -fwrite($fp, b"line1\n"); -fwrite($fp, b"line2\n"); -fwrite($fp, b"line3\n"); +fwrite($fp, "line1\n"); +fwrite($fp, "line2\n"); +fwrite($fp, "line3\n"); debug_zval_dump(feof($fp)); rewind($fp); diff --git a/ext/standard/tests/file/bug38450.phpt b/ext/standard/tests/file/bug38450.phpt index 4a2953ea79..2b59f50750 100644 --- a/ext/standard/tests/file/bug38450.phpt +++ b/ext/standard/tests/file/bug38450.phpt @@ -88,9 +88,9 @@ $myvar = ""; $fp = fopen("var://myvar", "r+"); -fwrite($fp, b"line1\n"); -fwrite($fp, b"line2\n"); -fwrite($fp, b"line3\n"); +fwrite($fp, "line1\n"); +fwrite($fp, "line2\n"); +fwrite($fp, "line3\n"); rewind($fp); while (!feof($fp)) { diff --git a/ext/standard/tests/file/bug38450_1.phpt b/ext/standard/tests/file/bug38450_1.phpt index d0682186f9..07ca7166f3 100644 --- a/ext/standard/tests/file/bug38450_1.phpt +++ b/ext/standard/tests/file/bug38450_1.phpt @@ -88,9 +88,9 @@ $myvar = ""; $fp = fopen("var://myvar", "r+"); -fwrite($fp, b"line1\n"); -fwrite($fp, b"line2\n"); -fwrite($fp, b"line3\n"); +fwrite($fp, "line1\n"); +fwrite($fp, "line2\n"); +fwrite($fp, "line3\n"); rewind($fp); while (!feof($fp)) { diff --git a/ext/standard/tests/file/bug43008.phpt b/ext/standard/tests/file/bug43008.phpt index 3c9411d329..0d9d6ed986 100644 --- a/ext/standard/tests/file/bug43008.phpt +++ b/ext/standard/tests/file/bug43008.phpt @@ -8,13 +8,13 @@ if (!extension_loaded("iconv")) die("skip iconv extension not available"); allow_url_fopen=1 --FILE-- <?php -$url = b"" - . b"php://filter/read=" - . urlencode(b"convert.iconv.ISO-8859-15/UTF-8") - . b'|' . urlencode(b"string.rot13") - . b'|' . urlencode(b"string.rot13") - . b'|' . urlencode(b"convert.iconv.UTF-8/ISO-8859-15") - . b"/resource=data://text/plain,foob%E2r"; +$url = "" + . "php://filter/read=" + . urlencode("convert.iconv.ISO-8859-15/UTF-8") + . '|' . urlencode("string.rot13") + . '|' . urlencode("string.rot13") + . '|' . urlencode("convert.iconv.UTF-8/ISO-8859-15") + . "/resource=data://text/plain,foob%E2r"; var_dump(urlencode(file_get_contents($url))); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/copy_variation1.phpt b/ext/standard/tests/file/copy_variation1.phpt index 4d0a97302a..7cf20fd749 100644 --- a/ext/standard/tests/file/copy_variation1.phpt +++ b/ext/standard/tests/file/copy_variation1.phpt @@ -15,7 +15,7 @@ echo "*** Test copy() function: destination file names containing numerics/strin $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation1.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ diff --git a/ext/standard/tests/file/copy_variation10.phpt b/ext/standard/tests/file/copy_variation10.phpt index 98494af043..c5cbc84254 100644 --- a/ext/standard/tests/file/copy_variation10.phpt +++ b/ext/standard/tests/file/copy_variation10.phpt @@ -14,7 +14,7 @@ $file_path = dirname(__FILE__); echo "*** Test copy(): Trying to create a copy of file with the same source name ***\n"; $file = $file_path."/copy_variation10.tmp"; $file_handle = fopen($file, "w"); -fwrite($file_handle, str_repeat(b"Hello2world...\n", 100)); +fwrite($file_handle, str_repeat("Hello2world...\n", 100)); fclose($file_handle); var_dump( copy($file, $file) ); diff --git a/ext/standard/tests/file/copy_variation11.phpt b/ext/standard/tests/file/copy_variation11.phpt index adee8e1c65..b01dab0890 100644 --- a/ext/standard/tests/file/copy_variation11.phpt +++ b/ext/standard/tests/file/copy_variation11.phpt @@ -14,7 +14,7 @@ $file_path = dirname(__FILE__); echo "*** Test copy() function: Trying to create a copy of source file as a dir ***\n"; $file = $file_path."/copy_variation11.tmp"; $file_handle = fopen($file, "w"); -fwrite($file_handle, str_repeat(b"Hello, world...", 20)); +fwrite($file_handle, str_repeat("Hello, world...", 20)); fclose($file_handle); $dir = $file_path."/copy_variation11"; diff --git a/ext/standard/tests/file/copy_variation14.phpt b/ext/standard/tests/file/copy_variation14.phpt index 1a39c1c6a9..6eb8fe3ee4 100644 --- a/ext/standard/tests/file/copy_variation14.phpt +++ b/ext/standard/tests/file/copy_variation14.phpt @@ -15,7 +15,7 @@ $file_path = dirname(__FILE__); echo "*** Test copy() function: Trying to create a copy of non-existing source in existing destination ***"; $file = $file_path."/copy_variation14.tmp"; $file_handle = fopen($file, "w"); -fwrite($file_handle, str_repeat(b"Hello2world...\n", 100)); +fwrite($file_handle, str_repeat("Hello2world...\n", 100)); fclose($file_handle); var_dump( copy($file_path."/nosuchfile.tmp", $file_path."/copy_nosuchfile.tmp") ); //With non-existing source diff --git a/ext/standard/tests/file/copy_variation15.phpt b/ext/standard/tests/file/copy_variation15.phpt index fbf5e7bf9e..fdc84e989a 100644 --- a/ext/standard/tests/file/copy_variation15.phpt +++ b/ext/standard/tests/file/copy_variation15.phpt @@ -28,7 +28,7 @@ $file_path = dirname(__FILE__); echo "*** Test copy() function: Trying to create a copy of file in a dir which doesn't have write permissions ***"; $file = $file_path."/copy_variation15.tmp"; $file_handle = fopen($file, "w"); -fwrite($file_handle, str_repeat(b"Hello, world...", 20)); +fwrite($file_handle, str_repeat("Hello, world...", 20)); fclose($file_handle); $dir = $file_path."/copy_variation15"; diff --git a/ext/standard/tests/file/copy_variation16-win32.phpt b/ext/standard/tests/file/copy_variation16-win32.phpt index d95d24adac..eff56a1ec7 100644 --- a/ext/standard/tests/file/copy_variation16-win32.phpt +++ b/ext/standard/tests/file/copy_variation16-win32.phpt @@ -27,7 +27,7 @@ mkdir($dirname_with_blank); $src_file_name = dirname(__FILE__)."/copy_variation16.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite($file_handle, str_repeat(b"Hello world, this is 2007 year ...\n", 100)); +fwrite($file_handle, str_repeat("Hello world, this is 2007 year ...\n", 100)); fclose($file_handle); echo "- Size of source file => "; diff --git a/ext/standard/tests/file/copy_variation17.phpt b/ext/standard/tests/file/copy_variation17.phpt index 97f1665f01..2dfe94c6e9 100644 --- a/ext/standard/tests/file/copy_variation17.phpt +++ b/ext/standard/tests/file/copy_variation17.phpt @@ -14,7 +14,7 @@ $file_path = dirname(__FILE__); echo "*** Test copy() function: With source file names containing wild-card chars ***\n"; $src_file = $file_path."/copy_variation17.tmp"; $file_handle = fopen($src_file, "w"); -fwrite($file_handle, str_repeat(b"Hello2world...\n", 100)); +fwrite($file_handle, str_repeat("Hello2world...\n", 100)); fclose($file_handle); $dir = $file_path."/copy_variation17"; diff --git a/ext/standard/tests/file/copy_variation2-win32-mb.phpt b/ext/standard/tests/file/copy_variation2-win32-mb.phpt index e818e294d8..95688c97c5 100644 --- a/ext/standard/tests/file/copy_variation2-win32-mb.phpt +++ b/ext/standard/tests/file/copy_variation2-win32-mb.phpt @@ -20,7 +20,7 @@ echo "*** Test copy() function: destination file names containing special charac $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation2ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ diff --git a/ext/standard/tests/file/copy_variation2-win32.phpt b/ext/standard/tests/file/copy_variation2-win32.phpt index 4819d63e36..82235ba814 100644 --- a/ext/standard/tests/file/copy_variation2-win32.phpt +++ b/ext/standard/tests/file/copy_variation2-win32.phpt @@ -20,7 +20,7 @@ echo "*** Test copy() function: destination file names containing special charac $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation2.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ diff --git a/ext/standard/tests/file/copy_variation2.phpt b/ext/standard/tests/file/copy_variation2.phpt index d99f5a8da3..a9b36803d9 100644 --- a/ext/standard/tests/file/copy_variation2.phpt +++ b/ext/standard/tests/file/copy_variation2.phpt @@ -20,7 +20,7 @@ echo "*** Test copy() function: destination file names containing special charac $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation2.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ diff --git a/ext/standard/tests/file/copy_variation3-win32.phpt b/ext/standard/tests/file/copy_variation3-win32.phpt index 68ce4a1680..5055c297f6 100644 --- a/ext/standard/tests/file/copy_variation3-win32.phpt +++ b/ext/standard/tests/file/copy_variation3-win32.phpt @@ -20,7 +20,7 @@ echo "*** Test copy() function: destination file names containing whitespaces ** $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation3.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ diff --git a/ext/standard/tests/file/copy_variation3.phpt b/ext/standard/tests/file/copy_variation3.phpt index 1c45c8c129..56f797bc95 100644 --- a/ext/standard/tests/file/copy_variation3.phpt +++ b/ext/standard/tests/file/copy_variation3.phpt @@ -20,7 +20,7 @@ echo "*** Test copy() function: destination file names containing whitespaces ** $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation3.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ diff --git a/ext/standard/tests/file/copy_variation4.phpt b/ext/standard/tests/file/copy_variation4.phpt Binary files differindex 3c8224da0a..47152d4239 100644 --- a/ext/standard/tests/file/copy_variation4.phpt +++ b/ext/standard/tests/file/copy_variation4.phpt diff --git a/ext/standard/tests/file/copy_variation5-win32.phpt b/ext/standard/tests/file/copy_variation5-win32.phpt index baf7be470c..48e85eaf02 100644 --- a/ext/standard/tests/file/copy_variation5-win32.phpt +++ b/ext/standard/tests/file/copy_variation5-win32.phpt @@ -20,7 +20,7 @@ echo "*** Test copy() function: checking case sensitivity in creation of destina $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation5.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ diff --git a/ext/standard/tests/file/copy_variation5.phpt b/ext/standard/tests/file/copy_variation5.phpt index 8abc9c961a..c480fcc3bf 100644 --- a/ext/standard/tests/file/copy_variation5.phpt +++ b/ext/standard/tests/file/copy_variation5.phpt @@ -20,7 +20,7 @@ echo "*** Test copy() function: checking case sensitivity in creation of destina $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation5.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ diff --git a/ext/standard/tests/file/copy_variation7.phpt b/ext/standard/tests/file/copy_variation7.phpt index d687b073c7..474d33bc49 100644 --- a/ext/standard/tests/file/copy_variation7.phpt +++ b/ext/standard/tests/file/copy_variation7.phpt @@ -20,7 +20,7 @@ $file_path = dirname(__FILE__); echo "*** Testing copy() with symlink and hardlink ***\n"; $file = $file_path."/copy_variation7.tmp"; $file_handle = fopen($file, "w"); -fwrite( $file_handle, str_repeat(b"Hello World, this is 2007 year ....\n", 100) ); +fwrite( $file_handle, str_repeat("Hello World, this is 2007 year ....\n", 100) ); fclose($file_handle); $symlink = $file_path."/copy_variation7_symlink.tmp"; diff --git a/ext/standard/tests/file/copy_variation9.phpt b/ext/standard/tests/file/copy_variation9.phpt index 824bed0c76..34d5b907d9 100644 --- a/ext/standard/tests/file/copy_variation9.phpt +++ b/ext/standard/tests/file/copy_variation9.phpt @@ -29,7 +29,7 @@ $file_path = dirname(__FILE__); echo "*** Test copy() function: destination with/without write permissions ***\n"; $src_file_name = $file_path."/copy_variation9.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite($file_handle, str_repeat(b"Hello2world...\n", 100)); +fwrite($file_handle, str_repeat("Hello2world...\n", 100)); fclose($file_handle); $dest_file_name = $file_path."/copy_copy_variation9.tmp"; diff --git a/ext/standard/tests/file/file_get_contents_variation5_32bit.phpt b/ext/standard/tests/file/file_get_contents_variation5_32bit.phpt index 3afc3dc180..9e8bbe6d1f 100644 --- a/ext/standard/tests/file/file_get_contents_variation5_32bit.phpt +++ b/ext/standard/tests/file/file_get_contents_variation5_32bit.phpt @@ -27,7 +27,7 @@ set_error_handler('test_error_handler'); $filename = 'FileGetContentsVar5.tmp'; $absFile = dirname(__FILE__).'/'.$filename; $h = fopen($absFile,"w"); -fwrite($h, b"contents read"); +fwrite($h, "contents read"); fclose($h); diff --git a/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt b/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt index df33059f30..170ba4343e 100644 --- a/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt +++ b/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt @@ -27,7 +27,7 @@ set_error_handler('test_error_handler'); $filename = 'FileGetContentsVar5.tmp'; $absFile = dirname(__FILE__).'/'.$filename; $h = fopen($absFile,"w"); -fwrite($h, b"contents read"); +fwrite($h, "contents read"); fclose($h); diff --git a/ext/standard/tests/file/file_get_contents_variation9.phpt b/ext/standard/tests/file/file_get_contents_variation9.phpt index 99812b5349..7e500e8c56 100644 --- a/ext/standard/tests/file/file_get_contents_variation9.phpt +++ b/ext/standard/tests/file/file_get_contents_variation9.phpt @@ -25,7 +25,7 @@ $chainlink = dirname(__FILE__).'/fileGetContentsVar9.ChainLink'; $h = fopen($filename,"w"); //Data should be more than the size of a link. for ($i = 1; $i <= 10; $i++) { - fwrite($h, b"Here is a repeated amount of data"); + fwrite($h, "Here is a repeated amount of data"); } fclose($h); diff --git a/ext/standard/tests/file/fseek_variation3.phpt b/ext/standard/tests/file/fseek_variation3.phpt index c29ed31759..edb0b3a3b0 100644 --- a/ext/standard/tests/file/fseek_variation3.phpt +++ b/ext/standard/tests/file/fseek_variation3.phpt @@ -29,7 +29,7 @@ echo "after seek back 20: ".bin2hex(fread($h,1))."\n"; echo "--- fseek beyond end of file ---\n"; var_dump(fseek($h, 16, SEEK_SET)); -fwrite($h, b"end"); +fwrite($h, "end"); fseek($h ,0, SEEK_SET); $data = fread($h, 4096); echo bin2hex($data)."\n"; diff --git a/ext/standard/tests/file/include_streams.phpt b/ext/standard/tests/file/include_streams.phpt index e459c6a1aa..05b16238cd 100644 --- a/ext/standard/tests/file/include_streams.phpt +++ b/ext/standard/tests/file/include_streams.phpt @@ -32,7 +32,7 @@ class mystream $this->options = $options; $split = parse_url($path); - if ($split["host"] !== b"GLOBALS" || + if ($split["host"] !== "GLOBALS" || empty($split["path"]) || empty($GLOBALS[substr($split["path"],1)])) { return false; diff --git a/ext/standard/tests/file/move_uploaded_file_basic.phpt b/ext/standard/tests/file/move_uploaded_file_basic.phpt index 00bbcf6e18..7349a694de 100644 --- a/ext/standard/tests/file/move_uploaded_file_basic.phpt +++ b/ext/standard/tests/file/move_uploaded_file_basic.phpt @@ -28,7 +28,7 @@ $destination1 = __FILE__ . ".tmp"; var_dump(move_uploaded_file($_FILES['file1']['tmp_name'], $destination1)); $file_contents = file_get_contents($destination1); -$contents_matches = ($file_contents == b"abcdef123456789xxxDDDxxxDDDxxxDDD"); +$contents_matches = ($file_contents == "abcdef123456789xxxDDDxxxDDDxxxDDD"); var_dump($contents_matches); unlink($destination1); echo "\n"; diff --git a/ext/standard/tests/file/pathinfo_basic.phpt b/ext/standard/tests/file/pathinfo_basic.phpt index 53eda5a64e..bc4196925d 100644 --- a/ext/standard/tests/file/pathinfo_basic.phpt +++ b/ext/standard/tests/file/pathinfo_basic.phpt @@ -32,7 +32,7 @@ $paths = array ( "$file_path/foo".chr(47)."symlink.link", "$file_path".chr(47)."foo/symlink.link", "$file_path".chr(47)."foo".chr(47)."symlink.link", - b"$file_path/foo/symlink.link", + "$file_path/foo/symlink.link", /* Testing directories */ ".", // current directory diff --git a/ext/standard/tests/file/proc_open01.phpt b/ext/standard/tests/file/proc_open01.phpt index 3348403e2b..04882853ec 100644 --- a/ext/standard/tests/file/proc_open01.phpt +++ b/ext/standard/tests/file/proc_open01.phpt @@ -18,7 +18,7 @@ if ($proc === false) { } var_dump($pipes); stream_set_blocking($pipes[1], FALSE); -$test_string = b"yay!\n"; +$test_string = "yay!\n"; fwrite($pipes[0], $test_string); fflush($pipes[0]); fclose($pipes[0]); diff --git a/ext/standard/tests/file/realpath_basic-win32-mb.phpt b/ext/standard/tests/file/realpath_basic-win32-mb.phpt index c0f39b6054..dbfdfc41d6 100644 --- a/ext/standard/tests/file/realpath_basic-win32-mb.phpt +++ b/ext/standard/tests/file/realpath_basic-win32-mb.phpt @@ -34,7 +34,7 @@ $filenames = array ( "$file_path/realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic/home//../././realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic.tmp//", // checking for binary safe - b"$file_path/realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic/home/realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic.tmp", + "$file_path/realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic/home/realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic.tmp", /* filenames with invalid path */ "$file_path///realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic/home//..//././test//realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic.tmp", diff --git a/ext/standard/tests/file/realpath_basic-win32.phpt b/ext/standard/tests/file/realpath_basic-win32.phpt index 5ebfcff683..a768ca9540 100644 --- a/ext/standard/tests/file/realpath_basic-win32.phpt +++ b/ext/standard/tests/file/realpath_basic-win32.phpt @@ -34,7 +34,7 @@ $filenames = array ( "$file_path/realpath_basic/home//../././realpath_basic.tmp//", // checking for binary safe - b"$file_path/realpath_basic/home/realpath_basic.tmp", + "$file_path/realpath_basic/home/realpath_basic.tmp", /* filenames with invalid path */ "$file_path///realpath_basic/home//..//././test//realpath_basic.tmp", diff --git a/ext/standard/tests/file/stream_get_line.phpt b/ext/standard/tests/file/stream_get_line.phpt index 89798ef95e..2c11f00eed 100644 --- a/ext/standard/tests/file/stream_get_line.phpt +++ b/ext/standard/tests/file/stream_get_line.phpt @@ -4,7 +4,7 @@ Crash inside stream_get_line(), when length=0 <?php $path = dirname(__FILE__) . '/test.html'; -file_put_contents($path, b"foo<br>bar<br>foo"); +file_put_contents($path, "foo<br>bar<br>foo"); $fp = fopen($path, "r"); while ($fp && !feof($fp)) { echo stream_get_line($fp, 0, "<br>")."\n"; diff --git a/ext/standard/tests/file/userfilters.phpt b/ext/standard/tests/file/userfilters.phpt index 2246b5d8a4..dfa8376fff 100644 --- a/ext/standard/tests/file/userfilters.phpt +++ b/ext/standard/tests/file/userfilters.phpt @@ -20,7 +20,7 @@ class testfilter extends php_user_filter { stream_filter_register('testfilter','testfilter'); -$text = b"Hello There!"; +$text = "Hello There!"; $fp = tmpfile(); fwrite($fp, $text); diff --git a/ext/standard/tests/filters/filter_errors.inc b/ext/standard/tests/filters/filter_errors.inc index 7345df383c..6d1a270c82 100644 --- a/ext/standard/tests/filters/filter_errors.inc +++ b/ext/standard/tests/filters/filter_errors.inc @@ -17,7 +17,7 @@ function filter_errors_test($filter, $data) { $stream = fopen('php://memory', 'wb+'); - fwrite($stream, b".\r\n$data"); + fwrite($stream, ".\r\n$data"); fseek($stream, 0, SEEK_SET); stream_get_line($stream, 8192, "\r\n"); @@ -27,7 +27,7 @@ function filter_errors_test($filter, $data) { $stream = fopen('php://memory', 'wb+'); - fwrite($stream, b"$data"); + fwrite($stream, "$data"); fseek($stream, 0, SEEK_SET); stream_filter_append($stream, $filter); diff --git a/ext/standard/tests/filters/filter_errors_user.phpt b/ext/standard/tests/filters/filter_errors_user.phpt index 7bdf8de08a..9b911cf81f 100644 --- a/ext/standard/tests/filters/filter_errors_user.phpt +++ b/ext/standard/tests/filters/filter_errors_user.phpt @@ -52,7 +52,7 @@ echo "test append / read / remove\n"; for($i = 0; $i < 5; ++$i) { echo "test_filter$i\n"; $stream = fopen('php://memory', 'wb+'); - fwrite($stream, b"42"); + fwrite($stream, "42"); fseek($stream, 0, SEEK_SET); $f = stream_filter_append($stream, "test_filter$i"); stream_get_contents($stream); @@ -61,7 +61,7 @@ for($i = 0; $i < 5; ++$i) { echo "test append all / read / remove all\n"; $stream = fopen('php://memory', 'wb+'); -fwrite($stream, b"42"); +fwrite($stream, "42"); fseek($stream, 0, SEEK_SET); $filters = array(); for($i = 0; $i < 5; ++$i) { @@ -75,7 +75,7 @@ foreach($filters as $filter) { echo "test append all / read / close\n"; $stream = fopen('php://memory', 'wb+'); -fwrite($stream, b"42"); +fwrite($stream, "42"); fseek($stream, 0, SEEK_SET); $filters = array(); for($i = 0; $i < 5; ++$i) { diff --git a/ext/standard/tests/filters/filter_errors_zlib_inflate.phpt b/ext/standard/tests/filters/filter_errors_zlib_inflate.phpt index ebb3b21df2..be7bdba3fb 100644 --- a/ext/standard/tests/filters/filter_errors_zlib_inflate.phpt +++ b/ext/standard/tests/filters/filter_errors_zlib_inflate.phpt @@ -5,7 +5,7 @@ Filter errors: zlib.inflate --FILE-- <?php require 'filter_errors.inc'; -filter_errors_test('zlib.inflate', gzencode(b'42')); +filter_errors_test('zlib.inflate', gzencode('42')); ?> --EXPECTF-- test filtering of buffered data diff --git a/ext/standard/tests/http/server.inc b/ext/standard/tests/http/server.inc index b9ade0e9f0..db66c3dd13 100644 --- a/ext/standard/tests/http/server.inc +++ b/ext/standard/tests/http/server.inc @@ -54,13 +54,13 @@ function http_server($socket_string, array $files, &$output = null) { if (!stream_select($r, $w, $e, 1)) continue; $line = stream_get_line($sock, 8192, "\r\n"); - if ($line === b'') { - fwrite($output, b"\r\n"); + if ($line === '') { + fwrite($output, "\r\n"); break; } else if ($line !== false) { - fwrite($output, b"$line\r\n"); + fwrite($output, "$line\r\n"); - if (preg_match(b'#^Content-Length\s*:\s*([[:digit:]]+)\s*$#i', $line, $matches)) { + if (preg_match('#^Content-Length\s*:\s*([[:digit:]]+)\s*$#i', $line, $matches)) { $content_length = (int) $matches[1]; } } diff --git a/ext/standard/tests/mail/ezmlm_hash_basic.phpt b/ext/standard/tests/mail/ezmlm_hash_basic.phpt index ce70eace23..2f810e2562 100644 --- a/ext/standard/tests/mail/ezmlm_hash_basic.phpt +++ b/ext/standard/tests/mail/ezmlm_hash_basic.phpt @@ -13,8 +13,8 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); echo "*** Testing ezmlm_hash() : basic functionality ***\n"; -var_dump(ezmlm_hash(b"webmaster@somewhere.com")); -var_dump(ezmlm_hash(b"foo@somewhere.com")); +var_dump(ezmlm_hash("webmaster@somewhere.com")); +var_dump(ezmlm_hash("foo@somewhere.com")); ?> ===Done=== diff --git a/ext/standard/tests/mail/ezmlm_hash_basic_64bit.phpt b/ext/standard/tests/mail/ezmlm_hash_basic_64bit.phpt index 03ac67b9b4..46abdba7c8 100644 --- a/ext/standard/tests/mail/ezmlm_hash_basic_64bit.phpt +++ b/ext/standard/tests/mail/ezmlm_hash_basic_64bit.phpt @@ -13,8 +13,8 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); echo "*** Testing ezmlm_hash() : basic functionality ***\n"; -var_dump(ezmlm_hash(b"webmaster@somewhere.com")); -var_dump(ezmlm_hash(b"foo@somewhere.com")); +var_dump(ezmlm_hash("webmaster@somewhere.com")); +var_dump(ezmlm_hash("foo@somewhere.com")); ?> ===Done=== diff --git a/ext/standard/tests/network/bug20134.phpt b/ext/standard/tests/network/bug20134.phpt index 400e3fb15c..e311f892f7 100644 --- a/ext/standard/tests/network/bug20134.phpt +++ b/ext/standard/tests/network/bug20134.phpt @@ -11,7 +11,7 @@ if (!$fp) { } else { /* Likewise, writes will always appear to succeed */ - $x = fwrite($fp,b"\n"); + $x = fwrite($fp,"\n"); var_dump($x); /* But reads should always fail */ $content = fread($fp, 40); diff --git a/ext/standard/tests/network/inet.phpt b/ext/standard/tests/network/inet.phpt index 851e1ba6c5..d2dcbb48c1 100644 --- a/ext/standard/tests/network/inet.phpt +++ b/ext/standard/tests/network/inet.phpt @@ -16,19 +16,19 @@ var_dump(inet_ntop((binary)$packed)); var_dump(inet_ntop()); var_dump(inet_ntop(-1)); -var_dump(inet_ntop(b"")); -var_dump(inet_ntop(b"blah-blah")); +var_dump(inet_ntop("")); +var_dump(inet_ntop("blah-blah")); var_dump(inet_pton()); -var_dump(inet_pton(b"")); +var_dump(inet_pton("")); var_dump(inet_pton(-1)); -var_dump(inet_pton(b"abra")); +var_dump(inet_pton("abra")); $array = array( - b"127.0.0.1", - b"66.163.161.116", - b"255.255.255.255", - b"0.0.0.0", + "127.0.0.1", + "66.163.161.116", + "255.255.255.255", + "0.0.0.0", ); foreach ($array as $val) { var_dump(bin2hex($packed = inet_pton($val))); diff --git a/ext/standard/tests/serialize/bug43614.phpt b/ext/standard/tests/serialize/bug43614.phpt index 68568a1224..127dfba586 100644 --- a/ext/standard/tests/serialize/bug43614.phpt +++ b/ext/standard/tests/serialize/bug43614.phpt @@ -7,7 +7,7 @@ error_reporting(E_ALL); var_dump($a = unserialize('a:2:{s:2:"10";i:1;s:2:"01";i:2;}')); var_dump($a['10']); -var_dump($a[b'01']); +var_dump($a['01']); ?> --EXPECT-- diff --git a/ext/standard/tests/streams/bug44818.phpt b/ext/standard/tests/streams/bug44818.phpt index 628f64e341..7bd9fe5168 100644 --- a/ext/standard/tests/streams/bug44818.phpt +++ b/ext/standard/tests/streams/bug44818.phpt @@ -5,7 +5,7 @@ Bug #44818 (php://memory writeable when opened read only) function test($url, $mode) { echo "$url, $mode\n"; $fd = fopen($url, $mode); - var_dump($fd, fwrite($fd, b"foo")); + var_dump($fd, fwrite($fd, "foo")); var_dump(fseek($fd, 0, SEEK_SET), fread($fd, 3)); fclose($fd); } diff --git a/ext/standard/tests/streams/bug46426.phpt b/ext/standard/tests/streams/bug46426.phpt index 80dbcded80..8c95ea456e 100644 --- a/ext/standard/tests/streams/bug46426.phpt +++ b/ext/standard/tests/streams/bug46426.phpt @@ -5,7 +5,7 @@ Bug #46426 (3rd parameter offset of stream_get_contents not works for "0") $tmp = tmpfile(); -fwrite($tmp, b"12345"); +fwrite($tmp, "12345"); echo stream_get_contents($tmp, 2, 1); echo "\n"; diff --git a/ext/standard/tests/streams/bug48309.phpt b/ext/standard/tests/streams/bug48309.phpt index d347cc39c8..bb2d9d28f7 100644 --- a/ext/standard/tests/streams/bug48309.phpt +++ b/ext/standard/tests/streams/bug48309.phpt @@ -4,7 +4,7 @@ Bug #48309 (stream_copy_to_stream() and fpasstru() do not update stream position <?php $tmp = tmpfile(); -fwrite($tmp, b'test'); +fwrite($tmp, 'test'); fseek($tmp, 0, SEEK_SET); echo "-- stream_copy_to_stream() --\n"; diff --git a/ext/standard/tests/streams/stream_copy_to_stream_socket.phpt b/ext/standard/tests/streams/stream_copy_to_stream_socket.phpt index 7e304b1188..dafe90e40c 100644 --- a/ext/standard/tests/streams/stream_copy_to_stream_socket.phpt +++ b/ext/standard/tests/streams/stream_copy_to_stream_socket.phpt @@ -11,7 +11,7 @@ if (!$sockets) die("skip stream_socket_pair"); $sockets = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, 0); $tmp = tmpfile(); -fwrite($sockets[0], b"a"); +fwrite($sockets[0], "a"); stream_socket_shutdown($sockets[0], STREAM_SHUT_WR); stream_copy_to_stream($sockets[1], $tmp); diff --git a/ext/standard/tests/streams/stream_get_contents_001.phpt b/ext/standard/tests/streams/stream_get_contents_001.phpt index e8e1c3d26b..dc7fcb239c 100644 --- a/ext/standard/tests/streams/stream_get_contents_001.phpt +++ b/ext/standard/tests/streams/stream_get_contents_001.phpt @@ -5,7 +5,7 @@ stream_get_contents() - Testing offset out of range $tmp = tmpfile(); -fwrite($tmp, b"12345"); +fwrite($tmp, "12345"); echo stream_get_contents($tmp, 2, 5), "--\n"; echo stream_get_contents($tmp, 2), "--\n"; diff --git a/ext/standard/tests/streams/stream_get_contents_002.phpt b/ext/standard/tests/streams/stream_get_contents_002.phpt index 66ff3fb189..3e01e71953 100644 --- a/ext/standard/tests/streams/stream_get_contents_002.phpt +++ b/ext/standard/tests/streams/stream_get_contents_002.phpt @@ -10,7 +10,7 @@ $sockets = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, 0); stream_set_timeout($sockets[1], 6000); -fwrite($sockets[0], b"foo"); +fwrite($sockets[0], "foo"); var_dump(stream_get_contents($sockets[1], 3)); ?> diff --git a/ext/standard/tests/streams/stream_get_line_nb.phpt b/ext/standard/tests/streams/stream_get_line_nb.phpt index ce981203ff..40a6095374 100644 --- a/ext/standard/tests/streams/stream_get_line_nb.phpt +++ b/ext/standard/tests/streams/stream_get_line_nb.phpt @@ -20,25 +20,25 @@ var_dump($sockets); stream_set_blocking($sockets[1], 0); -$eol = b'<EOL>'; +$eol = '<EOL>'; -fwrite($sockets[0], b"line start"); +fwrite($sockets[0], "line start"); var_dump(stream_get_line($sockets[1], 8192, $eol)); // Does not returns incomplete line (EOL not found) var_dump(stream_get_line($sockets[1], 8192, $eol)); -fwrite($sockets[0], b", line end"); -fwrite($sockets[0], b", $eol"); +fwrite($sockets[0], ", line end"); +fwrite($sockets[0], ", $eol"); var_dump(stream_get_line($sockets[1], 8192, $eol)); // Returns full line (EOL found) var_dump(stream_get_line($sockets[1], 8192, $eol)); // Nothing to read var_dump(stream_get_line($sockets[1], 8192, $eol)); -fwrite($sockets[0], b"incomplete line"); -var_dump(stream_get_line($sockets[1], strlen(b"incomplete line"), $eol)); // EOL not found but $length has been read, return incomplete line +fwrite($sockets[0], "incomplete line"); +var_dump(stream_get_line($sockets[1], strlen("incomplete line"), $eol)); // EOL not found but $length has been read, return incomplete line -fwrite($sockets[0], b"incomplete line"); +fwrite($sockets[0], "incomplete line"); var_dump(stream_get_line($sockets[1], 8192, $eol)); // Does not returns incomplete line (EOL not found) -var_dump(fread($sockets[1], strlen(b"incomplete line"))); // Returns buffer readden by stream_get_line +var_dump(fread($sockets[1], strlen("incomplete line"))); // Returns buffer readden by stream_get_line -fwrite($sockets[0], b"end of file"); +fwrite($sockets[0], "end of file"); var_dump(stream_get_line($sockets[1], 8192, $eol)); // Does not returns incomplete line (EOL not found) fclose($sockets[0]); diff --git a/ext/standard/tests/streams/stream_socket_pair.phpt b/ext/standard/tests/streams/stream_socket_pair.phpt index 203ae982d1..b926c9d9f4 100644 --- a/ext/standard/tests/streams/stream_socket_pair.phpt +++ b/ext/standard/tests/streams/stream_socket_pair.phpt @@ -5,8 +5,8 @@ stream_socket_pair() $domain = (strtoupper(substr(PHP_OS, 0, 3) == 'WIN') ? STREAM_PF_INET : STREAM_PF_UNIX); $sockets = stream_socket_pair($domain, STREAM_SOCK_STREAM, 0); var_dump($sockets); -fwrite($sockets[0], b"foo"); -var_dump(fread($sockets[1], strlen(b"foo"))); +fwrite($sockets[0], "foo"); +var_dump(fread($sockets[1], strlen("foo"))); fclose($sockets[0]); ?> --EXPECTF-- diff --git a/ext/standard/tests/strings/bug44703.phpt b/ext/standard/tests/strings/bug44703.phpt index e20b1dd83f..6171cee923 100644 --- a/ext/standard/tests/strings/bug44703.phpt +++ b/ext/standard/tests/strings/bug44703.phpt @@ -3,22 +3,22 @@ Bug #44703 (htmlspecialchars() does not detect bad character set argument) --FILE-- <?php -var_dump(htmlspecialchars(b"<a href='test'>Test</a>", ENT_COMPAT, 1)); -var_dump(htmlspecialchars(b"<a href='test'>Test</a>", ENT_COMPAT, 12)); -var_dump(htmlspecialchars(b"<a href='test'>Test</a>", ENT_COMPAT, 125)); -var_dump(htmlspecialchars(b"<a href='test'>Test</a>", ENT_COMPAT, 1252)); -var_dump(htmlspecialchars(b"<a href='test'>Test</a>", ENT_COMPAT, 12526)); +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(b"<>", ENT_COMPAT, 866)); -var_dump(htmlspecialchars(b"<>", ENT_COMPAT, 8666)); +var_dump(htmlspecialchars("<>", ENT_COMPAT, 866)); +var_dump(htmlspecialchars("<>", ENT_COMPAT, 8666)); -var_dump(htmlspecialchars(b"<>", ENT_COMPAT, NULL)); +var_dump(htmlspecialchars("<>", ENT_COMPAT, NULL)); -var_dump(htmlspecialchars(b"<>", ENT_COMPAT, 'SJIS')); -var_dump(htmlspecialchars(b"<>", ENT_COMPAT, 'SjiS')); +var_dump(htmlspecialchars("<>", ENT_COMPAT, 'SJIS')); +var_dump(htmlspecialchars("<>", ENT_COMPAT, 'SjiS')); -var_dump(htmlspecialchars(b"<>", ENT_COMPAT, str_repeat('a', 100))); +var_dump(htmlspecialchars("<>", ENT_COMPAT, str_repeat('a', 100))); ?> --EXPECTF-- diff --git a/ext/standard/tests/strings/bug51059.phpt b/ext/standard/tests/strings/bug51059.phpt index bdc56f1762..d17305ca50 100644 --- a/ext/standard/tests/strings/bug51059.phpt +++ b/ext/standard/tests/strings/bug51059.phpt @@ -2,8 +2,8 @@ Bug #51059 crypt() segfaults on certain salts --FILE-- <?php -$res = crypt(b'a', b'_'); -if ($res === b'*0' || $res === b'*1') echo 'OK'; +$res = crypt('a', '_'); +if ($res === '*0' || $res === '*1') echo 'OK'; else echo 'Not OK'; ?> diff --git a/ext/standard/tests/strings/convert_uuencode_basic.phpt b/ext/standard/tests/strings/convert_uuencode_basic.phpt index df8ee3666e..9849997d41 100644 --- a/ext/standard/tests/strings/convert_uuencode_basic.phpt +++ b/ext/standard/tests/strings/convert_uuencode_basic.phpt @@ -14,18 +14,18 @@ echo "*** Testing convert_uuencode() : basic functionality ***\n"; $strings = array ( //double quoted strings - b"123", - b"abc", - b"1a2b3c", - b"Here is a simple string to test convert_uuencode/decode", - b"\t This String contains \t\t some control characters\r\n", - b"\x90\x91\x00\x93\x94\x90\x91\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f", + "123", + "abc", + "1a2b3c", + "Here is a simple string to test convert_uuencode/decode", + "\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 - b'123', - b'abc', - b'1a2b3c', - b'\t This String contains \t\t some control characters\r\n', + '123', + 'abc', + '1a2b3c', + '\t This String contains \t\t some control characters\r\n', ); diff --git a/ext/standard/tests/strings/crypt_blowfish_variation1.phpt b/ext/standard/tests/strings/crypt_blowfish_variation1.phpt index 1592cfe876..4436700104 100644 --- a/ext/standard/tests/strings/crypt_blowfish_variation1.phpt +++ b/ext/standard/tests/strings/crypt_blowfish_variation1.phpt @@ -9,17 +9,17 @@ if (!function_exists('crypt') || !defined("CRYPT_BLOWFISH")) { --FILE-- <?php -$salts = array(b'32' => b'$2a$32$CCCCCCCCCCCCCCCCCCCCCC$', - b'33' => b'$2a$33$CCCCCCCCCCCCCCCCCCCCCC$', - b'34' => b'$2a$34$CCCCCCCCCCCCCCCCCCCCCC$', - b'35' => b'$2a$35$CCCCCCCCCCCCCCCCCCCCCC$', - b'36' => b'$2a$36$CCCCCCCCCCCCCCCCCCCCCC$', - b'37' => b'$2a$37$CCCCCCCCCCCCCCCCCCCCCC$', - b'38' => b'$2a$38$CCCCCCCCCCCCCCCCCCCCCC$',); +$salts = array('32' => '$2a$32$CCCCCCCCCCCCCCCCCCCCCC$', + '33' => '$2a$33$CCCCCCCCCCCCCCCCCCCCCC$', + '34' => '$2a$34$CCCCCCCCCCCCCCCCCCCCCC$', + '35' => '$2a$35$CCCCCCCCCCCCCCCCCCCCCC$', + '36' => '$2a$36$CCCCCCCCCCCCCCCCCCCCCC$', + '37' => '$2a$37$CCCCCCCCCCCCCCCCCCCCCC$', + '38' => '$2a$38$CCCCCCCCCCCCCCCCCCCCCC$',); foreach($salts as $i=>$salt) { - $crypt = crypt(b'U*U', $salt); - if ($crypt === b'*0' || $crypt === b'*1') { + $crypt = crypt('U*U', $salt); + if ($crypt === '*0' || $crypt === '*1') { echo "$i. OK\n"; } else { echo "$i. Not OK\n"; diff --git a/ext/standard/tests/strings/crypt_blowfish_variation2.phpt b/ext/standard/tests/strings/crypt_blowfish_variation2.phpt index 9db9e21424..f354a8ec77 100644 --- a/ext/standard/tests/strings/crypt_blowfish_variation2.phpt +++ b/ext/standard/tests/strings/crypt_blowfish_variation2.phpt @@ -3,7 +3,7 @@ Test Blowfish crypt() does not fall back to DES when rounds are not specified, or Blowfish is not available. --FILE-- <?php -$crypt = crypt(b'U*U', b'$2a$CCCCCCCCCCCCCCCCCCCCC.E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW'); +$crypt = crypt('U*U', '$2a$CCCCCCCCCCCCCCCCCCCCC.E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW'); if ($crypt==='*0') { echo "OK\n"; } else { diff --git a/ext/standard/tests/strings/crypt_sha256.phpt b/ext/standard/tests/strings/crypt_sha256.phpt index 86c7245fe9..a29bbf3c88 100644 --- a/ext/standard/tests/strings/crypt_sha256.phpt +++ b/ext/standard/tests/strings/crypt_sha256.phpt @@ -11,44 +11,44 @@ if (!function_exists('crypt') || !defined("CRYPT_SHA256")) { $tests = array( 1 => array( - b'$5$saltstring', - b'Hello world!', - b'$5$saltstring$5B8vYYiY.CVt1RlTTf8KbXBH3hsxY/GNooZaBBGWEc5' + '$5$saltstring', + 'Hello world!', + '$5$saltstring$5B8vYYiY.CVt1RlTTf8KbXBH3hsxY/GNooZaBBGWEc5' ), 2 => array( - b'$5$rounds=10000$saltstringsaltstring', - b'Hello world!', - b'$5$rounds=10000$saltstringsaltst$3xv.VbSHBb41AL9AvLeujZkZRBAwqFMz2.opqey6IcA' + '$5$rounds=10000$saltstringsaltstring', + 'Hello world!', + '$5$rounds=10000$saltstringsaltst$3xv.VbSHBb41AL9AvLeujZkZRBAwqFMz2.opqey6IcA' ), 3 => array( - b'$5$rounds=10000$saltstringsaltstring', - b'Hello world!', - b'$5$rounds=10000$saltstringsaltst$3xv.VbSHBb41AL9AvLeujZkZRBAwqFMz2.opqey6IcA' + '$5$rounds=10000$saltstringsaltstring', + 'Hello world!', + '$5$rounds=10000$saltstringsaltst$3xv.VbSHBb41AL9AvLeujZkZRBAwqFMz2.opqey6IcA' ), 4 => array( - b'$5$rounds=5000$toolongsaltstring', - b'This is just a test', - b'$5$rounds=5000$toolongsaltstrin$Un/5jzAHMgOGZ5.mWJpuVolil07guHPvOW8mGRcvxa5' + '$5$rounds=5000$toolongsaltstring', + 'This is just a test', + '$5$rounds=5000$toolongsaltstrin$Un/5jzAHMgOGZ5.mWJpuVolil07guHPvOW8mGRcvxa5' ), 5 => array( - b'$5$rounds=1400$anotherlongsaltstring', - b'a very much longer text to encrypt. This one even stretches over morethan one line.', - b'$5$rounds=1400$anotherlongsalts$Rx.j8H.h8HjEDGomFU8bDkXm3XIUnzyxf12oP84Bnq1' + '$5$rounds=1400$anotherlongsaltstring', + 'a very much longer text to encrypt. This one even stretches over morethan one line.', + '$5$rounds=1400$anotherlongsalts$Rx.j8H.h8HjEDGomFU8bDkXm3XIUnzyxf12oP84Bnq1' ), 6 => array( - b'$5$rounds=77777$short', - b'we have a short salt string but not a short password', - b'$5$rounds=77777$short$JiO1O3ZpDAxGJeaDIuqCoEFysAe1mZNJRs3pw0KQRd/' + '$5$rounds=77777$short', + 'we have a short salt string but not a short password', + '$5$rounds=77777$short$JiO1O3ZpDAxGJeaDIuqCoEFysAe1mZNJRs3pw0KQRd/' ), 7 => array( - b'$5$rounds=123456$asaltof16chars..', - b'a short string', - b'$5$rounds=123456$asaltof16chars..$gP3VQ/6X7UUEW3HkBn2w1/Ptq2jxPyzV/cZKmF/wJvD' + '$5$rounds=123456$asaltof16chars..', + 'a short string', + '$5$rounds=123456$asaltof16chars..$gP3VQ/6X7UUEW3HkBn2w1/Ptq2jxPyzV/cZKmF/wJvD' ), 8 => array( - b'$5$rounds=10$roundstoolow', - b'the minimum number is still observed', - b'$5$rounds=1000$roundstoolow$yfvwcWrQ8l/K0DAWyuPMDNHpIVlTQebY9l/gL972bIC' + '$5$rounds=10$roundstoolow', + 'the minimum number is still observed', + '$5$rounds=1000$roundstoolow$yfvwcWrQ8l/K0DAWyuPMDNHpIVlTQebY9l/gL972bIC' ) ); diff --git a/ext/standard/tests/strings/crypt_sha512.phpt b/ext/standard/tests/strings/crypt_sha512.phpt index d6f9df6013..3d51f4aafa 100644 --- a/ext/standard/tests/strings/crypt_sha512.phpt +++ b/ext/standard/tests/strings/crypt_sha512.phpt @@ -11,44 +11,44 @@ if (!function_exists('crypt') || !defined("CRYPT_SHA512")) { $tests = array( 1 => array( - b'$6$saltstring', - b'Hello world!', - b'$6$saltstring$svn8UoSVapNtMuq1ukKS4tPQd8iKwSMHWjl/O817G3uBnIFNjnQJuesI68u4OTLiBFdcbYEdFCoEOfaS35inz1' + '$6$saltstring', + 'Hello world!', + '$6$saltstring$svn8UoSVapNtMuq1ukKS4tPQd8iKwSMHWjl/O817G3uBnIFNjnQJuesI68u4OTLiBFdcbYEdFCoEOfaS35inz1' ), 2 => array( - b'$6$rounds=10000$saltstringsaltstring', - b'Hello world!', - b'$6$rounds=10000$saltstringsaltst$OW1/O6BYHV6BcXZu8QVeXbDWra3Oeqh0sbHbbMCVNSnCM/UrjmM0Dp8vOuZeHBy/YTBmSK6H9qs/y3RnOaw5v.' + '$6$rounds=10000$saltstringsaltstring', + 'Hello world!', + '$6$rounds=10000$saltstringsaltst$OW1/O6BYHV6BcXZu8QVeXbDWra3Oeqh0sbHbbMCVNSnCM/UrjmM0Dp8vOuZeHBy/YTBmSK6H9qs/y3RnOaw5v.' ), 3 => array( - b'$6$rounds=5000$toolongsaltstring', - b'This is just a test', - b'$6$rounds=5000$toolongsaltstrin$lQ8jolhgVRVhY4b5pZKaysCLi0QBxGoNeKQzQ3glMhwllF7oGDZxUhx1yxdYcz/e1JSbq3y6JMxxl8audkUEm0' + '$6$rounds=5000$toolongsaltstring', + 'This is just a test', + '$6$rounds=5000$toolongsaltstrin$lQ8jolhgVRVhY4b5pZKaysCLi0QBxGoNeKQzQ3glMhwllF7oGDZxUhx1yxdYcz/e1JSbq3y6JMxxl8audkUEm0' ), 4 => array( - b'$6$rounds=1400$anotherlongsaltstring', - b'a very much longer text to encrypt. This one even stretches over morethan one line.', - b'$6$rounds=1400$anotherlongsalts$POfYwTEok97VWcjxIiSOjiykti.o/pQs.wPvMxQ6Fm7I6IoYN3CmLs66x9t0oSwbtEW7o7UmJEiDwGqd8p4ur1' + '$6$rounds=1400$anotherlongsaltstring', + 'a very much longer text to encrypt. This one even stretches over morethan one line.', + '$6$rounds=1400$anotherlongsalts$POfYwTEok97VWcjxIiSOjiykti.o/pQs.wPvMxQ6Fm7I6IoYN3CmLs66x9t0oSwbtEW7o7UmJEiDwGqd8p4ur1' ), 5 => array( - b'$6$rounds=77777$short', - b'we have a short salt string but not a short password', - b'$6$rounds=77777$short$WuQyW2YR.hBNpjjRhpYD/ifIw05xdfeEyQoMxIXbkvr0gge1a1x3yRULJ5CCaUeOxFmtlcGZelFl5CxtgfiAc0' + '$6$rounds=77777$short', + 'we have a short salt string but not a short password', + '$6$rounds=77777$short$WuQyW2YR.hBNpjjRhpYD/ifIw05xdfeEyQoMxIXbkvr0gge1a1x3yRULJ5CCaUeOxFmtlcGZelFl5CxtgfiAc0' ), 6 => array( - b'$6$rounds=123456$asaltof16chars..', - b'a short string', - b'$6$rounds=123456$asaltof16chars..$BtCwjqMJGx5hrJhZywWvt0RLE8uZ4oPwcelCjmw2kSYu.Ec6ycULevoBK25fs2xXgMNrCzIMVcgEJAstJeonj1' + '$6$rounds=123456$asaltof16chars..', + 'a short string', + '$6$rounds=123456$asaltof16chars..$BtCwjqMJGx5hrJhZywWvt0RLE8uZ4oPwcelCjmw2kSYu.Ec6ycULevoBK25fs2xXgMNrCzIMVcgEJAstJeonj1' ), 7 => array( - b'$6$rounds=10$roundstoolow', - b'the minimum number is still observed', - b'$6$rounds=1000$roundstoolow$kUMsbe306n21p9R.FRkW3IGn.S9NPN0x50YhH1xhLsPuWGsUSklZt58jaTfF4ZEQpyUNGc0dqbpBYYBaHHrsX.' + '$6$rounds=10$roundstoolow', + 'the minimum number is still observed', + '$6$rounds=1000$roundstoolow$kUMsbe306n21p9R.FRkW3IGn.S9NPN0x50YhH1xhLsPuWGsUSklZt58jaTfF4ZEQpyUNGc0dqbpBYYBaHHrsX.' ), 8 => array( - b'$6$$bar$', - b'foo', - b'$6$$QMXjqd7rHQZPQ1yHsXkQqC1FBzDiVfTHXL.LaeDAeVV.IzMaV9VU4MQ8kPuZa2SOP1A0RPm772EaFYjpEJtdu.' + '$6$$bar$', + 'foo', + '$6$$QMXjqd7rHQZPQ1yHsXkQqC1FBzDiVfTHXL.LaeDAeVV.IzMaV9VU4MQ8kPuZa2SOP1A0RPm772EaFYjpEJtdu.' ), ); diff --git a/ext/standard/tests/strings/htmlentities-utf-2.phpt b/ext/standard/tests/strings/htmlentities-utf-2.phpt index d515dc0ff1..c058390ea9 100644 --- a/ext/standard/tests/strings/htmlentities-utf-2.phpt +++ b/ext/standard/tests/strings/htmlentities-utf-2.phpt @@ -5,10 +5,10 @@ output_handler= --FILE-- <?php @setlocale (LC_CTYPE, "C"); -$strings = array(b"<", b"\xD0", b"\xD0\x90", b"\xD0\x90\xD0", b"\xD0\x90\xD0\xB0", b"\xE0", b"A\xE0", b"\xE0\x80", b"\xE0\x79", b"\xE0\x80\xBE", - b"Voil\xE0", b"Clich\xE9s", - b"\xFE", b"\xFE\x41", b"\xC3\xA9", b"\xC3\x79", b"\xF7\xBF\xBF\xBF", b"\xFB\xBF\xBF\xBF\xBF", b"\xFD\xBF\xBF\xBF\xBF\xBF", - b"\x41\xF7\xF7\x42", b"\x42\xFB\xFB\x42", b"\x43\xFD\xFD\x42", b"\x44\xF7\xF7", b"\x45\xFB\xFB", b"\x46\xFD\xFD" +$strings = array("<", "\xD0", "\xD0\x90", "\xD0\x90\xD0", "\xD0\x90\xD0\xB0", "\xE0", "A\xE0", "\xE0\x80", "\xE0\x79", "\xE0\x80\xBE", + "Voil\xE0", "Clich\xE9s", + "\xFE", "\xFE\x41", "\xC3\xA9", "\xC3\x79", "\xF7\xBF\xBF\xBF", "\xFB\xBF\xBF\xBF\xBF", "\xFD\xBF\xBF\xBF\xBF\xBF", + "\x41\xF7\xF7\x42", "\x42\xFB\xFB\x42", "\x43\xFD\xFD\x42", "\x44\xF7\xF7", "\x45\xFB\xFB", "\x46\xFD\xFD" ); foreach($strings as $string) { $sc_encoded = htmlspecialchars ($string, ENT_QUOTES | ENT_IGNORE, "utf-8"); diff --git a/ext/standard/tests/strings/htmlentities-utf.phpt b/ext/standard/tests/strings/htmlentities-utf.phpt index 6a66e4df45..de99449552 100644 --- a/ext/standard/tests/strings/htmlentities-utf.phpt +++ b/ext/standard/tests/strings/htmlentities-utf.phpt @@ -5,10 +5,10 @@ output_handler= --FILE-- <?php @setlocale (LC_CTYPE, "C"); -$strings = array(b"<", b"\xD0", b"\xD0\x90", b"\xD0\x90\xD0", b"\xD0\x90\xD0\xB0", b"\xE0", b"A\xE0", b"\xE0\x80", b"\xE0\x79", b"\xE0\x80\xBE", - b"Voil\xE0", b"Clich\xE9s", - b"\xFE", b"\xFE\x41", b"\xC3\xA9", b"\xC3\x79", b"\xF7\xBF\xBF\xBF", b"\xFB\xBF\xBF\xBF\xBF", b"\xFD\xBF\xBF\xBF\xBF\xBF", - b"\x41\xF7\xF7\x42", b"\x42\xFB\xFB\x42", b"\x43\xFD\xFD\x42", b"\x44\xF7\xF7", b"\x45\xFB\xFB", b"\x46\xFD\xFD" +$strings = array("<", "\xD0", "\xD0\x90", "\xD0\x90\xD0", "\xD0\x90\xD0\xB0", "\xE0", "A\xE0", "\xE0\x80", "\xE0\x79", "\xE0\x80\xBE", + "Voil\xE0", "Clich\xE9s", + "\xFE", "\xFE\x41", "\xC3\xA9", "\xC3\x79", "\xF7\xBF\xBF\xBF", "\xFB\xBF\xBF\xBF\xBF", "\xFD\xBF\xBF\xBF\xBF\xBF", + "\x41\xF7\xF7\x42", "\x42\xFB\xFB\x42", "\x43\xFD\xFD\x42", "\x44\xF7\xF7", "\x45\xFB\xFB", "\x46\xFD\xFD" ); foreach($strings as $string) { $sc_encoded = htmlspecialchars ($string, ENT_QUOTES, "utf-8"); diff --git a/ext/standard/tests/strings/htmlentities01.phpt b/ext/standard/tests/strings/htmlentities01.phpt index eb64b0a63b..4ab49472d1 100644 --- a/ext/standard/tests/strings/htmlentities01.phpt +++ b/ext/standard/tests/strings/htmlentities01.phpt @@ -5,8 +5,8 @@ output_handler= mbstring.internal_encoding=pass --FILE-- <?php - var_dump(htmlentities(b"\x82\x86\x99\x9f", ENT_QUOTES, 'cp1252')); - var_dump(htmlentities(b"\x80\xa2\xa3\xa4\xa5", ENT_QUOTES, 'cp1252')); + var_dump(htmlentities("\x82\x86\x99\x9f", ENT_QUOTES, 'cp1252')); + var_dump(htmlentities("\x80\xa2\xa3\xa4\xa5", ENT_QUOTES, 'cp1252')); ?> --EXPECT-- string(28) "‚†™Ÿ" diff --git a/ext/standard/tests/strings/htmlentities24.phpt b/ext/standard/tests/strings/htmlentities24.phpt index 3ffdd65a5f..51271bdddf 100644 --- a/ext/standard/tests/strings/htmlentities24.phpt +++ b/ext/standard/tests/strings/htmlentities24.phpt @@ -9,7 +9,7 @@ Test htmlentities() function /* retrieving htmlentities from the ANSI character table */ echo "*** Retrieving htmlentities for 256 characters ***\n"; for($i=0; $i<256; $i++) - var_dump( bin2hex( htmlentities(b"chr($i)")) ); + var_dump( bin2hex( htmlentities("chr($i)")) ); /* giving arguments as NULL */ echo "\n*** Testing htmlentities() with NULL as first,second and third argument ***\n"; diff --git a/ext/standard/tests/strings/htmlspecialchars.phpt b/ext/standard/tests/strings/htmlspecialchars.phpt index 5d741e5ecb..2c886b9af7 100644 --- a/ext/standard/tests/strings/htmlspecialchars.phpt +++ b/ext/standard/tests/strings/htmlspecialchars.phpt @@ -9,7 +9,7 @@ Test htmlspecialchars() function /* retrieving htmlspecialchars from the ANSI character table */ echo "*** Retrieving htmlspecialchars for 256 characters ***\n"; for($i=0; $i<256; $i++) -var_dump( bin2hex( htmlspecialchars(b"chr($i)") ) ); +var_dump( bin2hex( htmlspecialchars("chr($i)") ) ); /* giving NULL as the argument */ echo "\n*** Testing htmlspecialchars() with NULL as first, second and third argument ***\n"; diff --git a/ext/standard/tests/strings/htmlspecialchars_decode_variation6.phpt b/ext/standard/tests/strings/htmlspecialchars_decode_variation6.phpt Binary files differindex fc3666ff65..7b1295c54e 100644 --- a/ext/standard/tests/strings/htmlspecialchars_decode_variation6.phpt +++ b/ext/standard/tests/strings/htmlspecialchars_decode_variation6.phpt diff --git a/ext/standard/tests/strings/join_variation6.phpt b/ext/standard/tests/strings/join_variation6.phpt Binary files differindex a627d77bf4..621b69521c 100644 --- a/ext/standard/tests/strings/join_variation6.phpt +++ b/ext/standard/tests/strings/join_variation6.phpt diff --git a/ext/standard/tests/strings/md5_basic1.phpt b/ext/standard/tests/strings/md5_basic1.phpt index eda414bc25..c1f8805ac0 100644 --- a/ext/standard/tests/strings/md5_basic1.phpt +++ b/ext/standard/tests/strings/md5_basic1.phpt @@ -8,7 +8,7 @@ Test md5() function : basic functionality */
echo "*** Testing md5() : basic functionality ***\n";
-var_dump(md5(b"apple"));
+var_dump(md5("apple"));
?>
===DONE===
--EXPECTF--
diff --git a/ext/standard/tests/strings/md5_basic2.phpt b/ext/standard/tests/strings/md5_basic2.phpt index 1f89ba82f5..670872f74d 100644 --- a/ext/standard/tests/strings/md5_basic2.phpt +++ b/ext/standard/tests/strings/md5_basic2.phpt @@ -8,7 +8,7 @@ Test md5() function : basic functionality - with raw output */
echo "*** Testing md5() : basic functionality - with raw output***\n";
-$str = b"Hello World";
+$str = "Hello World";
$md5_raw = md5($str, true);
var_dump(bin2hex($md5_raw));
diff --git a/ext/standard/tests/strings/quoted_printable_decode_error.phpt b/ext/standard/tests/strings/quoted_printable_decode_error.phpt index 5018837049..0515fea2a7 100644 --- a/ext/standard/tests/strings/quoted_printable_decode_error.phpt +++ b/ext/standard/tests/strings/quoted_printable_decode_error.phpt @@ -13,7 +13,7 @@ echo "\n-- Testing quoted_printable_decode() function with no arguments --\n"; var_dump( quoted_printable_decode() ); echo "\n-- Testing quoted_printable_decode() function with more than expected no. of arguments --\n"; -$str = b"=FAwow-factor=C1=d0=D5=DD=C5=CE=CE=D9=C5=0A= +$str = "=FAwow-factor=C1=d0=D5=DD=C5=CE=CE=D9=C5=0A= =20=D4=cf=D2=C7=CF=D7=D9=C5= =20= =D0= diff --git a/ext/standard/tests/strings/sha1_file.phpt b/ext/standard/tests/strings/sha1_file.phpt index fafe106d51..20d62e6999 100644 --- a/ext/standard/tests/strings/sha1_file.phpt +++ b/ext/standard/tests/strings/sha1_file.phpt @@ -19,7 +19,7 @@ return false; /* Writing into file */ $filename = "DataFile.txt"; -$content = b"Add this to the file\n"; +$content = "Add this to the file\n"; if (is_writable($filename)) { if (fwrite($handle2, $content) === FALSE) { echo "Cannot write to file ($filename)"; diff --git a/ext/standard/tests/strings/strip_tags_variation6.phpt b/ext/standard/tests/strings/strip_tags_variation6.phpt index 454f46e558..c838970868 100644 --- a/ext/standard/tests/strings/strip_tags_variation6.phpt +++ b/ext/standard/tests/strings/strip_tags_variation6.phpt @@ -19,7 +19,7 @@ echo "*** Testing strip_tags() : usage variations ***\n"; $strings = array ( "<html> I am html string </html>".chr(0)."<?php I am php string ?>", "<html> I am html string\0 </html><?php I am php string ?>", - b"<a>I am html string</a>", + "<a>I am html string</a>", "<html>I am html string</html>".decbin(65)."<?php I am php string?>" ); diff --git a/ext/standard/tests/strings/stristr_basic.phpt b/ext/standard/tests/strings/stristr_basic.phpt index f0a863cee9..0d2171496c 100644 --- a/ext/standard/tests/strings/stristr_basic.phpt +++ b/ext/standard/tests/strings/stristr_basic.phpt @@ -13,7 +13,7 @@ var_dump( stristr("test stRIng", "striNG") ); var_dump( stristr("teST StrinG", "stRIn") ); var_dump( stristr("tesT string", "t S") ); var_dump( stristr("test strinG", "g") ); -var_dump( bin2hex(stristr(b"te".chr(0).b"St", chr(0))) ); +var_dump( bin2hex(stristr("te".chr(0)."St", chr(0))) ); var_dump( stristr("tEst", "test") ); var_dump( stristr("teSt", "test") ); diff --git a/ext/standard/tests/url/bug47174.phpt b/ext/standard/tests/url/bug47174.phpt index 0296dbe753..6d08063253 100644 --- a/ext/standard/tests/url/bug47174.phpt +++ b/ext/standard/tests/url/bug47174.phpt @@ -2,13 +2,13 @@ Bug #47174 (base64_decode() interprets pad char in mid string as terminator) --FILE-- <?php -if (base64_decode(b"dGVzdA==") == base64_decode(b"dGVzdA==CRAP")) { +if (base64_decode("dGVzdA==") == base64_decode("dGVzdA==CRAP")) { echo "Same octect data - Signature Valid\n"; } else { echo "Invalid Signature\n"; } -$in = base64_encode(b"foo") . b'==' . base64_encode(b"bar"); +$in = base64_encode("foo") . '==' . base64_encode("bar"); var_dump($in, base64_decode($in)); ?> diff --git a/ext/xmlrpc/tests/bug50285.phpt b/ext/xmlrpc/tests/bug50285.phpt index 5da803c367..0a5fb962b4 100644 --- a/ext/xmlrpc/tests/bug50285.phpt +++ b/ext/xmlrpc/tests/bug50285.phpt @@ -14,11 +14,11 @@ function test2($func, $params) { } function test3($func, $params) { - return array('One', 3 => 'Three', b'Five' => 5, 'Six'); + return array('One', 3 => 'Three', 'Five' => 5, 'Six'); } function test4($func, $params) { - return array('One', 'Three', 'Five', b'Six' => 6); + return array('One', 'Three', 'Five', 'Six' => 6); } $server = xmlrpc_server_create(); diff --git a/ext/zlib/tests/gzfile_basic.phpt b/ext/zlib/tests/gzfile_basic.phpt index 17055646d8..56bc8b2d7a 100644 --- a/ext/zlib/tests/gzfile_basic.phpt +++ b/ext/zlib/tests/gzfile_basic.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('zlib')) die ('skip zlib extension not available in this b ?> --FILE-- <?php -$plaintxt = b<<<EOT +$plaintxt = <<<EOT hello world is a very common test for all languages diff --git a/ext/zlib/tests/gzfile_basic2.phpt b/ext/zlib/tests/gzfile_basic2.phpt index 2bbf315a1a..0a968ce394 100644 --- a/ext/zlib/tests/gzfile_basic2.phpt +++ b/ext/zlib/tests/gzfile_basic2.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('zlib')) die ('skip zlib extension not available in this b ?> --FILE-- <?php -$plaintxt = b<<<EOT +$plaintxt = <<<EOT hello world is a very common test for all languages diff --git a/ext/zlib/tests/gzreadgzwrite.phpt b/ext/zlib/tests/gzreadgzwrite.phpt index d52f12a4ac..817002807f 100644 --- a/ext/zlib/tests/gzreadgzwrite.phpt +++ b/ext/zlib/tests/gzreadgzwrite.phpt @@ -5,7 +5,7 @@ gzopen(), gzread(), gzwrite() if (!extension_loaded("zlib")) print "skip"; ?> --FILE-- <?php -$original = str_repeat(b"hallo php",4096); +$original = str_repeat("hallo php",4096); $filename = tempnam(sys_get_temp_dir(), "phpt"); $fp = gzopen($filename, "wb"); diff --git a/ext/zlib/tests/gzreadgzwriteplain.phpt b/ext/zlib/tests/gzreadgzwriteplain.phpt index 7a5a5025aa..58901ac08f 100644 --- a/ext/zlib/tests/gzreadgzwriteplain.phpt +++ b/ext/zlib/tests/gzreadgzwriteplain.phpt @@ -5,7 +5,7 @@ gzopen(), gzread(), gzwrite() for non-compressed data if (!extension_loaded("zlib")) print "skip"; ?> --FILE-- <?php -$original = str_repeat(b"hallo php",4096); +$original = str_repeat("hallo php",4096); $filename = tempnam(sys_get_temp_dir(), "phpt"); $fp = fopen($filename, "wb"); diff --git a/ext/zlib/tests/gzrewind_variation1.phpt b/ext/zlib/tests/gzrewind_variation1.phpt index 82018627f4..3eef10e93f 100644 --- a/ext/zlib/tests/gzrewind_variation1.phpt +++ b/ext/zlib/tests/gzrewind_variation1.phpt @@ -10,9 +10,9 @@ if (!extension_loaded("zlib")) { <?php $f = "temp2.txt.gz"; $h = gzopen($f, 'w'); -gzwrite($h, b'The first string.'); +gzwrite($h, 'The first string.'); var_dump(gzrewind($h)); -gzwrite($h, b'The second string.'); +gzwrite($h, 'The second string.'); gzclose($h); $h = gzopen($f, 'r'); diff --git a/ext/zlib/tests/gztell_basic2.phpt b/ext/zlib/tests/gztell_basic2.phpt index a8574eeaa6..d7a55895ef 100644 --- a/ext/zlib/tests/gztell_basic2.phpt +++ b/ext/zlib/tests/gztell_basic2.phpt @@ -15,7 +15,7 @@ $sizes = array(7, 22, 54, 17, 27, 15, 1000); var_dump(gztell($h)); foreach ($sizes as $size) { - echo "bytes written=".gzwrite($h, str_repeat(b'1', $size))."\n";; + echo "bytes written=".gzwrite($h, str_repeat('1', $size))."\n";; echo "tell=".gztell($h)."\n"; } diff --git a/ext/zlib/tests/gzwrite_variation1.phpt b/ext/zlib/tests/gzwrite_variation1.phpt index ab6c2606b4..bd3778e366 100644 --- a/ext/zlib/tests/gzwrite_variation1.phpt +++ b/ext/zlib/tests/gzwrite_variation1.phpt @@ -11,7 +11,7 @@ if (!extension_loaded("zlib")) { $filename = dirname(__FILE__)."/004.txt.gz"; $h = gzopen($filename, 'r'); -$str = b"Here is the string to be written. "; +$str = "Here is the string to be written. "; $length = 10; var_dump(gzwrite( $h, $str ) ); var_dump(gzread($h, 10)); diff --git a/ext/zlib/tests/readgzfile_basic.phpt b/ext/zlib/tests/readgzfile_basic.phpt index 5fd539e21c..09bcc4c534 100644 --- a/ext/zlib/tests/readgzfile_basic.phpt +++ b/ext/zlib/tests/readgzfile_basic.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('zlib')) die ('skip zlib extension not available in this b ?> --FILE-- <?php -$plaintxt = b<<<EOT +$plaintxt = <<<EOT hello world is a very common test for all languages diff --git a/ext/zlib/tests/readgzfile_basic2.phpt b/ext/zlib/tests/readgzfile_basic2.phpt index 5402f960c2..a835883aaa 100644 --- a/ext/zlib/tests/readgzfile_basic2.phpt +++ b/ext/zlib/tests/readgzfile_basic2.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('zlib')) die ('skip zlib extension not available in this b ?> --FILE-- <?php -$plaintxt = b<<<EOT +$plaintxt = <<<EOT hello world is a very common test for all languages diff --git a/ext/zlib/tests/zlib_filter_inflate2.phpt b/ext/zlib/tests/zlib_filter_inflate2.phpt index a2099b6f7a..de3d968959 100644 --- a/ext/zlib/tests/zlib_filter_inflate2.phpt +++ b/ext/zlib/tests/zlib_filter_inflate2.phpt @@ -6,7 +6,7 @@ zlib.inflate of gzip-encoded stream <?php /* $Id$ */ $a = gzopen(dirname(__FILE__) . '/test.txt.gz', 'w'); -fwrite($a, b"This is quite the thing ain't it\n"); +fwrite($a, "This is quite the thing ain't it\n"); fclose($a); $fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r'); |