diff options
Diffstat (limited to 'ext/standard/tests/file')
33 files changed, 42 insertions, 42 deletions
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) |