com php-src: Remove the binary cast from unrelated tests: Zend/tests/ns_069.inc Zend/tests/ns_069.p hpt ext/dom/tests/bug40836.phpt ext/dom/tests/b
ug41374.phpt ext/mysqli/tests/mysqli_debug_ap pend.phpt ext/oci8/tests/xmltype_02.phpt ext/pc ntl/tests/pcntl_exec_2.phpt ext/phar/tests/009 .phpt
ext/simplexml/tests/bug37386.phpt ext/s implexml/tests/sxe_001.phpt ext/simplexml/tests/sxe _002.phpt ext/simplexml/tests/sxe_003.php t
ext/simplexml/tests/sxe_004
| From: | Nikita Popov | Date: | Sun, 20 Nov 2016 20:11:53 +0000 |
| Subject: | com php-src: Remove the binary cast from unrelated tests: Zend/tests/ns_069.inc Zend/tests/ns_069.p hpt ext/dom/tests/bug40836.phpt ext/dom/tests/b ug41374.phpt ext/mysqli/tests/mysqli_debug_ap pend.phpt ext/oci8/tests/xmltype_02.phpt ext/pc ntl/tests/pcntl_exec_2.phpt ext/phar/tests/009 .phpt ext/simplexml/tests/bug37386.phpt ext/s implexml/tests/sxe_001.phpt ext/simplexml/tests/sxe _002.phpt ext/simplexml/tests/sxe_003.php t ext/simplexml/tests/sxe_004 |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95912@lists.php.net to get a copy of this message | ||
Commit: 617dcf1b37ed43bba35e5f720383addb8ae7c562
Author: Pedro Magalhães <mail@pmmaga.net> Sun, 20 Nov 2016 18:37:06 +0100
Committer: Nikita Popov <nikic@php.net> Sun, 20 Nov 2016 21:11:53 +0100
Parents: 9c5af4e4cb2f1cadc659542dad8967e9fd05f1d4
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=617dcf1b37ed43bba35e5f720383addb8ae7c562
Log:
Remove the binary cast from unrelated tests
Changed paths:
M Zend/tests/ns_069.inc
M Zend/tests/ns_069.phpt
M ext/dom/tests/bug40836.phpt
M ext/dom/tests/bug41374.phpt
M ext/mysqli/tests/mysqli_debug_append.phpt
M ext/oci8/tests/xmltype_02.phpt
M ext/pcntl/tests/pcntl_exec_2.phpt
M ext/phar/tests/009.phpt
M ext/simplexml/tests/bug37386.phpt
M ext/simplexml/tests/sxe_001.phpt
M ext/simplexml/tests/sxe_002.phpt
M ext/simplexml/tests/sxe_003.phpt
M ext/simplexml/tests/sxe_004.phpt
M ext/simplexml/tests/sxe_005.phpt
M ext/standard/tests/file/bug27508.phpt
M ext/standard/tests/file/bug60120.phpt
M ext/standard/tests/file/disk_free_space_basic.phpt
M ext/standard/tests/file/disk_free_space_error.phpt
M ext/standard/tests/file/disk_total_space_basic..phpt
M ext/standard/tests/file/disk_total_space_error.phpt
M ext/standard/tests/file/file_put_contents_variation4.phpt
M ext/standard/tests/file/file_put_contents_variation5.phpt
M ext/standard/tests/file/file_put_contents_variation6.phpt
M ext/standard/tests/file/file_variation.phpt
M ext/standard/tests/file/filesize_variation3-win32.phpt
M ext/standard/tests/file/fopen_variation12.phpt
M ext/standard/tests/file/fopen_variation16.phpt
M ext/standard/tests/file/fopen_variation17.phpt
M ext/standard/tests/file/fopen_variation5.phpt
M ext/standard/tests/file/fopen_variation7.phpt
M ext/standard/tests/file/fopen_variation8.phpt
M ext/standard/tests/file/fopen_variation9.phpt
M ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt
M ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt
M ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt
M ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt
M ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt
M ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt
M ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt
M ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt
M ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt
M ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt
M ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt
M ext/standard/tests/file/ftruncate_error.phpt
M ext/standard/tests/file/lstat_stat_variation7.phpt
M ext/standard/tests/file/popen_pclose_basic.phpt
M ext/standard/tests/file/userstreams.phpt
M ext/standard/tests/network/inet.phpt
M ext/standard/tests/streams/proc_open_bug60120.phpt
M ext/standard/tests/streams/proc_open_bug64438.phpt
M ext/standard/tests/strings/bug40915.phpt
M ext/standard/tests/strings/convert_cyr_string.phpt
M ext/standard/tests/strings/str_getcsv_001.phpt
diff --git a/Zend/tests/ns_069.inc b/Zend/tests/ns_069.inc index 4f18639..46d8f8f 100644 --- a/Zend/tests/ns_069.inc +++ b/Zend/tests/ns_069.inc @@ -1,3 +1,3 @@ <?php -var_dump((binary)__NAMESPACE__); +var_dump(__NAMESPACE__); diff --git a/Zend/tests/ns_069.phpt b/Zend/tests/ns_069.phpt index 63269d0..cbfb927 100644 --- a/Zend/tests/ns_069.phpt +++ b/Zend/tests/ns_069.phpt @@ -7,9 +7,9 @@ namespace foo; class Test { static function f() { - var_dump((binary)__NAMESPACE__); + var_dump(__NAMESPACE__); include __DIR__ . '/ns_069.inc'; - var_dump((binary)__NAMESPACE__); + var_dump(__NAMESPACE__); } } diff --git a/ext/dom/tests/bug40836.phpt b/ext/dom/tests/bug40836.phpt index b96b39c..311b5b8 100644 --- a/ext/dom/tests/bug40836.phpt +++ b/ext/dom/tests/bug40836.phpt @@ -6,7 +6,7 @@ Bug #40836 (Segfault in insertBefore) <?php $dom = new DOMDocument("1.0", "UTF-8"); $dom->preserveWhiteSpace = false; -$xml = (binary)'<?xml version="1.0" encoding="utf-8"?> +$xml = '<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <entry xmlns="http://www.w3.org/2005/Atom"> <updated>2007-02-14T00:00:00+01:00</updated> diff --git a/ext/dom/tests/bug41374.phpt b/ext/dom/tests/bug41374.phpt index 21fc345..e2d4aa9 100644 --- a/ext/dom/tests/bug41374.phpt +++ b/ext/dom/tests/bug41374.phpt @@ -4,7 +4,7 @@ Bug #41374 (wholetext concats values of wrong nodes) <?php require_once('skipif.inc'); ?> --FILE-- <?php -$xml = (binary)<<<EOXML +$xml = <<<EOXML <?xml version="1.0" encoding="ISO-8859-1" ?> <root>foo<child />baz</root> EOXML; diff --git a/ext/mysqli/tests/mysqli_debug_append.phpt b/ext/mysqli/tests/mysqli_debug_append.phpt index f916995..fbb0d0a 100644 --- a/ext/mysqli/tests/mysqli_debug_append.phpt +++ b/ext/mysqli/tests/mysqli_debug_append.phpt @@ -46,7 +46,7 @@ if (!$IS_MYSQLND) printf("[004] Cannot create trace file to test append mode\n"); } else { - if (!fwrite($fp, (binary) 'mysqli_debug.phpt test line')) + if (!fwrite($fp, 'mysqli_debug.phpt test line')) printf("[005] Cannot write to trace file.\n"); fclose($fp); diff --git a/ext/oci8/tests/xmltype_02.phpt b/ext/oci8/tests/xmltype_02.phpt index 28e9401..b3934b3 100644 --- a/ext/oci8/tests/xmltype_02.phpt +++ b/ext/oci8/tests/xmltype_02.phpt @@ -69,7 +69,7 @@ var_dump($row); echo "Test 2 Manipulate the data using SimpleXML\n"; -$sx = simplexml_load_string((binary)$row[0]->load()); +$sx = simplexml_load_string($row[0]->load()); $row[0]->free(); var_dump($sx); diff --git a/ext/pcntl/tests/pcntl_exec_2.phpt b/ext/pcntl/tests/pcntl_exec_2.phpt index 95214bc..5383593 100644 --- a/ext/pcntl/tests/pcntl_exec_2.phpt +++ b/ext/pcntl/tests/pcntl_exec_2.phpt @@ -10,7 +10,7 @@ if (!getenv("TEST_PHP_EXECUTABLE") || !is_executable(getenv("TEST_PHP_EXECUTABLE --FILE-- <?php if (getenv("PCNTL_EXEC_TEST_IS_CHILD")) { - var_dump((binary)getenv("FOO")); + var_dump(getenv("FOO")); exit; } echo "ok\n"; diff --git a/ext/phar/tests/009.phpt b/ext/phar/tests/009.phpt index 7f55f39..d2570fb 100644 --- a/ext/phar/tests/009.phpt +++ b/ext/phar/tests/009.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 $file = "<?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?>"; -$file .= (binary) pack(b'VVnVVV', 500, 500, 0x1000, 0x00000000, 0, 0) . (binary) str_repeat((binary)'A', 500); +$file .= pack('VVnVVV', 500, 500, 0x1000, 0x00000000, 0, 0) . str_repeat('A', 500); file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file); try { include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; diff --git a/ext/simplexml/tests/bug37386.phpt b/ext/simplexml/tests/bug37386.phpt index cf86906..06b69c4 100644 --- a/ext/simplexml/tests/bug37386.phpt +++ b/ext/simplexml/tests/bug37386.phpt @@ -5,7 +5,7 @@ Bug #39760 (autocreating element doesn't assign value to first node) --FILE-- <?php -$sx1 = new SimpleXMLElement((binary)"<root />"); +$sx1 = new SimpleXMLElement("<root />"); $sx1->node[0] = 'node1'; $sx1->node[1] = 'node2'; diff --git a/ext/simplexml/tests/sxe_001.phpt b/ext/simplexml/tests/sxe_001.phpt index bb93eea..be293ef 100644 --- a/ext/simplexml/tests/sxe_001.phpt +++ b/ext/simplexml/tests/sxe_001.phpt @@ -25,7 +25,7 @@ $xml =<<<EOF </sxe> EOF; -var_dump(simplexml_load_string((binary)$xml, 'SimpleXMLIterator')); +var_dump(simplexml_load_string($xml, 'SimpleXMLIterator')); ?> ===DONE=== diff --git a/ext/simplexml/tests/sxe_002.phpt b/ext/simplexml/tests/sxe_002.phpt index b937b01..aff3f83 100644 --- a/ext/simplexml/tests/sxe_002.phpt +++ b/ext/simplexml/tests/sxe_002.phpt @@ -35,7 +35,7 @@ $xml =<<<EOF </sxe> EOF; -$sxe = simplexml_load_string((binary)$xml, 'SimpleXMLIterator'); +$sxe = simplexml_load_string($xml, 'SimpleXMLIterator'); foreach(new RecursiveIteratorIterator($sxe, 1) as $name => $data) { var_dump($name); diff --git a/ext/simplexml/tests/sxe_003.phpt b/ext/simplexml/tests/sxe_003.phpt index 58c7523..8a45071 100644 --- a/ext/simplexml/tests/sxe_003.phpt +++ b/ext/simplexml/tests/sxe_003.phpt @@ -35,7 +35,7 @@ $xml =<<<EOF </sxe> EOF; -$sxe = simplexml_load_string((binary)$xml, 'SimpleXMLIterator'); +$sxe = simplexml_load_string($xml, 'SimpleXMLIterator'); foreach($sxe->getChildren() as $name => $data) { var_dump($name); diff --git a/ext/simplexml/tests/sxe_004.phpt b/ext/simplexml/tests/sxe_004.phpt index 20431de..ac4bcd8 100644 --- a/ext/simplexml/tests/sxe_004.phpt +++ b/ext/simplexml/tests/sxe_004.phpt @@ -74,7 +74,7 @@ class SXETest extends SimpleXMLIterator } } -$sxe = new SXETest((binary)$xml); +$sxe = new SXETest($xml); $rit = new RecursiveIteratorIterator($sxe, RecursiveIteratorIterator::SELF_FIRST); foreach($rit as $data) { diff --git a/ext/simplexml/tests/sxe_005.phpt b/ext/simplexml/tests/sxe_005.phpt index 183d351..8763085 100644 --- a/ext/simplexml/tests/sxe_005.phpt +++ b/ext/simplexml/tests/sxe_005.phpt @@ -26,7 +26,7 @@ class SXETest extends SimpleXMLIterator } } -$sxe = new SXETest((binary)$xml); +$sxe = new SXETest($xml); var_dump(count($sxe)); var_dump(count($sxe->elem1)); diff --git a/ext/standard/tests/file/bug27508.phpt b/ext/standard/tests/file/bug27508.phpt index 361095d..26959ec 100644 --- a/ext/standard/tests/file/bug27508.phpt +++ b/ext/standard/tests/file/bug27508.phpt @@ -46,7 +46,7 @@ stream_wrapper_register("myFile", "FileStream") or die("Failed to register protocol"); $tmp_dir = __DIR__; -$tn = (binary) tempnam($tmp_dir, 'foo'); +$tn = tempnam($tmp_dir, 'foo'); if (!$tn) { die("tempnam failed"); } diff --git a/ext/standard/tests/file/bug60120.phpt b/ext/standard/tests/file/bug60120.phpt index 8915bb8..776a6d4 100644 --- a/ext/standard/tests/file/bug60120.phpt +++ b/ext/standard/tests/file/bug60120.phpt @@ -49,7 +49,7 @@ while ($pipes || $writePipes) { } if ($w) { - $written = fwrite($writePipes[0], (binary)substr($stdin, $stdinOffset), 8192); + $written = fwrite($writePipes[0], substr($stdin, $stdinOffset), 8192); if (false !== $written) { $stdinOffset += $written; } diff --git a/ext/standard/tests/file/disk_free_space_basic.phpt b/ext/standard/tests/file/disk_free_space_basic.phpt index 2904ff9..57446b6 100644 --- a/ext/standard/tests/file/disk_free_space_basic.phpt +++ b/ext/standard/tests/file/disk_free_space_basic.phpt @@ -30,7 +30,7 @@ var_dump( $space1 ); $fh = fopen($file_path.$dir."/disk_free_space.tmp", "a"); $data = str_repeat("x", 0xffff); -fwrite($fh, (binary)$data); +fwrite($fh, $data); fclose($fh); echo "\n Free Space after writing to a file\n"; diff --git a/ext/standard/tests/file/disk_free_space_error.phpt b/ext/standard/tests/file/disk_free_space_error.phpt index ddd25a3..ab2ad09 100644 --- a/ext/standard/tests/file/disk_free_space_error.phpt +++ b/ext/standard/tests/file/disk_free_space_error.phpt @@ -27,7 +27,7 @@ var_dump( disk_free_space( $file_path."/dir1" )); // Invalid directory var_dump( diskfreespace( $file_path."/dir1" )); $fh = fopen( $file_path."/disk_free_space.tmp", "w" ); -fwrite( $fh, (binary)" Garbage data for the temporary file" ); +fwrite( $fh, " Garbage data for the temporary file" ); var_dump( disk_free_space( $file_path."/disk_free_space.tmp" )); // file input instead of directory var_dump( diskfreespace( $file_path."/disk_free_space.tmp" )); fclose($fh); diff --git a/ext/standard/tests/file/disk_total_space_basic.phpt b/ext/standard/tests/file/disk_total_space_basic.phpt index d211f39..cfef2a4 100644 --- a/ext/standard/tests/file/disk_total_space_basic.phpt +++ b/ext/standard/tests/file/disk_total_space_basic.phpt @@ -20,7 +20,7 @@ $dir = "/disk_total_space"; mkdir($file_path.$dir); var_dump( disk_total_space($file_path.$dir) ); $fh = fopen($file_path.$dir."/disk_total_space.tmp", "w"); -fwrite($fh, (binary)"Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data"); +fwrite($fh, "Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data"); fclose($fh); diff --git a/ext/standard/tests/file/disk_total_space_error.phpt b/ext/standard/tests/file/disk_total_space_error.phpt index d986f77..b60ad60 100644 --- a/ext/standard/tests/file/disk_total_space_error.phpt +++ b/ext/standard/tests/file/disk_total_space_error.phpt @@ -24,7 +24,7 @@ var_dump( disk_total_space( $file_path, "extra argument") ); // More than valid var_dump( disk_total_space( $file_path."/dir1" )); // Invalid directory $fh = fopen( $file_path."/disk_total_space.tmp", "w" ); -fwrite( $fh, (binary)" Garbage data for the temporary file" ); +fwrite( $fh, " Garbage data for the temporary file" ); var_dump( disk_total_space( $file_path."/disk_total_space.tmp" )); // file input instead of directory fclose($fh); diff --git a/ext/standard/tests/file/file_put_contents_variation4.phpt b/ext/standard/tests/file/file_put_contents_variation4.phpt index d919c4a..62d814c 100644 --- a/ext/standard/tests/file/file_put_contents_variation4.phpt +++ b/ext/standard/tests/file/file_put_contents_variation4.phpt @@ -37,7 +37,7 @@ function runtest() { global $filename; //correct php53 behaviour is to ingnore the FILE_USE_INCLUDE_PATH unless the file alread exists // in the include path. In this case it doesn't so the file should be written in the current dir. - file_put_contents($filename, (binary) "File in include path", FILE_USE_INCLUDE_PATH); + file_put_contents($filename, "File in include path", FILE_USE_INCLUDE_PATH); $line = file_get_contents($filename); echo "$line\n"; unlink($filename); diff --git a/ext/standard/tests/file/file_put_contents_variation5.phpt b/ext/standard/tests/file/file_put_contents_variation5.phpt index baaa7a6..fe1961d 100644 --- a/ext/standard/tests/file/file_put_contents_variation5.phpt +++ b/ext/standard/tests/file/file_put_contents_variation5.phpt @@ -30,7 +30,7 @@ rmdir($thisTestDir); function runtest() { global $scriptLocFile, $filename; - file_put_contents($filename, (binary) "File written in working directory", FILE_USE_INCLUDE_PATH); + file_put_contents($filename, "File written in working directory", FILE_USE_INCLUDE_PATH); if(file_exists($scriptLocFile)) { echo "Fail - this is PHP52 behaviour\n"; unlink($scriptLocFile); diff --git a/ext/standard/tests/file/file_put_contents_variation6.phpt b/ext/standard/tests/file/file_put_contents_variation6.phpt index aaea612..a0977fa 100644 --- a/ext/standard/tests/file/file_put_contents_variation6.phpt +++ b/ext/standard/tests/file/file_put_contents_variation6.phpt @@ -40,8 +40,8 @@ function runtest() { //correct php53 behaviour is to ignore the FILE_USE_INCLUDE_PATH unless the file already exists // in the include path. In this case it doesn't so the file should be written in the current dir. - file_put_contents($filename, (binary) "File in include path", FILE_USE_INCLUDE_PATH); - file_put_contents($filename, (binary) ". This was appended", FILE_USE_INCLUDE_PATH | FILE_APPEND); + file_put_contents($filename, "File in include path", FILE_USE_INCLUDE_PATH); + file_put_contents($filename, ". This was appended", FILE_USE_INCLUDE_PATH | FILE_APPEND); $line = file_get_contents($filename); echo "$line\n"; unlink($filename); diff --git a/ext/standard/tests/file/file_variation.phpt b/ext/standard/tests/file/file_variation.phpt index 512d5f3..506575f 100644 --- a/ext/standard/tests/file/file_variation.phpt +++ b/ext/standard/tests/file/file_variation.phpt @@ -16,7 +16,7 @@ $file_path = dirname(__FILE__); foreach( $data_array as $data ) { echo "--Iteration $count --\n"; $fh = fopen($file_path."/file_variation.tmp", "w"); - fwrite($fh, (binary)$data); + fwrite($fh, $data); var_dump( file($file_path."/file_variation.tmp", FILE_IGNORE_NEW_LINES) ); var_dump( file($file_path."/file_variation.tmp", FILE_SKIP_EMPTY_LINES) ); $count++; @@ -35,7 +35,7 @@ var_dump( file($file_path1."/file1_variation.tmp", 1) ); echo "*** Using file function to remove line containing a key string ***\n"; $file_handle = fopen($file_path."/file2_variation.tmp", "w"); $key = "SEARCH_KEY"; -fwrite( $file_handle, (binary)"The key string to be searched is SEARCH_KEY\nLine without key string\nThe key string to be searched is SEARCH_KEY" ); +fwrite( $file_handle,"The key string to be searched is SEARCH_KEY\nLine without key string\nThe key string to be searched is SEARCH_KEY" ); $out_array = file($file_path."/file2_variation.tmp"); echo "File contents in array form Before replacement of the key\n"; diff --git a/ext/standard/tests/file/filesize_variation3-win32.phpt b/ext/standard/tests/file/filesize_variation3-win32.phpt index ab38c7d..94ba6f4 100644 --- a/ext/standard/tests/file/filesize_variation3-win32.phpt +++ b/ext/standard/tests/file/filesize_variation3-win32.phpt @@ -18,7 +18,7 @@ $file_path = dirname(__FILE__); echo "*** Testing filesize(): usage variations ***\n"; $filename = $file_path."/filesize_variation3.tmp"; $file_handle = fopen($filename, "w"); -fwrite($file_handle, (binary)str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes +fwrite($file_handle, str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes fclose($file_handle); echo "-- Testing filesize() after truncating the file to a new length --\n"; diff --git a/ext/standard/tests/file/fopen_variation12.phpt b/ext/standard/tests/file/fopen_variation12.phpt index 9df4490..c207ec1 100644 --- a/ext/standard/tests/file/fopen_variation12.phpt +++ b/ext/standard/tests/file/fopen_variation12.phpt @@ -18,7 +18,7 @@ restore_include_path(); function testme() { $tmpfile = basename(__FILE__, ".php") . ".tmp"; $h = fopen($tmpfile, "w", true); - fwrite($h, (binary) "This is the test file"); + fwrite($h, "This is the test file"); fclose($h); diff --git a/ext/standard/tests/file/fopen_variation16.phpt b/ext/standard/tests/file/fopen_variation16.phpt index e14f2e1..8b793f7 100644 --- a/ext/standard/tests/file/fopen_variation16.phpt +++ b/ext/standard/tests/file/fopen_variation16.phpt @@ -40,7 +40,7 @@ function runtest() { $tmpfile = $extraDir.'/fopen_variation16.tmp'; $h = fopen($tmpfile, "w+", true); - fwrite($h, (binary) "This is the test file"); + fwrite($h, "This is the test file"); fclose($h); $h = @fopen($dir1.'/'.$tmpfile, "r"); diff --git a/ext/standard/tests/file/fopen_variation17.phpt b/ext/standard/tests/file/fopen_variation17.phpt index 8abae0f..461807d 100644 --- a/ext/standard/tests/file/fopen_variation17.phpt +++ b/ext/standard/tests/file/fopen_variation17.phpt @@ -39,7 +39,7 @@ function runtest() { $tmpfile = $extraDir . '/' . basename(__FILE__, ".php") . ".tmp"; $h = fopen($tmpfile, "w+", true); - fwrite($h, (binary) "This is the test file"); + fwrite($h, "This is the test file"); fclose($h); $h = @fopen($dir1.'/'.$tmpfile, "r"); diff --git a/ext/standard/tests/file/fopen_variation5.phpt b/ext/standard/tests/file/fopen_variation5.phpt index 975560f..1fccbb7 100644 --- a/ext/standard/tests/file/fopen_variation5.phpt +++ b/ext/standard/tests/file/fopen_variation5.phpt @@ -63,7 +63,7 @@ function test_fopen($mode) { // create a file in the middle directory $h = fopen($secondFile, "w"); - fwrite($h, (binary) "in dir2"); + fwrite($h, "in dir2"); fclose($h); echo "\n** testing with mode=$mode **\n"; @@ -75,7 +75,7 @@ function test_fopen($mode) { //create a file in dir1 $h = fopen($firstFile, "w"); - fwrite($h, (binary) "in dir1"); + fwrite($h, "in dir1"); fclose($h); //should now read dir1 file @@ -86,7 +86,7 @@ function test_fopen($mode) { // create a file in working directory $h = fopen($filename, "w"); - fwrite($h, (binary) "in working dir"); + fwrite($h, "in working dir"); fclose($h); //should still read dir1 file @@ -106,7 +106,7 @@ function test_fopen($mode) { // create a file in the script directory $h = fopen($scriptFile, "w"); - fwrite($h, (binary) "in script dir"); + fwrite($h, "in script dir"); fclose($h); //should read the file in script dir diff --git a/ext/standard/tests/file/fopen_variation7.phpt b/ext/standard/tests/file/fopen_variation7.phpt index 13f075c..f5c1048c 100644 --- a/ext/standard/tests/file/fopen_variation7.phpt +++ b/ext/standard/tests/file/fopen_variation7.phpt @@ -32,7 +32,7 @@ function runtest() { global $dir1; $tmpfile = basename(__FILE__, ".php") . ".tmp"; $h = fopen($tmpfile, "w", true); - fwrite($h, (binary)"This is the test file"); + fwrite($h, "This is the test file"); fclose($h); diff --git a/ext/standard/tests/file/fopen_variation8.phpt b/ext/standard/tests/file/fopen_variation8.phpt index dd95014..eecaec7 100644 --- a/ext/standard/tests/file/fopen_variation8.phpt +++ b/ext/standard/tests/file/fopen_variation8.phpt @@ -62,7 +62,7 @@ function test_fopen($mode) { // create a file in the middle directory $h = fopen($secondFile, "w"); - fwrite($h, (binary) "in dir2"); + fwrite($h, "in dir2"); fclose($h); echo "\n** testing with mode=$mode **\n"; @@ -74,7 +74,7 @@ function test_fopen($mode) { //create a file in dir1 $h = fopen($firstFile, "w"); - fwrite($h, (binary) "in dir1"); + fwrite($h, "in dir1"); fclose($h); //should now read dir1 file @@ -85,7 +85,7 @@ function test_fopen($mode) { // create a file in working directory $h = fopen($filename, "w"); - fwrite($h, (binary) "in working dir"); + fwrite($h, "in working dir"); fclose($h); //should read the dir1 file @@ -105,7 +105,7 @@ function test_fopen($mode) { // create a file in the script directory $h = fopen($scriptFile, "w"); - fwrite($h, (binary) "in script dir"); + fwrite($h, "in script dir"); fclose($h); //should read the file in script dir diff --git a/ext/standard/tests/file/fopen_variation9.phpt b/ext/standard/tests/file/fopen_variation9.phpt index 4b0a727..5d1ca13 100644 --- a/ext/standard/tests/file/fopen_variation9.phpt +++ b/ext/standard/tests/file/fopen_variation9.phpt @@ -32,7 +32,7 @@ rmdir($thisTestDir); function runtest() { $tmpfile = basename(__FILE__, ".php") . ".tmp"; $h = fopen($tmpfile, "w", true); - fwrite($h, (binary) "This is the test file"); + fwrite($h, "This is the test file"); fclose($h); diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt index ab983a2..1bd95c3 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt @@ -49,7 +49,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); // set file pointer to 0 var_dump( rewind($file_handle) ); // set to beginning of file diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt index 915ab0e..e25ebe0 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt @@ -49,7 +49,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); // set file pointer to 0 var_dump( rewind($file_handle) ); // set to beginning of file diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt index 63d0edd..ede0c43 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt @@ -48,7 +48,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); // set file pointer to 0 var_dump( rewind($file_handle) ); // set to beginning of file diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt index ad01c3a..cb51150 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt @@ -48,7 +48,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); echo "-- Testing fseek() without using argument whence --\n"; diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt index 67987cb..c2179fc 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt @@ -48,7 +48,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); echo "-- Testing fseek() without using argument whence --\n"; diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt index 09c8344..1bb55b5 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt @@ -47,7 +47,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); foreach($offset as $count){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt index e4029c7..3c84f3e 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt @@ -47,7 +47,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); foreach($offset as $count){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt index d451912..8c84e7e 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt @@ -47,7 +47,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); foreach($offset as $count){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt index 4451988..4de9b3f 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt @@ -47,7 +47,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); foreach($offset as $count){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt index 5586e2b..c6ba6c4 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt @@ -48,7 +48,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); foreach($offset as $count){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt index a2a0d67..b4a0fa9 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt @@ -48,7 +48,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); foreach($offset as $count){ diff --git a/ext/standard/tests/file/ftruncate_error.phpt b/ext/standard/tests/file/ftruncate_error.phpt index 40dcf4c..3ccd32a 100644 --- a/ext/standard/tests/file/ftruncate_error.phpt +++ b/ext/standard/tests/file/ftruncate_error.phpt @@ -11,7 +11,7 @@ echo "*** Testing ftruncate() : error conditions ***\n"; $filename = dirname(__FILE__)."/ftruncate_error.tmp"; $file_handle = fopen($filename, "w" ); -fwrite($file_handle, (binary)"Testing ftruncate error conditions \n"); +fwrite($file_handle, "Testing ftruncate error conditions \n"); fflush($file_handle); echo "\n Initial file size = ".filesize($filename)."\n"; diff --git a/ext/standard/tests/file/lstat_stat_variation7.phpt b/ext/standard/tests/file/lstat_stat_variation7.phpt index 2296193..5a1e1c3 100644 --- a/ext/standard/tests/file/lstat_stat_variation7.phpt +++ b/ext/standard/tests/file/lstat_stat_variation7.phpt @@ -29,7 +29,7 @@ echo "*** Testing stat() on file after data is written in it ***\n"; $fh = fopen($file_name,"w"); $old_stat = stat($file_name); clearstatcache(); -fwrite($fh, str_repeat((binary)"Hello World", $old_stat['blksize'])); +fwrite($fh, str_repeat("Hello World", $old_stat['blksize'])); $new_stat = stat($file_name); // compare self stats diff --git a/ext/standard/tests/file/popen_pclose_basic.phpt b/ext/standard/tests/file/popen_pclose_basic.phpt index 9812193..55a87bb 100644 --- a/ext/standard/tests/file/popen_pclose_basic.phpt +++ b/ext/standard/tests/file/popen_pclose_basic.phpt @@ -47,8 +47,8 @@ $file_handle = popen("sort", "w"); $counter = 0; $newline = "\n"; foreach($arr as $str) { - fwrite($file_handle, (binary)$str); - fwrite($file_handle, (binary)$newline); + fwrite($file_handle, $str); + fwrite($file_handle, $newline); } pclose($file_handle); diff --git a/ext/standard/tests/file/userstreams.phpt b/ext/standard/tests/file/userstreams.phpt index d39898b..0e649e9 100644 --- a/ext/standard/tests/file/userstreams.phpt +++ b/ext/standard/tests/file/userstreams.phpt @@ -67,7 +67,7 @@ for ($i = 0; $i < 30; $i++) { /* store the data in a regular file so that we can compare * the results */ $tf = tmpfile(); -fwrite($tf, (binary)$DATA); +fwrite($tf, $DATA); $n = ftell($tf); rewind($tf) or die("failed to rewind tmp file!"); if (ftell($tf) != 0) diff --git a/ext/standard/tests/network/inet.phpt b/ext/standard/tests/network/inet.phpt index d2dcbb4..6e9a155 100644 --- a/ext/standard/tests/network/inet.phpt +++ b/ext/standard/tests/network/inet.phpt @@ -9,10 +9,10 @@ if (!function_exists("inet_pton")) die("skip no inet_pton()"); <?php $packed = chr(127) . chr(0) . chr(0) . chr(1); -var_dump(inet_ntop((binary)$packed)); +var_dump(inet_ntop($packed)); $packed = chr(255) . chr(255) . chr(255) . chr(0); -var_dump(inet_ntop((binary)$packed)); +var_dump(inet_ntop($packed)); var_dump(inet_ntop()); var_dump(inet_ntop(-1)); diff --git a/ext/standard/tests/streams/proc_open_bug60120.phpt b/ext/standard/tests/streams/proc_open_bug60120.phpt index 8768257..4587f07 100644 --- a/ext/standard/tests/streams/proc_open_bug60120.phpt +++ b/ext/standard/tests/streams/proc_open_bug60120.phpt @@ -38,7 +38,7 @@ while ($pipes || $writePipes) { } if ($w) { - $written = fwrite($writePipes[0], (binary)substr($stdin, $stdinOffset), 8192); + $written = fwrite($writePipes[0], substr($stdin, $stdinOffset), 8192); if (false !== $written) { $stdinOffset += $written; } diff --git a/ext/standard/tests/streams/proc_open_bug64438.phpt b/ext/standard/tests/streams/proc_open_bug64438.phpt index b3857d0..747f117 100644 --- a/ext/standard/tests/streams/proc_open_bug64438.phpt +++ b/ext/standard/tests/streams/proc_open_bug64438.phpt @@ -38,7 +38,7 @@ while ($pipes || $writePipes) { } if ($w) { - $written = fwrite($writePipes[0], (binary)substr($stdin, $stdinOffset), 8192); + $written = fwrite($writePipes[0], substr($stdin, $stdinOffset), 8192); if (false !== $written) { $stdinOffset += $written; } diff --git a/ext/standard/tests/strings/bug40915.phpt b/ext/standard/tests/strings/bug40915.phpt index e3a501a..88674ee 100644 Binary files a/ext/standard/tests/strings/bug40915.phpt and b/ext/standard/tests/strings/bug40915.phpt differ diff --git a/ext/standard/tests/strings/convert_cyr_string.phpt b/ext/standard/tests/strings/convert_cyr_string.phpt index 0b4db25..b62768e 100644 --- a/ext/standard/tests/strings/convert_cyr_string.phpt +++ b/ext/standard/tests/strings/convert_cyr_string.phpt @@ -9,13 +9,13 @@ var_dump(convert_cyr_string("", "")); var_dump(convert_cyr_string("", "", "")); var_dump(convert_cyr_string(array(), array(), array())); -var_dump(convert_cyr_string((binary)"[[[[[[", "q", "m")); -var_dump(convert_cyr_string((binary)"[[[[[[", "k", "w")); -var_dump(convert_cyr_string((binary)"[[[[[[", "m", "a")); -var_dump(convert_cyr_string((binary)"[[[[[[", "d", "i")); -var_dump(convert_cyr_string((binary)"[[[[[[", "w", "k")); -var_dump(convert_cyr_string((binary)"[[[[[[", "i", "q")); -var_dump(convert_cyr_string((binary)"", "d", "i")); +var_dump(convert_cyr_string("[[[[[[", "q", "m")); +var_dump(convert_cyr_string("[[[[[[", "k", "w")); +var_dump(convert_cyr_string("[[[[[[", "m", "a")); +var_dump(convert_cyr_string("[[[[[[", "d", "i")); +var_dump(convert_cyr_string("[[[[[[", "w", "k")); +var_dump(convert_cyr_string("[[[[[[", "i", "q")); +var_dump(convert_cyr_string("", "d", "i")); echo "Done\n"; ?> diff --git a/ext/standard/tests/strings/str_getcsv_001.phpt b/ext/standard/tests/strings/str_getcsv_001.phpt index 23c6faf..becff21 100644 --- a/ext/standard/tests/strings/str_getcsv_001.phpt +++ b/ext/standard/tests/strings/str_getcsv_001.phpt @@ -18,7 +18,7 @@ var_dump(str_getcsv('.foo..bar.', '.', '.', '.')); print "-----\n"; var_dump(str_getcsv('.foo. .bar.', ' ', '.', '.')); print "-----\n"; -var_dump(str_getcsv((binary)'1foo1 1bar111', (binary)' ', (binary)'1 ', (binary) '\ ')); +var_dump(str_getcsv('1foo1 1bar111', ' ', '1 ', '\ ')); print "-----\n"; var_dump(str_getcsv('.foo . . bar .', ' ', '.', '')); print "-----\n";
diff --git a/Zend/tests/ns_069.inc b/Zend/tests/ns_069.inc index 4f18639..46d8f8f 100644 --- a/Zend/tests/ns_069.inc +++ b/Zend/tests/ns_069.inc @@ -1,3 +1,3 @@ <?php -var_dump((binary)__NAMESPACE__); +var_dump(__NAMESPACE__); diff --git a/Zend/tests/ns_069.phpt b/Zend/tests/ns_069.phpt index 63269d0..cbfb927 100644 --- a/Zend/tests/ns_069.phpt +++ b/Zend/tests/ns_069.phpt @@ -7,9 +7,9 @@ namespace foo; class Test { static function f() { - var_dump((binary)__NAMESPACE__); + var_dump(__NAMESPACE__); include __DIR__ . '/ns_069.inc'; - var_dump((binary)__NAMESPACE__); + var_dump(__NAMESPACE__); } } diff --git a/ext/dom/tests/bug40836.phpt b/ext/dom/tests/bug40836.phpt index b96b39c..311b5b8 100644 --- a/ext/dom/tests/bug40836.phpt +++ b/ext/dom/tests/bug40836.phpt @@ -6,7 +6,7 @@ Bug #40836 (Segfault in insertBefore) <?php $dom = new DOMDocument("1.0", "UTF-8"); $dom->preserveWhiteSpace = false; -$xml = (binary)'<?xml version="1.0" encoding="utf-8"?> +$xml = '<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <entry xmlns="http://www.w3.org/2005/Atom"> <updated>2007-02-14T00:00:00+01:00</updated> diff --git a/ext/dom/tests/bug41374.phpt b/ext/dom/tests/bug41374.phpt index 21fc345..e2d4aa9 100644 --- a/ext/dom/tests/bug41374.phpt +++ b/ext/dom/tests/bug41374.phpt @@ -4,7 +4,7 @@ Bug #41374 (wholetext concats values of wrong nodes) <?php require_once('skipif.inc'); ?> --FILE-- <?php -$xml = (binary)<<<EOXML +$xml = <<<EOXML <?xml version="1.0" encoding="ISO-8859-1" ?> <root>foo<child />baz</root> EOXML; diff --git a/ext/mysqli/tests/mysqli_debug_append.phpt b/ext/mysqli/tests/mysqli_debug_append.phpt index f916995..fbb0d0a 100644 --- a/ext/mysqli/tests/mysqli_debug_append.phpt +++ b/ext/mysqli/tests/mysqli_debug_append.phpt @@ -46,7 +46,7 @@ if (!$IS_MYSQLND) printf("[004] Cannot create trace file to test append mode\n"); } else { - if (!fwrite($fp, (binary) 'mysqli_debug.phpt test line')) + if (!fwrite($fp, 'mysqli_debug.phpt test line')) printf("[005] Cannot write to trace file.\n"); fclose($fp); diff --git a/ext/oci8/tests/xmltype_02.phpt b/ext/oci8/tests/xmltype_02.phpt index 28e9401..b3934b3 100644 --- a/ext/oci8/tests/xmltype_02.phpt +++ b/ext/oci8/tests/xmltype_02.phpt @@ -69,7 +69,7 @@ var_dump($row); echo "Test 2 Manipulate the data using SimpleXML\n"; -$sx = simplexml_load_string((binary)$row[0]->load()); +$sx = simplexml_load_string($row[0]->load()); $row[0]->free(); var_dump($sx); diff --git a/ext/pcntl/tests/pcntl_exec_2.phpt b/ext/pcntl/tests/pcntl_exec_2.phpt index 95214bc..5383593 100644 --- a/ext/pcntl/tests/pcntl_exec_2.phpt +++ b/ext/pcntl/tests/pcntl_exec_2.phpt @@ -10,7 +10,7 @@ if (!getenv("TEST_PHP_EXECUTABLE") || !is_executable(getenv("TEST_PHP_EXECUTABLE --FILE-- <?php if (getenv("PCNTL_EXEC_TEST_IS_CHILD")) { - var_dump((binary)getenv("FOO")); + var_dump(getenv("FOO")); exit; } echo "ok\n"; diff --git a/ext/phar/tests/009.phpt b/ext/phar/tests/009.phpt index 7f55f39..d2570fb 100644 --- a/ext/phar/tests/009.phpt +++ b/ext/phar/tests/009.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 $file = "<?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?>"; -$file .= (binary) pack(b'VVnVVV', 500, 500, 0x1000, 0x00000000, 0, 0) . (binary) str_repeat((binary)'A', 500); +$file .= pack('VVnVVV', 500, 500, 0x1000, 0x00000000, 0, 0) . str_repeat('A', 500); file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file); try { include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; diff --git a/ext/simplexml/tests/bug37386.phpt b/ext/simplexml/tests/bug37386.phpt index cf86906..06b69c4 100644 --- a/ext/simplexml/tests/bug37386.phpt +++ b/ext/simplexml/tests/bug37386.phpt @@ -5,7 +5,7 @@ Bug #39760 (autocreating element doesn't assign value to first node) --FILE-- <?php -$sx1 = new SimpleXMLElement((binary)"<root />"); +$sx1 = new SimpleXMLElement("<root />"); $sx1->node[0] = 'node1'; $sx1->node[1] = 'node2'; diff --git a/ext/simplexml/tests/sxe_001.phpt b/ext/simplexml/tests/sxe_001.phpt index bb93eea..be293ef 100644 --- a/ext/simplexml/tests/sxe_001.phpt +++ b/ext/simplexml/tests/sxe_001.phpt @@ -25,7 +25,7 @@ $xml =<<<EOF </sxe> EOF; -var_dump(simplexml_load_string((binary)$xml, 'SimpleXMLIterator')); +var_dump(simplexml_load_string($xml, 'SimpleXMLIterator')); ?> ===DONE=== diff --git a/ext/simplexml/tests/sxe_002.phpt b/ext/simplexml/tests/sxe_002.phpt index b937b01..aff3f83 100644 --- a/ext/simplexml/tests/sxe_002.phpt +++ b/ext/simplexml/tests/sxe_002.phpt @@ -35,7 +35,7 @@ $xml =<<<EOF </sxe> EOF; -$sxe = simplexml_load_string((binary)$xml, 'SimpleXMLIterator'); +$sxe = simplexml_load_string($xml, 'SimpleXMLIterator'); foreach(new RecursiveIteratorIterator($sxe, 1) as $name => $data) { var_dump($name); diff --git a/ext/simplexml/tests/sxe_003.phpt b/ext/simplexml/tests/sxe_003.phpt index 58c7523..8a45071 100644 --- a/ext/simplexml/tests/sxe_003.phpt +++ b/ext/simplexml/tests/sxe_003.phpt @@ -35,7 +35,7 @@ $xml =<<<EOF </sxe> EOF; -$sxe = simplexml_load_string((binary)$xml, 'SimpleXMLIterator'); +$sxe = simplexml_load_string($xml, 'SimpleXMLIterator'); foreach($sxe->getChildren() as $name => $data) { var_dump($name); diff --git a/ext/simplexml/tests/sxe_004.phpt b/ext/simplexml/tests/sxe_004.phpt index 20431de..ac4bcd8 100644 --- a/ext/simplexml/tests/sxe_004.phpt +++ b/ext/simplexml/tests/sxe_004.phpt @@ -74,7 +74,7 @@ class SXETest extends SimpleXMLIterator } } -$sxe = new SXETest((binary)$xml); +$sxe = new SXETest($xml); $rit = new RecursiveIteratorIterator($sxe, RecursiveIteratorIterator::SELF_FIRST); foreach($rit as $data) { diff --git a/ext/simplexml/tests/sxe_005.phpt b/ext/simplexml/tests/sxe_005.phpt index 183d351..8763085 100644 --- a/ext/simplexml/tests/sxe_005.phpt +++ b/ext/simplexml/tests/sxe_005.phpt @@ -26,7 +26,7 @@ class SXETest extends SimpleXMLIterator } } -$sxe = new SXETest((binary)$xml); +$sxe = new SXETest($xml); var_dump(count($sxe)); var_dump(count($sxe->elem1)); diff --git a/ext/standard/tests/file/bug27508.phpt b/ext/standard/tests/file/bug27508.phpt index 361095d..26959ec 100644 --- a/ext/standard/tests/file/bug27508.phpt +++ b/ext/standard/tests/file/bug27508.phpt @@ -46,7 +46,7 @@ stream_wrapper_register("myFile", "FileStream") or die("Failed to register protocol"); $tmp_dir = __DIR__; -$tn = (binary) tempnam($tmp_dir, 'foo'); +$tn = tempnam($tmp_dir, 'foo'); if (!$tn) { die("tempnam failed"); } diff --git a/ext/standard/tests/file/bug60120.phpt b/ext/standard/tests/file/bug60120.phpt index 8915bb8..776a6d4 100644 --- a/ext/standard/tests/file/bug60120.phpt +++ b/ext/standard/tests/file/bug60120.phpt @@ -49,7 +49,7 @@ while ($pipes || $writePipes) { } if ($w) { - $written = fwrite($writePipes[0], (binary)substr($stdin, $stdinOffset), 8192); + $written = fwrite($writePipes[0], substr($stdin, $stdinOffset), 8192); if (false !== $written) { $stdinOffset += $written; } diff --git a/ext/standard/tests/file/disk_free_space_basic.phpt b/ext/standard/tests/file/disk_free_space_basic.phpt index 2904ff9..57446b6 100644 --- a/ext/standard/tests/file/disk_free_space_basic.phpt +++ b/ext/standard/tests/file/disk_free_space_basic.phpt @@ -30,7 +30,7 @@ var_dump( $space1 ); $fh = fopen($file_path.$dir."/disk_free_space.tmp", "a"); $data = str_repeat("x", 0xffff); -fwrite($fh, (binary)$data); +fwrite($fh, $data); fclose($fh); echo "\n Free Space after writing to a file\n"; diff --git a/ext/standard/tests/file/disk_free_space_error.phpt b/ext/standard/tests/file/disk_free_space_error.phpt index ddd25a3..ab2ad09 100644 --- a/ext/standard/tests/file/disk_free_space_error.phpt +++ b/ext/standard/tests/file/disk_free_space_error.phpt @@ -27,7 +27,7 @@ var_dump( disk_free_space( $file_path."/dir1" )); // Invalid directory var_dump( diskfreespace( $file_path."/dir1" )); $fh = fopen( $file_path."/disk_free_space.tmp", "w" ); -fwrite( $fh, (binary)" Garbage data for the temporary file" ); +fwrite( $fh, " Garbage data for the temporary file" ); var_dump( disk_free_space( $file_path."/disk_free_space.tmp" )); // file input instead of directory var_dump( diskfreespace( $file_path."/disk_free_space.tmp" )); fclose($fh); diff --git a/ext/standard/tests/file/disk_total_space_basic.phpt b/ext/standard/tests/file/disk_total_space_basic.phpt index d211f39..cfef2a4 100644 --- a/ext/standard/tests/file/disk_total_space_basic.phpt +++ b/ext/standard/tests/file/disk_total_space_basic.phpt @@ -20,7 +20,7 @@ $dir = "/disk_total_space"; mkdir($file_path.$dir); var_dump( disk_total_space($file_path.$dir) ); $fh = fopen($file_path.$dir."/disk_total_space.tmp", "w"); -fwrite($fh, (binary)"Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data"); +fwrite($fh, "Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data"); fclose($fh); diff --git a/ext/standard/tests/file/disk_total_space_error.phpt b/ext/standard/tests/file/disk_total_space_error.phpt index d986f77..b60ad60 100644 --- a/ext/standard/tests/file/disk_total_space_error.phpt +++ b/ext/standard/tests/file/disk_total_space_error.phpt @@ -24,7 +24,7 @@ var_dump( disk_total_space( $file_path, "extra argument") ); // More than valid var_dump( disk_total_space( $file_path."/dir1" )); // Invalid directory $fh = fopen( $file_path."/disk_total_space.tmp", "w" ); -fwrite( $fh, (binary)" Garbage data for the temporary file" ); +fwrite( $fh, " Garbage data for the temporary file" ); var_dump( disk_total_space( $file_path."/disk_total_space.tmp" )); // file input instead of directory fclose($fh); diff --git a/ext/standard/tests/file/file_put_contents_variation4.phpt b/ext/standard/tests/file/file_put_contents_variation4.phpt index d919c4a..62d814c 100644 --- a/ext/standard/tests/file/file_put_contents_variation4.phpt +++ b/ext/standard/tests/file/file_put_contents_variation4.phpt @@ -37,7 +37,7 @@ function runtest() { global $filename; //correct php53 behaviour is to ingnore the FILE_USE_INCLUDE_PATH unless the file alread exists // in the include path. In this case it doesn't so the file should be written in the current dir. - file_put_contents($filename, (binary) "File in include path", FILE_USE_INCLUDE_PATH); + file_put_contents($filename, "File in include path", FILE_USE_INCLUDE_PATH); $line = file_get_contents($filename); echo "$line\n"; unlink($filename); diff --git a/ext/standard/tests/file/file_put_contents_variation5.phpt b/ext/standard/tests/file/file_put_contents_variation5.phpt index baaa7a6..fe1961d 100644 --- a/ext/standard/tests/file/file_put_contents_variation5.phpt +++ b/ext/standard/tests/file/file_put_contents_variation5.phpt @@ -30,7 +30,7 @@ rmdir($thisTestDir); function runtest() { global $scriptLocFile, $filename; - file_put_contents($filename, (binary) "File written in working directory", FILE_USE_INCLUDE_PATH); + file_put_contents($filename, "File written in working directory", FILE_USE_INCLUDE_PATH); if(file_exists($scriptLocFile)) { echo "Fail - this is PHP52 behaviour\n"; unlink($scriptLocFile); diff --git a/ext/standard/tests/file/file_put_contents_variation6.phpt b/ext/standard/tests/file/file_put_contents_variation6.phpt index aaea612..a0977fa 100644 --- a/ext/standard/tests/file/file_put_contents_variation6.phpt +++ b/ext/standard/tests/file/file_put_contents_variation6.phpt @@ -40,8 +40,8 @@ function runtest() { //correct php53 behaviour is to ignore the FILE_USE_INCLUDE_PATH unless the file already exists // in the include path. In this case it doesn't so the file should be written in the current dir. - file_put_contents($filename, (binary) "File in include path", FILE_USE_INCLUDE_PATH); - file_put_contents($filename, (binary) ". This was appended", FILE_USE_INCLUDE_PATH | FILE_APPEND); + file_put_contents($filename, "File in include path", FILE_USE_INCLUDE_PATH); + file_put_contents($filename, ". This was appended", FILE_USE_INCLUDE_PATH | FILE_APPEND); $line = file_get_contents($filename); echo "$line\n"; unlink($filename); diff --git a/ext/standard/tests/file/file_variation.phpt b/ext/standard/tests/file/file_variation.phpt index 512d5f3..506575f 100644 --- a/ext/standard/tests/file/file_variation.phpt +++ b/ext/standard/tests/file/file_variation.phpt @@ -16,7 +16,7 @@ $file_path = dirname(__FILE__); foreach( $data_array as $data ) { echo "--Iteration $count --\n"; $fh = fopen($file_path."/file_variation.tmp", "w"); - fwrite($fh, (binary)$data); + fwrite($fh, $data); var_dump( file($file_path."/file_variation.tmp", FILE_IGNORE_NEW_LINES) ); var_dump( file($file_path."/file_variation.tmp", FILE_SKIP_EMPTY_LINES) ); $count++; @@ -35,7 +35,7 @@ var_dump( file($file_path1."/file1_variation.tmp", 1) ); echo "*** Using file function to remove line containing a key string ***\n"; $file_handle = fopen($file_path."/file2_variation.tmp", "w"); $key = "SEARCH_KEY"; -fwrite( $file_handle, (binary)"The key string to be searched is SEARCH_KEY\nLine without key string\nThe key string to be searched is SEARCH_KEY" ); +fwrite( $file_handle,"The key string to be searched is SEARCH_KEY\nLine without key string\nThe key string to be searched is SEARCH_KEY" ); $out_array = file($file_path."/file2_variation.tmp"); echo "File contents in array form Before replacement of the key\n"; diff --git a/ext/standard/tests/file/filesize_variation3-win32.phpt b/ext/standard/tests/file/filesize_variation3-win32.phpt index ab38c7d..94ba6f4 100644 --- a/ext/standard/tests/file/filesize_variation3-win32.phpt +++ b/ext/standard/tests/file/filesize_variation3-win32.phpt @@ -18,7 +18,7 @@ $file_path = dirname(__FILE__); echo "*** Testing filesize(): usage variations ***\n"; $filename = $file_path."/filesize_variation3.tmp"; $file_handle = fopen($filename, "w"); -fwrite($file_handle, (binary)str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes +fwrite($file_handle, str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes fclose($file_handle); echo "-- Testing filesize() after truncating the file to a new length --\n"; diff --git a/ext/standard/tests/file/fopen_variation12.phpt b/ext/standard/tests/file/fopen_variation12.phpt index 9df4490..c207ec1 100644 --- a/ext/standard/tests/file/fopen_variation12.phpt +++ b/ext/standard/tests/file/fopen_variation12.phpt @@ -18,7 +18,7 @@ restore_include_path(); function testme() { $tmpfile = basename(__FILE__, ".php") . ".tmp"; $h = fopen($tmpfile, "w", true); - fwrite($h, (binary) "This is the test file"); + fwrite($h, "This is the test file"); fclose($h); diff --git a/ext/standard/tests/file/fopen_variation16.phpt b/ext/standard/tests/file/fopen_variation16.phpt index e14f2e1..8b793f7 100644 --- a/ext/standard/tests/file/fopen_variation16.phpt +++ b/ext/standard/tests/file/fopen_variation16.phpt @@ -40,7 +40,7 @@ function runtest() { $tmpfile = $extraDir.'/fopen_variation16.tmp'; $h = fopen($tmpfile, "w+", true); - fwrite($h, (binary) "This is the test file"); + fwrite($h, "This is the test file"); fclose($h); $h = @fopen($dir1.'/'.$tmpfile, "r"); diff --git a/ext/standard/tests/file/fopen_variation17.phpt b/ext/standard/tests/file/fopen_variation17.phpt index 8abae0f..461807d 100644 --- a/ext/standard/tests/file/fopen_variation17.phpt +++ b/ext/standard/tests/file/fopen_variation17.phpt @@ -39,7 +39,7 @@ function runtest() { $tmpfile = $extraDir . '/' . basename(__FILE__, ".php") . ".tmp"; $h = fopen($tmpfile, "w+", true); - fwrite($h, (binary) "This is the test file"); + fwrite($h, "This is the test file"); fclose($h); $h = @fopen($dir1.'/'.$tmpfile, "r"); diff --git a/ext/standard/tests/file/fopen_variation5.phpt b/ext/standard/tests/file/fopen_variation5.phpt index 975560f..1fccbb7 100644 --- a/ext/standard/tests/file/fopen_variation5.phpt +++ b/ext/standard/tests/file/fopen_variation5.phpt @@ -63,7 +63,7 @@ function test_fopen($mode) { // create a file in the middle directory $h = fopen($secondFile, "w"); - fwrite($h, (binary) "in dir2"); + fwrite($h, "in dir2"); fclose($h); echo "\n** testing with mode=$mode **\n"; @@ -75,7 +75,7 @@ function test_fopen($mode) { //create a file in dir1 $h = fopen($firstFile, "w"); - fwrite($h, (binary) "in dir1"); + fwrite($h, "in dir1"); fclose($h); //should now read dir1 file @@ -86,7 +86,7 @@ function test_fopen($mode) { // create a file in working directory $h = fopen($filename, "w"); - fwrite($h, (binary) "in working dir"); + fwrite($h, "in working dir"); fclose($h); //should still read dir1 file @@ -106,7 +106,7 @@ function test_fopen($mode) { // create a file in the script directory $h = fopen($scriptFile, "w"); - fwrite($h, (binary) "in script dir"); + fwrite($h, "in script dir"); fclose($h); //should read the file in script dir diff --git a/ext/standard/tests/file/fopen_variation7.phpt b/ext/standard/tests/file/fopen_variation7.phpt index 13f075c..f5c1048c 100644 --- a/ext/standard/tests/file/fopen_variation7.phpt +++ b/ext/standard/tests/file/fopen_variation7.phpt @@ -32,7 +32,7 @@ function runtest() { global $dir1; $tmpfile = basename(__FILE__, ".php") . ".tmp"; $h = fopen($tmpfile, "w", true); - fwrite($h, (binary)"This is the test file"); + fwrite($h, "This is the test file"); fclose($h); diff --git a/ext/standard/tests/file/fopen_variation8.phpt b/ext/standard/tests/file/fopen_variation8.phpt index dd95014..eecaec7 100644 --- a/ext/standard/tests/file/fopen_variation8.phpt +++ b/ext/standard/tests/file/fopen_variation8.phpt @@ -62,7 +62,7 @@ function test_fopen($mode) { // create a file in the middle directory $h = fopen($secondFile, "w"); - fwrite($h, (binary) "in dir2"); + fwrite($h, "in dir2"); fclose($h); echo "\n** testing with mode=$mode **\n"; @@ -74,7 +74,7 @@ function test_fopen($mode) { //create a file in dir1 $h = fopen($firstFile, "w"); - fwrite($h, (binary) "in dir1"); + fwrite($h, "in dir1"); fclose($h); //should now read dir1 file @@ -85,7 +85,7 @@ function test_fopen($mode) { // create a file in working directory $h = fopen($filename, "w"); - fwrite($h, (binary) "in working dir"); + fwrite($h, "in working dir"); fclose($h); //should read the dir1 file @@ -105,7 +105,7 @@ function test_fopen($mode) { // create a file in the script directory $h = fopen($scriptFile, "w"); - fwrite($h, (binary) "in script dir"); + fwrite($h, "in script dir"); fclose($h); //should read the file in script dir diff --git a/ext/standard/tests/file/fopen_variation9.phpt b/ext/standard/tests/file/fopen_variation9.phpt index 4b0a727..5d1ca13 100644 --- a/ext/standard/tests/file/fopen_variation9.phpt +++ b/ext/standard/tests/file/fopen_variation9.phpt @@ -32,7 +32,7 @@ rmdir($thisTestDir); function runtest() { $tmpfile = basename(__FILE__, ".php") . ".tmp"; $h = fopen($tmpfile, "w", true); - fwrite($h, (binary) "This is the test file"); + fwrite($h, "This is the test file"); fclose($h); diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt index ab983a2..1bd95c3 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt @@ -49,7 +49,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); // set file pointer to 0 var_dump( rewind($file_handle) ); // set to beginning of file diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt index 915ab0e..e25ebe0 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt @@ -49,7 +49,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); // set file pointer to 0 var_dump( rewind($file_handle) ); // set to beginning of file diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt index 63d0edd..ede0c43 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt @@ -48,7 +48,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); // set file pointer to 0 var_dump( rewind($file_handle) ); // set to beginning of file diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt index ad01c3a..cb51150 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt @@ -48,7 +48,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); echo "-- Testing fseek() without using argument whence --\n"; diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt index 67987cb..c2179fc 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt @@ -48,7 +48,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); echo "-- Testing fseek() without using argument whence --\n"; diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt index 09c8344..1bb55b5 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt @@ -47,7 +47,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); foreach($offset as $count){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt index e4029c7..3c84f3e 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt @@ -47,7 +47,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); foreach($offset as $count){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt index d451912..8c84e7e 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt @@ -47,7 +47,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); foreach($offset as $count){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt index 4451988..4de9b3f 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt @@ -47,7 +47,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); foreach($offset as $count){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt index 5586e2b..c6ba6c4 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt @@ -48,7 +48,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); foreach($offset as $count){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt index a2a0d67..b4a0fa9 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt @@ -48,7 +48,7 @@ foreach($file_content_types as $file_content_type){ $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 512); //get the data of size 512 $data_to_be_written = $data_to_be_written; - fwrite($file_handle,(binary)$data_to_be_written); + fwrite($file_handle,$data_to_be_written); rewind($file_handle); foreach($offset as $count){ diff --git a/ext/standard/tests/file/ftruncate_error.phpt b/ext/standard/tests/file/ftruncate_error.phpt index 40dcf4c..3ccd32a 100644 --- a/ext/standard/tests/file/ftruncate_error.phpt +++ b/ext/standard/tests/file/ftruncate_error.phpt @@ -11,7 +11,7 @@ echo "*** Testing ftruncate() : error conditions ***\n"; $filename = dirname(__FILE__)."/ftruncate_error.tmp"; $file_handle = fopen($filename, "w" ); -fwrite($file_handle, (binary)"Testing ftruncate error conditions \n"); +fwrite($file_handle, "Testing ftruncate error conditions \n"); fflush($file_handle); echo "\n Initial file size = ".filesize($filename)."\n"; diff --git a/ext/standard/tests/file/lstat_stat_variation7.phpt b/ext/standard/tests/file/lstat_stat_variation7.phpt index 2296193..5a1e1c3 100644 --- a/ext/standard/tests/file/lstat_stat_variation7.phpt +++ b/ext/standard/tests/file/lstat_stat_variation7.phpt @@ -29,7 +29,7 @@ echo "*** Testing stat() on file after data is written in it ***\n"; $fh = fopen($file_name,"w"); $old_stat = stat($file_name); clearstatcache(); -fwrite($fh, str_repeat((binary)"Hello World", $old_stat['blksize'])); +fwrite($fh, str_repeat("Hello World", $old_stat['blksize'])); $new_stat = stat($file_name); // compare self stats diff --git a/ext/standard/tests/file/popen_pclose_basic.phpt b/ext/standard/tests/file/popen_pclose_basic.phpt index 9812193..55a87bb 100644 --- a/ext/standard/tests/file/popen_pclose_basic.phpt +++ b/ext/standard/tests/file/popen_pclose_basic.phpt @@ -47,8 +47,8 @@ $file_handle = popen("sort", "w"); $counter = 0; $newline = "\n"; foreach($arr as $str) { - fwrite($file_handle, (binary)$str); - fwrite($file_handle, (binary)$newline); + fwrite($file_handle, $str); + fwrite($file_handle, $newline); } pclose($file_handle); diff --git a/ext/standard/tests/file/userstreams.phpt b/ext/standard/tests/file/userstreams.phpt index d39898b..0e649e9 100644 --- a/ext/standard/tests/file/userstreams.phpt +++ b/ext/standard/tests/file/userstreams.phpt @@ -67,7 +67,7 @@ for ($i = 0; $i < 30; $i++) { /* store the data in a regular file so that we can compare * the results */ $tf = tmpfile(); -fwrite($tf, (binary)$DATA); +fwrite($tf, $DATA); $n = ftell($tf); rewind($tf) or die("failed to rewind tmp file!"); if (ftell($tf) != 0) diff --git a/ext/standard/tests/network/inet.phpt b/ext/standard/tests/network/inet.phpt index d2dcbb4..6e9a155 100644 --- a/ext/standard/tests/network/inet.phpt +++ b/ext/standard/tests/network/inet.phpt @@ -9,10 +9,10 @@ if (!function_exists("inet_pton")) die("skip no inet_pton()"); <?php $packed = chr(127) . chr(0) . chr(0) . chr(1); -var_dump(inet_ntop((binary)$packed)); +var_dump(inet_ntop($packed)); $packed = chr(255) . chr(255) . chr(255) . chr(0); -var_dump(inet_ntop((binary)$packed)); +var_dump(inet_ntop($packed)); var_dump(inet_ntop()); var_dump(inet_ntop(-1)); diff --git a/ext/standard/tests/streams/proc_open_bug60120.phpt b/ext/standard/tests/streams/proc_open_bug60120.phpt index 8768257..4587f07 100644 --- a/ext/standard/tests/streams/proc_open_bug60120.phpt +++ b/ext/standard/tests/streams/proc_open_bug60120.phpt @@ -38,7 +38,7 @@ while ($pipes || $writePipes) { } if ($w) { - $written = fwrite($writePipes[0], (binary)substr($stdin, $stdinOffset), 8192); + $written = fwrite($writePipes[0], substr($stdin, $stdinOffset), 8192); if (false !== $written) { $stdinOffset += $written; } diff --git a/ext/standard/tests/streams/proc_open_bug64438.phpt b/ext/standard/tests/streams/proc_open_bug64438.phpt index b3857d0..747f117 100644 --- a/ext/standard/tests/streams/proc_open_bug64438.phpt +++ b/ext/standard/tests/streams/proc_open_bug64438.phpt @@ -38,7 +38,7 @@ while ($pipes || $writePipes) { } if ($w) { - $written = fwrite($writePipes[0], (binary)substr($stdin, $stdinOffset), 8192); + $written = fwrite($writePipes[0], substr($stdin, $stdinOffset), 8192); if (false !== $written) { $stdinOffset += $written; } diff --git a/ext/standard/tests/strings/bug40915.phpt b/ext/standard/tests/strings/bug40915.phpt index e3a501a..88674ee 100644 Binary files a/ext/standard/tests/strings/bug40915.phpt and b/ext/standard/tests/strings/bug40915.phpt differ diff --git a/ext/standard/tests/strings/convert_cyr_string.phpt b/ext/standard/tests/strings/convert_cyr_string.phpt index 0b4db25..b62768e 100644 --- a/ext/standard/tests/strings/convert_cyr_string.phpt +++ b/ext/standard/tests/strings/convert_cyr_string.phpt @@ -9,13 +9,13 @@ var_dump(convert_cyr_string("", "")); var_dump(convert_cyr_string("", "", "")); var_dump(convert_cyr_string(array(), array(), array())); -var_dump(convert_cyr_string((binary)"[[[[[[", "q", "m")); -var_dump(convert_cyr_string((binary)"[[[[[[", "k", "w")); -var_dump(convert_cyr_string((binary)"[[[[[[", "m", "a")); -var_dump(convert_cyr_string((binary)"[[[[[[", "d", "i")); -var_dump(convert_cyr_string((binary)"[[[[[[", "w", "k")); -var_dump(convert_cyr_string((binary)"[[[[[[", "i", "q")); -var_dump(convert_cyr_string((binary)"", "d", "i")); +var_dump(convert_cyr_string("[[[[[[", "q", "m")); +var_dump(convert_cyr_string("[[[[[[", "k", "w")); +var_dump(convert_cyr_string("[[[[[[", "m", "a")); +var_dump(convert_cyr_string("[[[[[[", "d", "i")); +var_dump(convert_cyr_string("[[[[[[", "w", "k")); +var_dump(convert_cyr_string("[[[[[[", "i", "q")); +var_dump(convert_cyr_string("", "d", "i")); echo "Done\n"; ?> diff --git a/ext/standard/tests/strings/str_getcsv_001.phpt b/ext/standard/tests/strings/str_getcsv_001.phpt index 23c6faf..becff21 100644 --- a/ext/standard/tests/strings/str_getcsv_001.phpt +++ b/ext/standard/tests/strings/str_getcsv_001.phpt @@ -18,7 +18,7 @@ var_dump(str_getcsv('.foo..bar.', '.', '.', '.')); print "-----\n"; var_dump(str_getcsv('.foo. .bar.', ' ', '.', '.')); print "-----\n"; -var_dump(str_getcsv((binary)'1foo1 1bar111', (binary)' ', (binary)'1 ', (binary) '\ ')); +var_dump(str_getcsv('1foo1 1bar111', ' ', '1 ', '\ ')); print "-----\n"; var_dump(str_getcsv('.foo . . bar .', ' ', '.', '')); print "-----\n";