diff options
53 files changed, 69 insertions, 69 deletions
diff --git a/Zend/tests/ns_069.inc b/Zend/tests/ns_069.inc index 4f186390ad..46d8f8f488 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 63269d0de7..cbfb927049 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 b96b39cfe9..311b5b8caa 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 21fc3454cd..e2d4aa9b7a 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 f916995464..fbb0d0a84e 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 28e9401baf..b3934b35bc 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 95214bc55b..5383593d97 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 7f55f3987d..d2570fb881 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 cf86906137..06b69c4705 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 bb93eea076..be293efb39 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 b937b011d0..aff3f83844 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 58c7523160..8a45071dd2 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 20431de8be..ac4bcd8bf7 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 183d351166..8763085a09 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 361095da5f..26959ec511 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 8915bb833c..776a6d44c8 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 2904ff9a5b..57446b6ee0 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 ddd25a35db..ab2ad09081 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 d211f39437..cfef2a4245 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 d986f779ba..b60ad6048f 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 d919c4a08f..62d814c9fd 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 baaa7a65d9..fe1961d16c 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 aaea612b36..a0977faff8 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 512d5f3eb6..506575fde7 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 ab38c7d1c3..94ba6f478a 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 9df4490236..c207ec1836 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 e14f2e1c16..8b793f7858 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 8abae0fbe5..461807d26f 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 975560f5ce..1fccbb70a9 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 13f075cfff..f5c1048c07 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 dd95014ff3..eecaec7b4c 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 4b0a7270db..5d1ca139f4 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 ab983a2680..1bd95c3450 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 915ab0e558..e25ebe0946 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 63d0edd5a5..ede0c43245 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 ad01c3aef1..cb51150dcf 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 67987cb712..c2179fcaee 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 09c83447d8..1bb55b53b3 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 e4029c718a..3c84f3eb7c 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 d4519123c6..8c84e7e386 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 44519884a9..4de9b3f688 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 5586e2bd5a..c6ba6c430f 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 a2a0d676c2..b4a0fa97f3 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 40dcf4cf51..3ccd32a2d4 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 2296193c91..5a1e1c3994 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 9812193c66..55a87bb02a 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 d39898bbe2..0e649e9a92 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 d2dcbb48c1..6e9a1553c8 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 8768257a2e..4587f0718e 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 b3857d09d4..747f1171f3 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 Binary files differindex e3a501a178..88674ee953 100644 --- a/ext/standard/tests/strings/bug40915.phpt +++ b/ext/standard/tests/strings/bug40915.phpt diff --git a/ext/standard/tests/strings/convert_cyr_string.phpt b/ext/standard/tests/strings/convert_cyr_string.phpt index 0b4db2510a..b62768eff4 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 23c6faf918..becff2163b 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"; |