summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/file')
-rw-r--r--ext/standard/tests/file/005_variation2-win32.phpt11
-rw-r--r--ext/standard/tests/file/005_variation2.phpt11
-rw-r--r--ext/standard/tests/file/basename-win32.phpt42
-rw-r--r--ext/standard/tests/file/basename.phptbin6786 -> 6453 bytes
-rw-r--r--ext/standard/tests/file/basename_basic-win32.phpt2
-rw-r--r--ext/standard/tests/file/basename_basic.phpt2
-rw-r--r--ext/standard/tests/file/bug51094.phpt10
-rw-r--r--ext/standard/tests/file/bug61961.phpt2
-rw-r--r--ext/standard/tests/file/chgrp.phpt2
-rw-r--r--ext/standard/tests/file/chown.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_error_conditions.phpt18
-rw-r--r--ext/standard/tests/file/file_exists_variation1.phpt2
-rw-r--r--ext/standard/tests/file/file_get_contents_variation8-win32.phpt4
-rw-r--r--ext/standard/tests/file/file_get_contents_variation8.phpt11
-rw-r--r--ext/standard/tests/file/file_put_contents_variation5.phpt2
-rw-r--r--ext/standard/tests/file/file_put_contents_variation8-win32.phpt4
-rw-r--r--ext/standard/tests/file/file_put_contents_variation8.phpt11
-rw-r--r--ext/standard/tests/file/filegroup_variation2.phpt2
-rw-r--r--ext/standard/tests/file/fileinode_variation2.phpt2
-rw-r--r--ext/standard/tests/file/fileowner_variation2.phpt2
-rw-r--r--ext/standard/tests/file/fileperms_variation2.phpt2
-rw-r--r--ext/standard/tests/file/filesize_variation5.phpt2
-rw-r--r--ext/standard/tests/file/flock_basic.phpt4
-rw-r--r--ext/standard/tests/file/flock_error.phpt7
-rw-r--r--ext/standard/tests/file/flock_variation.phpt2
-rw-r--r--ext/standard/tests/file/fnmatch_basic.phpt2
-rw-r--r--ext/standard/tests/file/fnmatch_variation.phpt28
-rw-r--r--ext/standard/tests/file/fputcsv_variation2.phpt724
-rw-r--r--ext/standard/tests/file/fputcsv_variation3.phpt724
-rw-r--r--ext/standard/tests/file/fputcsv_variation4.phpt724
-rw-r--r--ext/standard/tests/file/fscanf_error.phpt8
-rw-r--r--ext/standard/tests/file/glob_variation3.phpt2
-rw-r--r--ext/standard/tests/file/is_dir_variation3.phpt2
-rw-r--r--ext/standard/tests/file/is_executable_variation3.phpt4
-rw-r--r--ext/standard/tests/file/is_readable_variation3.phpt7
-rw-r--r--ext/standard/tests/file/is_writable_variation3.phpt6
-rw-r--r--ext/standard/tests/file/lstat_stat_variation22.phpt4
-rw-r--r--ext/standard/tests/file/pathinfo_variaton.phpt65
-rw-r--r--ext/standard/tests/file/readfile_error.phpt6
-rw-r--r--ext/standard/tests/file/readfile_variation10-win32.phpt4
-rw-r--r--ext/standard/tests/file/readfile_variation10.phptbin1509 -> 1451 bytes
-rw-r--r--ext/standard/tests/file/readlink_realpath_variation3.phpt12
-rw-r--r--ext/standard/tests/file/readlink_variation1.phpt4
-rw-r--r--ext/standard/tests/file/realpath_variation-win32-mb.phpt6
-rw-r--r--ext/standard/tests/file/realpath_variation-win32.phpt6
-rw-r--r--ext/standard/tests/file/rename_variation13-win32.phpt16
-rw-r--r--ext/standard/tests/file/rename_variation13.phpt8
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt12
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt10
-rw-r--r--ext/standard/tests/file/tempnam_variation3-win32.phpt12
-rw-r--r--ext/standard/tests/file/tempnam_variation3.phpt11
-rw-r--r--ext/standard/tests/file/tempnam_variation7-win32.phpt13
-rw-r--r--ext/standard/tests/file/tempnam_variation7.phpt13
-rw-r--r--ext/standard/tests/file/unlink_error-win32-mb.phpt7
-rw-r--r--ext/standard/tests/file/unlink_error-win32.phpt7
-rw-r--r--ext/standard/tests/file/unlink_error.phpt7
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt2
57 files changed, 84 insertions, 2531 deletions
diff --git a/ext/standard/tests/file/005_variation2-win32.phpt b/ext/standard/tests/file/005_variation2-win32.phpt
index 407f51a4d1..9f5b7ba679 100644
--- a/ext/standard/tests/file/005_variation2-win32.phpt
+++ b/ext/standard/tests/file/005_variation2-win32.phpt
@@ -28,13 +28,11 @@ function stat_fn( $filename ) {
echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n";
echo "\n*** testing file info ***";
-stat_fn(NULL);
stat_fn(false);
stat_fn('');
stat_fn(' ');
stat_fn('|');
-echo "\n*** testing touch ***";
-var_dump(touch(NULL));
+echo "\n*** testing touch ***\n";
var_dump(touch(false));
var_dump(touch(''));
@@ -59,11 +57,6 @@ echo "Done";
-- File modification time is =>
-- inode change time is =>
--- File '' --
--- File access time is =>
--- File modification time is =>
--- inode change time is =>
-
-- File ' ' --
-- File access time is =>
Warning: fileatime(): stat failed for in %s on line %d
@@ -86,7 +79,7 @@ Warning: filemtime(): stat failed for | in %s on line %d
Warning: filectime(): stat failed for | in %s on line %d
-*** testing touch ***bool(false)
+*** testing touch ***
bool(false)
bool(false)
diff --git a/ext/standard/tests/file/005_variation2.phpt b/ext/standard/tests/file/005_variation2.phpt
index 5a878a687b..55d1d66660 100644
--- a/ext/standard/tests/file/005_variation2.phpt
+++ b/ext/standard/tests/file/005_variation2.phpt
@@ -28,7 +28,6 @@ function stat_fn( $filename ) {
echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n";
echo "\n*** testing touch ***\n";
-$a = touch(NULL);
$b = touch(false);
$c = touch('');
$d = touch(' ');
@@ -41,7 +40,6 @@ var_dump($d);
var_dump($e);
echo "\n*** testing file info ***";
-stat_fn(NULL);
stat_fn(false);
stat_fn('');
stat_fn(' ');
@@ -56,7 +54,9 @@ echo "Done";
*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***
*** testing touch ***
-bool(false)
+
+Warning: Undefined variable $a in %s on line %d
+NULL
bool(false)
bool(false)
bool(true)
@@ -73,11 +73,6 @@ bool(true)
-- File modification time is =>
-- inode change time is =>
--- File '' --
--- File access time is =>
--- File modification time is =>
--- inode change time is =>
-
-- File ' ' --
-- File access time is => %d
-- File modification time is => %d
diff --git a/ext/standard/tests/file/basename-win32.phpt b/ext/standard/tests/file/basename-win32.phpt
index 4d6cf7e089..53f243a634 100644
--- a/ext/standard/tests/file/basename-win32.phpt
+++ b/ext/standard/tests/file/basename-win32.phpt
@@ -56,13 +56,11 @@ $file_path_variations = array (
/* paths with shortcut home dir char, with suffix variation */
array("C:\\temp\\bar"),
array("C:\\temp\\bar", ""),
- array("C:\\temp\\bar", NULL),
array("C:\\temp\\bar", ' '),
array("C:\\temp\\bar.tar", ".tar"),
array("C:\\temp\\bar.tar", "~"),
array("C:\\temp\\bar.tar\\", "~"),
array("C:\\temp\\bar.tar\\", ""),
- array("C:\\temp\\bar.tar", NULL),
array("C:\\temp\\bar.tar", ''),
array("C:\\temp\\bar.tar", " "),
@@ -84,7 +82,6 @@ $file_path_variations = array (
array("\\bar.zip\\", "\\bar.zip\\"),
array(" ", " "),
array(' ', ' '),
- array(NULL, NULL),
/* path with spaces */
array(" "),
@@ -93,7 +90,6 @@ $file_path_variations = array (
/* empty paths */
array(""),
array(''),
- array(NULL)
);
function check_basename( $path_arrays ) {
@@ -209,7 +205,7 @@ string(3) "bar"
string(3) "bar"
--Iteration 5--
-string(3) "bar"
+string(7) "bar.tar"
--Iteration 6--
string(7) "bar.tar"
@@ -224,10 +220,10 @@ string(7) "bar.tar"
string(7) "bar.tar"
--Iteration 10--
-string(7) "bar.tar"
+string(4) "10.5"
--Iteration 11--
-string(7) "bar.tar"
+string(2) "10"
--Iteration 12--
string(4) "10.5"
@@ -236,37 +232,37 @@ string(4) "10.5"
string(2) "10"
--Iteration 14--
-string(4) "10.5"
+string(2) "10"
--Iteration 15--
-string(2) "10"
+string(4) "10.5"
--Iteration 16--
-string(2) "10"
+string(4) "10.5"
--Iteration 17--
-string(4) "10.5"
+string(6) "10.zip"
--Iteration 18--
-string(4) "10.5"
+string(1) "0"
--Iteration 19--
-string(6) "10.zip"
+string(1) "0"
--Iteration 20--
-string(1) "0"
+string(7) "bar.zip"
--Iteration 21--
-string(1) "0"
+string(7) "bar.zip"
--Iteration 22--
string(7) "bar.zip"
--Iteration 23--
-string(7) "bar.zip"
+string(1) " "
--Iteration 24--
-string(7) "bar.zip"
+string(1) " "
--Iteration 25--
string(1) " "
@@ -278,17 +274,5 @@ string(1) " "
string(0) ""
--Iteration 28--
-string(1) " "
-
---Iteration 29--
-string(1) " "
-
---Iteration 30--
-string(0) ""
-
---Iteration 31--
-string(0) ""
-
---Iteration 32--
string(0) ""
Done
diff --git a/ext/standard/tests/file/basename.phpt b/ext/standard/tests/file/basename.phpt
index 2b8507fa2d..c2dbf34f51 100644
--- a/ext/standard/tests/file/basename.phpt
+++ b/ext/standard/tests/file/basename.phpt
Binary files differ
diff --git a/ext/standard/tests/file/basename_basic-win32.phpt b/ext/standard/tests/file/basename_basic-win32.phpt
index 79de350eae..0678a7fd95 100644
--- a/ext/standard/tests/file/basename_basic-win32.phpt
+++ b/ext/standard/tests/file/basename_basic-win32.phpt
@@ -56,7 +56,6 @@ $file_paths = array (
/* empty paths */
"",
'',
- NULL,
);
foreach ($file_paths as $file_path) {
@@ -98,4 +97,3 @@ string(1) " "
string(1) " "
string(0) ""
string(0) ""
-string(0) ""
diff --git a/ext/standard/tests/file/basename_basic.phpt b/ext/standard/tests/file/basename_basic.phpt
index 55bd868c55..bd86695b92 100644
--- a/ext/standard/tests/file/basename_basic.phpt
+++ b/ext/standard/tests/file/basename_basic.phpt
@@ -56,7 +56,6 @@ $file_paths = array (
/* empty paths */
"",
'',
- NULL,
);
foreach ($file_paths as $file_path) {
@@ -98,4 +97,3 @@ string(1) " "
string(1) " "
string(0) ""
string(0) ""
-string(0) ""
diff --git a/ext/standard/tests/file/bug51094.phpt b/ext/standard/tests/file/bug51094.phpt
index cf2bb254c9..77d7470cb5 100644
--- a/ext/standard/tests/file/bug51094.phpt
+++ b/ext/standard/tests/file/bug51094.phpt
@@ -3,15 +3,15 @@ Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includ
--FILE--
<?php
-$ini = parse_ini_string('ini="ini;raw"', null, INI_SCANNER_RAW);
+$ini = parse_ini_string('ini="ini;raw"', false, INI_SCANNER_RAW);
var_dump($ini['ini']);
-$ini = parse_ini_string('ini="ini;raw', null, INI_SCANNER_RAW);
+$ini = parse_ini_string('ini="ini;raw', false, INI_SCANNER_RAW);
var_dump($ini['ini']);
-$ini = parse_ini_string('ini=ini;raw', null, INI_SCANNER_RAW);
+$ini = parse_ini_string('ini=ini;raw', false, INI_SCANNER_RAW);
var_dump($ini['ini']);
-$ini = parse_ini_string('ini=ini"raw', null, INI_SCANNER_RAW);
+$ini = parse_ini_string('ini=ini"raw', false, INI_SCANNER_RAW);
var_dump($ini['ini']);
-$ini = parse_ini_string("ini=\r\niniraw", null, INI_SCANNER_RAW);
+$ini = parse_ini_string("ini=\r\niniraw", false, INI_SCANNER_RAW);
var_dump($ini['ini']);
?>
--EXPECT--
diff --git a/ext/standard/tests/file/bug61961.phpt b/ext/standard/tests/file/bug61961.phpt
index c9ae4c8880..fbef22ba4c 100644
--- a/ext/standard/tests/file/bug61961.phpt
+++ b/ext/standard/tests/file/bug61961.phpt
@@ -5,7 +5,7 @@ Bug #61961 (file_get_content leaks when access empty file with max length)
$tmp_empty_file = __FILE__ . ".tmp";
file_put_contents($tmp_empty_file, "");
-var_dump(file_get_contents($tmp_empty_file, NULL, NULL, NULL, 10));
+var_dump(file_get_contents($tmp_empty_file, false, NULL, 0, 10));
unlink($tmp_empty_file);
?>
--EXPECT--
diff --git a/ext/standard/tests/file/chgrp.phpt b/ext/standard/tests/file/chgrp.phpt
index b94def684a..1e4899e465 100644
--- a/ext/standard/tests/file/chgrp.phpt
+++ b/ext/standard/tests/file/chgrp.phpt
@@ -8,7 +8,7 @@ if(substr(PHP_OS, 0, 3) == "WIN")
--FILE--
<?php
try {
- chgrp("sjhgfskhagkfdgskjfhgskfsdgfkdsajf", null);
+ chgrp("sjhgfskhagkfdgskjfhgskfsdgfkdsajf", 0);
} catch (TypeError $exception) {
echo $exception->getMessage() . "\n";
}
diff --git a/ext/standard/tests/file/chown.phpt b/ext/standard/tests/file/chown.phpt
index 05cd4e4d7d..5791c04c9b 100644
--- a/ext/standard/tests/file/chown.phpt
+++ b/ext/standard/tests/file/chown.phpt
@@ -7,7 +7,7 @@ if(substr(PHP_OS, 0, 3) == "WIN")
?>
--FILE--
<?php
-chown("sjhgfskhagkfdgskjfhgskfsdgfkdsajf", NULL);
+chown("sjhgfskhagkfdgskjfhgskfsdgfkdsajf", 0);
echo "ALIVE\n";
?>
--EXPECTF--
diff --git a/ext/standard/tests/file/fgetcsv_error_conditions.phpt b/ext/standard/tests/file/fgetcsv_error_conditions.phpt
index dd2b4d61d9..9bb090246a 100644
--- a/ext/standard/tests/file/fgetcsv_error_conditions.phpt
+++ b/ext/standard/tests/file/fgetcsv_error_conditions.phpt
@@ -27,23 +27,23 @@ try {
echo $e->getMessage() . \PHP_EOL;
}
-echo 'fgetcsv() with delimiter as NULL' . \PHP_EOL;
+echo 'fgetcsv() with delimiter as empty string' . \PHP_EOL;
try {
- var_dump( fgetcsv($file_handle, $length, NULL, $enclosure) );
+ var_dump( fgetcsv($file_handle, $length, '', $enclosure) );
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
-echo 'fgetcsv() with enclosure as NULL' . \PHP_EOL;
+echo 'fgetcsv() with enclosure as empty string' . \PHP_EOL;
try {
- var_dump( fgetcsv($file_handle, $length, $delimiter, NULL) );
+ var_dump( fgetcsv($file_handle, $length, $delimiter, '') );
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
-echo 'fgetcsv() with delimiter & enclosure as NULL' . \PHP_EOL;
+echo 'fgetcsv() with delimiter & enclosure as empty string' . \PHP_EOL;
try {
- var_dump( fgetcsv($file_handle, $length, NULL, NULL) );
+ var_dump( fgetcsv($file_handle, $length, '', '') );
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
@@ -53,9 +53,9 @@ fgetcsv() with negative length
fgetcsv(): Argument #2 ($length) must be a greater than or equal to 0
fgetcsv(): Argument #2 ($length) must be a greater than or equal to 0
fgetcsv(): Argument #2 ($length) must be a greater than or equal to 0
-fgetcsv() with delimiter as NULL
+fgetcsv() with delimiter as empty string
fgetcsv(): Argument #3 ($separator) must be a single character
-fgetcsv() with enclosure as NULL
+fgetcsv() with enclosure as empty string
fgetcsv(): Argument #4 ($enclosure) must be a single character
-fgetcsv() with delimiter & enclosure as NULL
+fgetcsv() with delimiter & enclosure as empty string
fgetcsv(): Argument #3 ($separator) must be a single character
diff --git a/ext/standard/tests/file/file_exists_variation1.phpt b/ext/standard/tests/file/file_exists_variation1.phpt
index 55c6c94981..446e7fac16 100644
--- a/ext/standard/tests/file/file_exists_variation1.phpt
+++ b/ext/standard/tests/file/file_exists_variation1.phpt
@@ -6,7 +6,6 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
<?php
echo "*** Testing file_exists() : usage variations ***\n";
-var_dump(file_exists(NULL));
var_dump(file_exists(false));
var_dump(file_exists(''));
var_dump(file_exists(' '));
@@ -19,5 +18,4 @@ bool(false)
bool(false)
bool(false)
bool(false)
-bool(false)
Done
diff --git a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt
index 2c7033be6d..b6d801e9e7 100644
--- a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt
+++ b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt
@@ -20,7 +20,6 @@ $names_arr = array(
"-1" => -1,
"TRUE" => TRUE,
"FALSE" => FALSE,
- "NULL" => NULL,
"\"\"" => "",
"\" \"" => " ",
"\\0" => "\0",
@@ -58,9 +57,6 @@ bool(false)
-- Filename: FALSE --
ValueError: Path cannot be empty
--- Filename: NULL --
-ValueError: Path cannot be empty
-
-- Filename: "" --
ValueError: Path cannot be empty
diff --git a/ext/standard/tests/file/file_get_contents_variation8.phpt b/ext/standard/tests/file/file_get_contents_variation8.phpt
index 126f7b9fd7..ad23a13bb6 100644
--- a/ext/standard/tests/file/file_get_contents_variation8.phpt
+++ b/ext/standard/tests/file/file_get_contents_variation8.phpt
@@ -19,7 +19,6 @@ $names_arr = array(
-1,
TRUE,
FALSE,
- NULL,
"",
" ",
"\0",
@@ -57,20 +56,18 @@ ValueError: Path cannot be empty
-- Iteration 3 --
ValueError: Path cannot be empty
-- Iteration 4 --
-ValueError: Path cannot be empty
--- Iteration 5 --
Warning: file_get_contents( ): Failed to open stream: No such file or directory in %s on line %d
bool(false)
--- Iteration 6 --
+-- Iteration 5 --
ValueError: file_get_contents(): Argument #1 ($filename) must not contain any null bytes
--- Iteration 7 --
+-- Iteration 6 --
TypeError: file_get_contents(): Argument #1 ($filename) must be of type string, array given
--- Iteration 8 --
+-- Iteration 7 --
Warning: file_get_contents(/no/such/file/dir): Failed to open stream: No such file or directory in %s on line %d
bool(false)
--- Iteration 9 --
+-- Iteration 8 --
Warning: file_get_contents(php/php): Failed to open stream: No such file or directory in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/file_put_contents_variation5.phpt b/ext/standard/tests/file/file_put_contents_variation5.phpt
index d16db38b14..97eb2604e0 100644
--- a/ext/standard/tests/file/file_put_contents_variation5.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation5.phpt
@@ -19,7 +19,7 @@ runtest();
$newpath = "";
set_include_path($newpath);
runtest();
-set_include_path(null);
+set_include_path("");
runtest();
set_include_path(";; ; ;c:\\rubbish");
runtest();
diff --git a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt
index e3cd4609d4..dac2ba6d37 100644
--- a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt
@@ -18,7 +18,6 @@ $names_arr = array(
"-1" => -1,
"TRUE" => TRUE,
"FALSE" => FALSE,
- "NULL" => NULL,
"\"\"" => "",
"\" \"" => " ",
"\\0" => "\0",
@@ -58,9 +57,6 @@ foreach($names_arr as $key =>$value) {
-- Filename: FALSE --
ValueError: Path cannot be empty
--- Filename: NULL --
-ValueError: Path cannot be empty
-
-- Filename: "" --
ValueError: Path cannot be empty
diff --git a/ext/standard/tests/file/file_put_contents_variation8.phpt b/ext/standard/tests/file/file_put_contents_variation8.phpt
index f5b956faee..70456fad9f 100644
--- a/ext/standard/tests/file/file_put_contents_variation8.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation8.phpt
@@ -22,7 +22,6 @@ $names_arr = array(
-1,
TRUE,
FALSE,
- NULL,
"",
" ",
//this one also generates a java message rather than our own so we don't replicate php message
@@ -64,18 +63,16 @@ ValueError: Path cannot be empty
-- Iteration 3 --
ValueError: Path cannot be empty
-- Iteration 4 --
-ValueError: Path cannot be empty
--- Iteration 5 --
9 bytes written to: ' '
--- Iteration 6 --
+-- Iteration 5 --
ValueError: file_put_contents(): Argument #1 ($filename) must not contain any null bytes
--- Iteration 7 --
+-- Iteration 6 --
TypeError: file_put_contents(): Argument #1 ($filename) must be of type string, array given
--- Iteration 8 --
+-- Iteration 7 --
Warning: file_put_contents(%sdir): Failed to open stream: %s in %s on line %d
Failed to write data to: '%sir'
--- Iteration 9 --
+-- Iteration 8 --
Warning: file_put_contents(%sphp): Failed to open stream: %s in %s on line %d
Failed to write data to: '%sphp'
diff --git a/ext/standard/tests/file/filegroup_variation2.phpt b/ext/standard/tests/file/filegroup_variation2.phpt
index 85ee170660..7d0a87d247 100644
--- a/ext/standard/tests/file/filegroup_variation2.phpt
+++ b/ext/standard/tests/file/filegroup_variation2.phpt
@@ -18,7 +18,6 @@ $filenames = array(
"",
TRUE,
FALSE,
- NULL,
/* scalars */
1234,
@@ -49,7 +48,6 @@ bool(false)
Warning: filegroup(): stat failed for 1 in %s on line %d
bool(false)
bool(false)
-bool(false)
Warning: filegroup(): stat failed for 1234 in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/fileinode_variation2.phpt b/ext/standard/tests/file/fileinode_variation2.phpt
index d8593733a8..2dace6413c 100644
--- a/ext/standard/tests/file/fileinode_variation2.phpt
+++ b/ext/standard/tests/file/fileinode_variation2.phpt
@@ -18,7 +18,6 @@ $filenames = array(
"",
TRUE,
FALSE,
- NULL,
/* scalars */
1234,
@@ -49,7 +48,6 @@ bool(false)
Warning: fileinode(): stat failed for 1 in %s on line %d
bool(false)
bool(false)
-bool(false)
Warning: fileinode(): stat failed for 1234 in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/fileowner_variation2.phpt b/ext/standard/tests/file/fileowner_variation2.phpt
index 752fa1d6ef..05cc8495b1 100644
--- a/ext/standard/tests/file/fileowner_variation2.phpt
+++ b/ext/standard/tests/file/fileowner_variation2.phpt
@@ -19,7 +19,6 @@ $filenames = array(
"",
TRUE,
FALSE,
- NULL,
/* scalars */
1234,
@@ -50,7 +49,6 @@ bool(false)
Warning: fileowner(): stat failed for 1 in %s on line %d
bool(false)
bool(false)
-bool(false)
Warning: fileowner(): stat failed for 1234 in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/fileperms_variation2.phpt b/ext/standard/tests/file/fileperms_variation2.phpt
index 9c9d263ebe..c46ce617ae 100644
--- a/ext/standard/tests/file/fileperms_variation2.phpt
+++ b/ext/standard/tests/file/fileperms_variation2.phpt
@@ -18,7 +18,6 @@ $filenames = array(
"",
TRUE,
FALSE,
- NULL,
/* scalars */
1234,
@@ -49,7 +48,6 @@ bool(false)
Warning: fileperms(): stat failed for 1 in %s on line %d
bool(false)
bool(false)
-bool(false)
Warning: fileperms(): stat failed for 1234 in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/filesize_variation5.phpt b/ext/standard/tests/file/filesize_variation5.phpt
index ab1fc6c9ff..7da6e73e06 100644
--- a/ext/standard/tests/file/filesize_variation5.phpt
+++ b/ext/standard/tests/file/filesize_variation5.phpt
@@ -7,7 +7,6 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
echo "*** Testing filesize(): usage variations ***\n";
/* null, false, "", " " */
-var_dump( filesize(NULL) );
var_dump( filesize(false) );
var_dump( filesize('') );
var_dump( filesize(' ') );
@@ -18,7 +17,6 @@ echo "*** Done ***\n";
*** Testing filesize(): usage variations ***
bool(false)
bool(false)
-bool(false)
Warning: filesize(): stat failed for in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/flock_basic.phpt b/ext/standard/tests/file/flock_basic.phpt
index df1199d468..8b4ae30e0f 100644
--- a/ext/standard/tests/file/flock_basic.phpt
+++ b/ext/standard/tests/file/flock_basic.phpt
@@ -9,7 +9,7 @@ Description: PHP supports a portable way of locking complete files
echo "*** Testing flock() fun with file and dir ***\n";
-$lock_file = preg_replace("~\.phpt?$~", null, __FILE__);
+$lock_file = preg_replace("~\.phpt?$~", '', __FILE__);
$file_handle = fopen($lock_file, "w");
var_dump(flock($file_handle, LOCK_SH|LOCK_NB));
@@ -19,7 +19,7 @@ var_dump(flock($file_handle, LOCK_UN));
fclose($file_handle);
unlink($lock_file);
-$lock_dir = sprintf("%s.dir", preg_replace("~\.phpt?$~", null, __FILE__));
+$lock_dir = sprintf("%s.dir", preg_replace("~\.phpt?$~", '', __FILE__));
mkdir($lock_dir);
$dir_handle = opendir($lock_dir);
diff --git a/ext/standard/tests/file/flock_error.phpt b/ext/standard/tests/file/flock_error.phpt
index add2295981..753aaa6fb3 100644
--- a/ext/standard/tests/file/flock_error.phpt
+++ b/ext/standard/tests/file/flock_error.phpt
@@ -19,7 +19,6 @@ $operations = array(
0,
LOCK_NB,
FALSE,
- NULL,
array(1,2,3),
array(),
"string",
@@ -62,15 +61,13 @@ flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
--- Iteration 2 ---
flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
--- Iteration 3 ---
-flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
+flock(): Argument #2 ($operation) must be of type int, array given
--- Iteration 4 ---
flock(): Argument #2 ($operation) must be of type int, array given
--- Iteration 5 ---
-flock(): Argument #2 ($operation) must be of type int, array given
+flock(): Argument #2 ($operation) must be of type int, string given
--- Iteration 6 ---
flock(): Argument #2 ($operation) must be of type int, string given
--- Iteration 7 ---
flock(): Argument #2 ($operation) must be of type int, string given
---- Iteration 8 ---
-flock(): Argument #2 ($operation) must be of type int, string given
flock(): supplied resource is not a valid stream resource
diff --git a/ext/standard/tests/file/flock_variation.phpt b/ext/standard/tests/file/flock_variation.phpt
index 40945be58e..f4a5199959 100644
--- a/ext/standard/tests/file/flock_variation.phpt
+++ b/ext/standard/tests/file/flock_variation.phpt
@@ -5,7 +5,7 @@ Test flock() function: Variations
echo "*** Testing flock() fun with the various operation and
wouldblock values ***\n";
-$file = preg_replace("~\.phpt?$~", null, __FILE__);
+$file = preg_replace("~\.phpt?$~", '', __FILE__);
$fp = fopen($file, "w");
/* array of operations */
diff --git a/ext/standard/tests/file/fnmatch_basic.phpt b/ext/standard/tests/file/fnmatch_basic.phpt
index 18a8161966..8b74bb430b 100644
--- a/ext/standard/tests/file/fnmatch_basic.phpt
+++ b/ext/standard/tests/file/fnmatch_basic.phpt
@@ -23,7 +23,6 @@ var_dump( fnmatch(100, 100) );
var_dump( fnmatch("string", "string") );
var_dump( fnmatch(TRUE, TRUE) );
var_dump( fnmatch(FALSE, FALSE) );
-var_dump( fnmatch(NULL, NULL) );
echo "\n*** Done ***\n";
?>
@@ -40,6 +39,5 @@ bool(true)
bool(true)
bool(true)
bool(true)
-bool(true)
*** Done ***
diff --git a/ext/standard/tests/file/fnmatch_variation.phpt b/ext/standard/tests/file/fnmatch_variation.phpt
index 2d6a08e72f..3413c3e6f7 100644
--- a/ext/standard/tests/file/fnmatch_variation.phpt
+++ b/ext/standard/tests/file/fnmatch_variation.phpt
@@ -127,8 +127,6 @@ match_($bool_arr, $bool_arr);
echo "\n--- With NULL ---\n";
$null_arr = array(
- NULL,
- null,
"",
"\0",
"string",
@@ -399,42 +397,20 @@ bool(true)
--- With NULL ---
-- Iteration 0 --
bool(true)
-bool(true)
-bool(true)
fnmatch(): Argument #2 ($filename) must not contain any null bytes
bool(false)
bool(false)
-- Iteration 1 --
-bool(true)
-bool(true)
-bool(true)
-fnmatch(): Argument #2 ($filename) must not contain any null bytes
-bool(false)
-bool(false)
--- Iteration 2 --
-bool(true)
-bool(true)
-bool(true)
-fnmatch(): Argument #2 ($filename) must not contain any null bytes
-bool(false)
-bool(false)
--- Iteration 3 --
-fnmatch(): Argument #1 ($pattern) must not contain any null bytes
fnmatch(): Argument #1 ($pattern) must not contain any null bytes
fnmatch(): Argument #1 ($pattern) must not contain any null bytes
fnmatch(): Argument #1 ($pattern) must not contain any null bytes
fnmatch(): Argument #1 ($pattern) must not contain any null bytes
-fnmatch(): Argument #1 ($pattern) must not contain any null bytes
--- Iteration 4 --
-bool(false)
-bool(false)
+-- Iteration 2 --
bool(false)
fnmatch(): Argument #2 ($filename) must not contain any null bytes
bool(true)
bool(false)
--- Iteration 5 --
-bool(false)
-bool(false)
+-- Iteration 3 --
bool(false)
fnmatch(): Argument #2 ($filename) must not contain any null bytes
bool(false)
diff --git a/ext/standard/tests/file/fputcsv_variation2.phpt b/ext/standard/tests/file/fputcsv_variation2.phpt
deleted file mode 100644
index 77b075a5f0..0000000000
--- a/ext/standard/tests/file/fputcsv_variation2.phpt
+++ /dev/null
@@ -1,724 +0,0 @@
---TEST--
-Test fputcsv() : usage variations - with delimiter as NULL
---FILE--
-<?php
-/* Testing fputcsv() to write to a file when delimiter is NULL */
-
-echo "*** Testing fputcsv() : with delimiter as NULL ***\n";
-
-/* the array is with three elements in it. Each element should be read as
- 1st element is delimiter, 2nd element is enclosure
- and 3rd element is csv fields
-*/
-$csv_lists = array (
- array(',', '"', array('water','fruit') ),
- array(',', '"', array('"water","fruit') ),
- array(',', '"', array('"water","fruit"') ),
- array(' ', '^', array('^water^ ^fruit^')),
- array(':', '&', array('&water&:&fruit&')),
- array('=', '=', array('=water===fruit=')),
- array('-', '-', array('-water--fruit-air')),
- array('-', '-', array('-water---fruit---air-')),
- array(':', '&', array('&""""&:&"&:,:":&,&:,,,,'))
-
-);
-$file_path = __DIR__;
-$filename = "$file_path/fputcsv_variation2.tmp";
-
-$file_modes = array ("r+", "r+b", "r+t",
- "a+", "a+b", "a+t",
- "w+", "w+b", "w+t",
- "x+", "x+b", "x+t");
-
-$loop_counter = 1;
-foreach ($csv_lists as $csv_list) {
- for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
-
- echo "\n-- file opened in $file_modes[$mode_counter] --\n";
- // create the file and add the content with has csv fields
- if ( strstr($file_modes[$mode_counter], "r") ) {
- $file_handle = fopen($filename, "w");
- } else {
- $file_handle = fopen($filename, $file_modes[$mode_counter] );
- }
- if ( !$file_handle ) {
- echo "Error: failed to create file $filename!\n";
- exit();
- }
- $delimiter = $csv_list[0];
- $enclosure = $csv_list[1];
- $csv_field = $csv_list[2];
-
- // write to a file in csv format
- try {
- var_dump( fputcsv($file_handle, $csv_field, NULL, $enclosure) );
- } catch (\ValueError $e) {
- echo $e->getMessage() . \PHP_EOL;
- }
- // check the file pointer position and eof
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
- //close the file
- fclose($file_handle);
-
- // print the file contents
- var_dump( file_get_contents($filename) );
-
- //delete file
- unlink($filename);
- } //end of mode loop
-} // end of foreach
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fputcsv() : with delimiter as NULL ***
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-Done
diff --git a/ext/standard/tests/file/fputcsv_variation3.phpt b/ext/standard/tests/file/fputcsv_variation3.phpt
deleted file mode 100644
index eb8771aa4a..0000000000
--- a/ext/standard/tests/file/fputcsv_variation3.phpt
+++ /dev/null
@@ -1,724 +0,0 @@
---TEST--
-Test fputcsv() : usage variations - with enclosure as NULL
---FILE--
-<?php
-/* Testing fputcsv() to write to a file when enclosure is NULL */
-
-echo "*** Testing fputcsv() : with enclosure as NULL ***\n";
-
-/* the array is with three elements in it. Each element should be read as
- 1st element is delimiter, 2nd element is enclosure
- and 3rd element is csv fields
-*/
-$csv_lists = array (
- array(',', '"', array('water','fruit') ),
- array(',', '"', array('"water","fruit') ),
- array(',', '"', array('"water","fruit"') ),
- array(' ', '^', array('^water^ ^fruit^')),
- array(':', '&', array('&water&:&fruit&')),
- array('=', '=', array('=water===fruit=')),
- array('-', '-', array('-water--fruit-air')),
- array('-', '-', array('-water---fruit---air-')),
- array(':', '&', array('&""""&:&"&:,:":&,&:,,,,'))
-
-);
-$file_path = __DIR__;
-$filename = "$file_path/fputcsv_variation3.tmp";
-
-$file_modes = array ("r+", "r+b", "r+t",
- "a+", "a+b", "a+t",
- "w+", "w+b", "w+t",
- "x+", "x+b", "x+t");
-
-$loop_counter = 1;
-foreach ($csv_lists as $csv_list) {
- for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
-
- echo "\n-- file opened in $file_modes[$mode_counter] --\n";
- // create the file and add the content with has csv fields
- if ( strstr($file_modes[$mode_counter], "r") ) {
- $file_handle = fopen($filename, "w");
- } else {
- $file_handle = fopen($filename, $file_modes[$mode_counter] );
- }
- if ( !$file_handle ) {
- echo "Error: failed to create file $filename!\n";
- exit();
- }
- $delimiter = $csv_list[0];
- $enclosure = $csv_list[1];
- $csv_field = $csv_list[2];
-
- // write to a file in csv format
- try {
- var_dump( fputcsv($file_handle, $csv_field, $delimiter, NULL) );
- } catch (\ValueError $e) {
- echo $e->getMessage() . \PHP_EOL;
- }
- // check the file pointer position and eof
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
- //close the file
- fclose($file_handle);
-
- // print the file contents
- var_dump( file_get_contents($filename) );
-
- //delete file
- unlink($filename);
- } //end of mode loop
-} // end of foreach
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fputcsv() : with enclosure as NULL ***
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-Done
diff --git a/ext/standard/tests/file/fputcsv_variation4.phpt b/ext/standard/tests/file/fputcsv_variation4.phpt
deleted file mode 100644
index dc78796158..0000000000
--- a/ext/standard/tests/file/fputcsv_variation4.phpt
+++ /dev/null
@@ -1,724 +0,0 @@
---TEST--
-Test fputcsv() : usage variations - with delimiter and enclosure as NULL
---FILE--
-<?php
-/* Testing fputcsv() to write to a file when delimiter and enclosure is NULL */
-
-echo "*** Testing fputcsv() : with delimiter and enclosure as NULL ***\n";
-
-/* the array is with three elements in it. Each element should be read as
- 1st element is delimiter, 2nd element is enclosure
- and 3rd element is csv fields
-*/
-$csv_lists = array (
- array(',', '"', array('water','fruit') ),
- array(',', '"', array('"water","fruit') ),
- array(',', '"', array('"water","fruit"') ),
- array(' ', '^', array('^water^ ^fruit^')),
- array(':', '&', array('&water&:&fruit&')),
- array('=', '=', array('=water===fruit=')),
- array('-', '-', array('-water--fruit-air')),
- array('-', '-', array('-water---fruit---air-')),
- array(':', '&', array('&""""&:&"&:,:":&,&:,,,,'))
-
-);
-$file_path = __DIR__;
-$filename = "$file_path/fputcsv_variation4.tmp";
-
-$file_modes = array ("r+", "r+b", "r+t",
- "a+", "a+b", "a+t",
- "w+", "w+b", "w+t",
- "x+", "x+b", "x+t");
-
-$loop_counter = 1;
-foreach ($csv_lists as $csv_list) {
- for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
-
- echo "\n-- file opened in $file_modes[$mode_counter] --\n";
- // create the file and add the content with has csv fields
- if ( strstr($file_modes[$mode_counter], "r") ) {
- $file_handle = fopen($filename, "w");
- } else {
- $file_handle = fopen($filename, $file_modes[$mode_counter] );
- }
- if ( !$file_handle ) {
- echo "Error: failed to create file $filename!\n";
- exit();
- }
- $delimiter = $csv_list[0];
- $enclosure = $csv_list[1];
- $csv_field = $csv_list[2];
-
- // write to a file in csv format
- try {
- var_dump( fputcsv($file_handle, $csv_field, NULL, NULL) );
- } catch (\ValueError $e) {
- echo $e->getMessage() . \PHP_EOL;
- }
- // check the file pointer position and eof
- var_dump( ftell($file_handle) );
- var_dump( feof($file_handle) );
- //close the file
- fclose($file_handle);
-
- // print the file contents
- var_dump( file_get_contents($filename) );
-
- //delete file
- unlink($filename);
- } //end of mode loop
-} // end of foreach
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fputcsv() : with delimiter and enclosure as NULL ***
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-Done
diff --git a/ext/standard/tests/file/fscanf_error.phpt b/ext/standard/tests/file/fscanf_error.phpt
index c50af50b6d..da586555be 100644
--- a/ext/standard/tests/file/fscanf_error.phpt
+++ b/ext/standard/tests/file/fscanf_error.phpt
@@ -31,9 +31,7 @@ try {
fclose($file_handle);
// different invalid format strings
-$invalid_formats = array( $undefined_var,
- "%", "%h", "%.", "%d%m"
- );
+$invalid_formats = array("", "%", "%h", "%.", "%d%m");
// looping to use various invalid formats with fscanf()
@@ -57,12 +55,10 @@ $file_path = __DIR__;
$filename = "$file_path/fscanf_error.tmp";
unlink($filename);
?>
---EXPECTF--
+--EXPECT--
*** Testing fscanf() for error conditions ***
fscanf(): supplied resource is not a valid File-Handle resource
Different numbers of variable names and field specifiers
-
-Warning: Undefined variable $undefined_var in %s on line %d
array(0) {
}
Bad scan conversion character "
diff --git a/ext/standard/tests/file/glob_variation3.phpt b/ext/standard/tests/file/glob_variation3.phpt
index 4bf008a9a7..891bbb6fa1 100644
--- a/ext/standard/tests/file/glob_variation3.phpt
+++ b/ext/standard/tests/file/glob_variation3.phpt
@@ -4,7 +4,7 @@ Test glob() function: ensure no platform difference
<?php
$path = __DIR__;
-ini_set('open_basedir', NULL);
+ini_set('open_basedir', '');
var_dump(glob("$path/*.none"));
var_dump(glob("$path/?.none"));
diff --git a/ext/standard/tests/file/is_dir_variation3.phpt b/ext/standard/tests/file/is_dir_variation3.phpt
index ef875c34f8..730a2bcfea 100644
--- a/ext/standard/tests/file/is_dir_variation3.phpt
+++ b/ext/standard/tests/file/is_dir_variation3.phpt
@@ -12,7 +12,6 @@ $dirnames = array(
-2.34555,
TRUE,
FALSE,
- NULL,
" ",
/* scalars */
@@ -33,4 +32,3 @@ bool(false)
bool(false)
bool(false)
bool(false)
-bool(false)
diff --git a/ext/standard/tests/file/is_executable_variation3.phpt b/ext/standard/tests/file/is_executable_variation3.phpt
index 42e37f5731..b9b3a98e5c 100644
--- a/ext/standard/tests/file/is_executable_variation3.phpt
+++ b/ext/standard/tests/file/is_executable_variation3.phpt
@@ -23,9 +23,7 @@ $invalid_files = array(
-2.34555,
TRUE,
FALSE,
- NULL,
" ",
- @$file_handle
);
/* loop through to test each element in the above array
is an executable file */
@@ -46,6 +44,4 @@ bool(false)
bool(false)
bool(false)
bool(false)
-bool(false)
-bool(false)
Done
diff --git a/ext/standard/tests/file/is_readable_variation3.phpt b/ext/standard/tests/file/is_readable_variation3.phpt
index 320e6d49b9..e4a5766762 100644
--- a/ext/standard/tests/file/is_readable_variation3.phpt
+++ b/ext/standard/tests/file/is_readable_variation3.phpt
@@ -10,9 +10,6 @@ require __DIR__ . '/../skipif_root.inc';
echo "*** Testing is_readable(): usage variations ***\n";
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle);
-
echo "\n*** Testing is_readable() on miscellaneous filenames ***\n";
$misc_files = array(
0,
@@ -20,9 +17,7 @@ $misc_files = array(
-2.34555,
TRUE,
FALSE,
- NULL,
" ",
- @$file_handle
);
/* loop through to test each element in the above array
is a readable file */
@@ -43,6 +38,4 @@ bool(false)
bool(false)
bool(false)
bool(false)
-bool(false)
-bool(false)
Done
diff --git a/ext/standard/tests/file/is_writable_variation3.phpt b/ext/standard/tests/file/is_writable_variation3.phpt
index 286b64c4d3..021d6e5645 100644
--- a/ext/standard/tests/file/is_writable_variation3.phpt
+++ b/ext/standard/tests/file/is_writable_variation3.phpt
@@ -19,9 +19,7 @@ $misc_files = array(
-2.34555,
TRUE,
FALSE,
- NULL,
" ",
- @$file_handle
);
/* loop through to test each element in the above array
is a writable file */
@@ -47,7 +45,3 @@ bool(false)
bool(false)
bool(false)
bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
diff --git a/ext/standard/tests/file/lstat_stat_variation22.phpt b/ext/standard/tests/file/lstat_stat_variation22.phpt
index b89c5c5298..9efb23fc41 100644
--- a/ext/standard/tests/file/lstat_stat_variation22.phpt
+++ b/ext/standard/tests/file/lstat_stat_variation22.phpt
@@ -13,14 +13,12 @@ obscure_filename
--FILE--
<?php
echo "*** testing stat ***\n";
-var_dump(stat(NULL));
var_dump(stat(false));
var_dump(stat(''));
var_dump(stat(' '));
var_dump(stat('|'));
echo "*** testing lstat ***\n";
-var_dump(lstat(NULL));
var_dump(lstat(false));
var_dump(lstat(''));
var_dump(lstat(' '));
@@ -30,7 +28,6 @@ var_dump(lstat('|'));
*** testing stat ***
bool(false)
bool(false)
-bool(false)
Warning: stat(): stat failed for in %s on line %d
bool(false)
@@ -40,7 +37,6 @@ bool(false)
*** testing lstat ***
bool(false)
bool(false)
-bool(false)
Warning: lstat(): Lstat failed for in %s on line %d
bool(false)
diff --git a/ext/standard/tests/file/pathinfo_variaton.phpt b/ext/standard/tests/file/pathinfo_variaton.phpt
index 4447d07d6c..04e1f15c69 100644
--- a/ext/standard/tests/file/pathinfo_variaton.phpt
+++ b/ext/standard/tests/file/pathinfo_variaton.phpt
@@ -4,9 +4,6 @@ Test pathinfo() function: usage variations
<?php
echo "*** Testing pathinfo() with miscellaneous input arguments ***\n";
-$fp = fopen(__FILE__, "r");
-unset($fp);
-
class object_temp {
public $url_var = "www.foo.com";
var $html_var = "/var/html/testdir/example.html";
@@ -47,13 +44,6 @@ $paths = array (
"",
'',
- /* pathname as NULL */
- NULL,
- null,
-
- /* filename as resource */
- $fp,
-
/* pathname as members of object */
$obj->url_var,
$obj->html_var,
@@ -83,10 +73,8 @@ foreach($paths as $path) {
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing pathinfo() with miscellaneous input arguments ***
-
-Warning: Undefined variable $fp in %s on line %d
-- Iteration 1 --
array(3) {
["dirname"]=>
@@ -240,39 +228,6 @@ string(0) ""
string(0) ""
string(0) ""
-- Iteration 13 --
-array(2) {
- ["basename"]=>
- string(0) ""
- ["filename"]=>
- string(0) ""
-}
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 14 --
-array(2) {
- ["basename"]=>
- string(0) ""
- ["filename"]=>
- string(0) ""
-}
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 15 --
-array(2) {
- ["basename"]=>
- string(0) ""
- ["filename"]=>
- string(0) ""
-}
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 16 --
array(4) {
["dirname"]=>
string(1) "."
@@ -287,7 +242,7 @@ string(1) "."
string(11) "www.foo.com"
string(3) "com"
string(7) "www.foo"
--- Iteration 17 --
+-- Iteration 14 --
array(4) {
["dirname"]=>
string(17) "/var/html/testdir"
@@ -302,7 +257,7 @@ string(17) "/var/html/testdir"
string(12) "example.html"
string(4) "html"
string(7) "example"
--- Iteration 18 --
+-- Iteration 15 --
array(3) {
["dirname"]=>
string(12) "/testdir/foo"
@@ -315,7 +270,7 @@ string(12) "/testdir/foo"
string(4) "test"
string(0) ""
string(4) "test"
--- Iteration 19 --
+-- Iteration 16 --
array(4) {
["dirname"]=>
string(4) "/foo"
@@ -330,7 +285,7 @@ string(4) "/foo"
string(12) "symlink.link"
string(4) "link"
string(7) "symlink"
--- Iteration 20 --
+-- Iteration 17 --
array(3) {
["dirname"]=>
string(1) "."
@@ -343,7 +298,7 @@ string(1) "."
string(5) "12345"
string(0) ""
string(5) "12345"
--- Iteration 21 --
+-- Iteration 18 --
array(4) {
["dirname"]=>
string(1) "."
@@ -358,7 +313,7 @@ string(1) "."
string(15) "www.example.com"
string(3) "com"
string(11) "www.example"
--- Iteration 22 --
+-- Iteration 19 --
array(3) {
["dirname"]=>
string(12) "/testdir/foo"
@@ -371,7 +326,7 @@ string(12) "/testdir/foo"
string(4) "test"
string(0) ""
string(4) "test"
--- Iteration 23 --
+-- Iteration 20 --
array(4) {
["dirname"]=>
string(6) "../foo"
@@ -386,7 +341,7 @@ string(6) "../foo"
string(9) "test.link"
string(4) "link"
string(4) "test"
--- Iteration 24 --
+-- Iteration 21 --
array(4) {
["dirname"]=>
string(76) "./test/work/scratch/mydir/yourdir/ourdir/test1/test2/test3/test4/test5/test6"
@@ -401,7 +356,7 @@ string(76) "./test/work/scratch/mydir/yourdir/ourdir/test1/test2/test3/test4/tes
string(8) "test.tmp"
string(3) "tmp"
string(4) "test"
--- Iteration 25 --
+-- Iteration 22 --
array(4) {
["dirname"]=>
string(1) "."
diff --git a/ext/standard/tests/file/readfile_error.phpt b/ext/standard/tests/file/readfile_error.phpt
index bec5b383d7..9e47e68fac 100644
--- a/ext/standard/tests/file/readfile_error.phpt
+++ b/ext/standard/tests/file/readfile_error.phpt
@@ -9,11 +9,6 @@ echo "*** Test readfile(): error conditions ***\n";
echo "\n-- Testing readfile() with invalid arguments --\n";
// invalid arguments
try {
- var_dump( readfile(NULL) ); // NULL as $filename
-} catch (\ValueError $e) {
- echo $e->getMessage() . \PHP_EOL;
-}
-try {
var_dump( readfile('') ); // empty string as $filename
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
@@ -36,7 +31,6 @@ echo "Done\n";
-- Testing readfile() with invalid arguments --
Path cannot be empty
Path cannot be empty
-Path cannot be empty
-- Testing readfile() with non-existent file --
diff --git a/ext/standard/tests/file/readfile_variation10-win32.phpt b/ext/standard/tests/file/readfile_variation10-win32.phpt
index add9afd58d..325e47224d 100644
--- a/ext/standard/tests/file/readfile_variation10-win32.phpt
+++ b/ext/standard/tests/file/readfile_variation10-win32.phpt
@@ -19,7 +19,6 @@ $names_arr = array(
"-1" => -1,
"TRUE" => TRUE,
"FALSE" => FALSE,
- "NULL" => NULL,
"\"\"" => "",
"\" \"" => " ",
"\\0" => "\0",
@@ -54,9 +53,6 @@ Warning: readfile(1): Failed to open stream: No such file or directory in %s on
-- Filename: FALSE --
ValueError: Path cannot be empty
--- Filename: NULL --
-ValueError: Path cannot be empty
-
-- Filename: "" --
ValueError: Path cannot be empty
diff --git a/ext/standard/tests/file/readfile_variation10.phpt b/ext/standard/tests/file/readfile_variation10.phpt
index 99cb0b2d6b..a2fc2d79cb 100644
--- a/ext/standard/tests/file/readfile_variation10.phpt
+++ b/ext/standard/tests/file/readfile_variation10.phpt
Binary files differ
diff --git a/ext/standard/tests/file/readlink_realpath_variation3.phpt b/ext/standard/tests/file/readlink_realpath_variation3.phpt
index f256ffea42..44a53f0dfb 100644
--- a/ext/standard/tests/file/readlink_realpath_variation3.phpt
+++ b/ext/standard/tests/file/readlink_realpath_variation3.phpt
@@ -13,8 +13,6 @@ $link_string = array (
/* empty linkname */
"",
'',
- NULL,
- null
);
for($loop_counter = 0; $loop_counter < count($link_string); $loop_counter++) {
echo "-- Iteration";
@@ -51,14 +49,4 @@ string(%d) "%s"
Warning: readlink(): %s in %s on line %d
bool(false)
string(%d) "%s"
--- Iteration5 --
-
-Warning: readlink(): %s in %s on line %d
-bool(false)
-string(%d) "%s"
--- Iteration6 --
-
-Warning: readlink(): %s in %s on line %d
-bool(false)
-string(%d) "%s"
Done
diff --git a/ext/standard/tests/file/readlink_variation1.phpt b/ext/standard/tests/file/readlink_variation1.phpt
index b129de364f..6697286de2 100644
--- a/ext/standard/tests/file/readlink_variation1.phpt
+++ b/ext/standard/tests/file/readlink_variation1.phpt
@@ -17,7 +17,6 @@ $filenames = array(
"",
TRUE,
FALSE,
- NULL,
/* scalars */
1234,
@@ -55,6 +54,3 @@ bool(false)
Warning: readlink(): %s in %s on line %d
bool(false)
-
-Warning: readlink(): %s in %s on line %d
-bool(false)
diff --git a/ext/standard/tests/file/realpath_variation-win32-mb.phpt b/ext/standard/tests/file/realpath_variation-win32-mb.phpt
index a3539f6106..ea2f1c6fec 100644
--- a/ext/standard/tests/file/realpath_variation-win32-mb.phpt
+++ b/ext/standard/tests/file/realpath_variation-win32-mb.phpt
@@ -51,8 +51,6 @@ $file_string = array (
/* empty filename */
"",
'',
- NULL,
- null
);
for($loop_counter = 0; $loop_counter < count($file_string); $loop_counter++) {
echo "-- Iteration";
@@ -91,8 +89,4 @@ bool(false)
string(%d) "%s"
-- Iteration4 --
string(%d) "%s"
--- Iteration5 --
-string(%d) "%s"
--- Iteration6 --
-string(%d) "%s"
Done
diff --git a/ext/standard/tests/file/realpath_variation-win32.phpt b/ext/standard/tests/file/realpath_variation-win32.phpt
index 9f46c62e7c..1ea8ced7d0 100644
--- a/ext/standard/tests/file/realpath_variation-win32.phpt
+++ b/ext/standard/tests/file/realpath_variation-win32.phpt
@@ -51,8 +51,6 @@ $file_string = array (
/* empty filename */
"",
'',
- NULL,
- null
);
for($loop_counter = 0; $loop_counter < count($file_string); $loop_counter++) {
echo "-- Iteration";
@@ -91,8 +89,4 @@ bool(false)
string(%d) "%s"
-- Iteration4 --
string(%d) "%s"
--- Iteration5 --
-string(%d) "%s"
--- Iteration6 --
-string(%d) "%s"
Done
diff --git a/ext/standard/tests/file/rename_variation13-win32.phpt b/ext/standard/tests/file/rename_variation13-win32.phpt
index 65dbdfb8d6..a2cf9a528d 100644
--- a/ext/standard/tests/file/rename_variation13-win32.phpt
+++ b/ext/standard/tests/file/rename_variation13-win32.phpt
@@ -17,7 +17,6 @@ $names_arr = array(
-1, /* -1 is just a valid filename on windows */
TRUE, /* 1 as well, (string)TRUE > "1" */
FALSE,
- NULL,
"", // I think both p8 and php are wrong on the messages here
//p8 generates different messages to php, php is probably wrong
//php has either "File Exists" or "Permission Denied".
@@ -80,35 +79,28 @@ bool(false)
Warning: rename(,%safile.tmp): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
bool(false)
--- 3 testing '' NULL --
+-- 3 testing '' string --
Warning: rename(%safile.tmp,): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
bool(false)
Warning: rename(,%safile.tmp): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
bool(false)
--- 4 testing '' string --
-
-Warning: rename(%safile.tmp,): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
-bool(false)
-
-Warning: rename(,%safile.tmp): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
-bool(false)
--- 5 testing ' ' string --
+-- 4 testing ' ' string --
Warning: rename(%s): The filename, directory name, or volume label syntax is incorrect (code: 123) in %srename_variation13-win32.php on line %d
bool(false)
Warning: rename(%s): The filename, directory name, or volume label syntax is incorrect (code: 123) in %srename_variation13-win32.php on line %d
bool(false)
--- 6 testing '/no/such/file/dir' string --
+-- 5 testing '/no/such/file/dir' string --
Warning: rename(%safile.tmp,/no/such/file/dir): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
bool(false)
Warning: rename(/no/such/file/dir,%safile.tmp): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
bool(false)
--- 7 testing 'php/php' string --
+-- 6 testing 'php/php' string --
Warning: rename(%safile.tmp,php/php): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
bool(false)
diff --git a/ext/standard/tests/file/rename_variation13.phpt b/ext/standard/tests/file/rename_variation13.phpt
index 83de25cd84..1fa95f3726 100644
--- a/ext/standard/tests/file/rename_variation13.phpt
+++ b/ext/standard/tests/file/rename_variation13.phpt
@@ -23,7 +23,6 @@ $names_arr = array(
-1,
TRUE,
FALSE,
- NULL,
"",
" ",
@@ -78,13 +77,6 @@ bool(false)
Warning: rename(,%s/renameVar13/afile.tmp): %s in %s on line %d
bool(false)
--- testing '' --
-
-Warning: rename(%s/renameVar13/afile.tmp,): %s in %s on line %d
-bool(false)
-
-Warning: rename(,%s/renameVar13/afile.tmp): %s in %s on line %d
-bool(false)
-- testing ' ' --
bool(true)
diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
index 72737d1a8e..f4035f8f40 100644
--- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
+++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
@@ -19,17 +19,14 @@ $linkname = __DIR__."/symlink_link_linkinfo_is_link_link_error1.tmp";
echo "*** Testing symlink() for error conditions ***\n";
//invalid arguments
-var_dump( symlink(NULL, $linkname) ); // NULL as filename
var_dump( symlink('', $linkname) ); // empty string as filename
var_dump( symlink(false, $linkname) ); // boolean false as filename
-var_dump( symlink($filename, NULL) ); // NULL as linkname
var_dump( symlink($filename, '') ); // '' as linkname
var_dump( symlink($filename, false) ); // false as linkname
echo "\n*** Testing linkinfo() for error conditions ***\n";
//invalid arguments
-var_dump( linkinfo(NULL) ); // NULL as linkname
var_dump( linkinfo('') ); // empty string as linkname
var_dump( linkinfo(false) ); // boolean false as linkname
@@ -55,12 +52,6 @@ bool(false)
Warning: symlink(): %s in %s on line %d
bool(false)
-Warning: symlink(): %s in %s on line %d
-bool(false)
-
-Warning: symlink(): %s in %s on line %d
-bool(false)
-
*** Testing linkinfo() for error conditions ***
Warning: linkinfo(): %s in %s on line %d
@@ -68,7 +59,4 @@ int(-1)
Warning: linkinfo(): %s in %s on line %d
int(-1)
-
-Warning: linkinfo(): %s in %s on line %d
-int(-1)
Done
diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
index c5b21c0d21..fcc64d4098 100644
--- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
+++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
@@ -19,18 +19,15 @@ $linkname = __DIR__."/symlink_link_linkinfo_is_link_link_error2.tmp";
echo "*** Testing link() for error conditions ***\n";
//invalid arguments
-var_dump( link(NULL, $linkname) ); // NULL as filename
var_dump( link('', $linkname) ); // empty string as filename
var_dump( link(' ', $linkname) ); // space as filename
var_dump( link(false, $linkname) ); // boolean false as filename
-var_dump( link($filename, NULL) ); // NULL as linkname
var_dump( link($filename, '') ); // '' as linkname
var_dump( link($filename, false) ); // false as linkname
echo "\n*** Testing is_link() for error conditions ***\n";
//invalid arguments
-var_dump( is_link(NULL) ); // NULL as linkname
var_dump( is_link('') ); // empty string as linkname
var_dump( is_link(' ') ); // space as linkname
var_dump( is_link(false) ); // boolean false as linkname
@@ -60,16 +57,9 @@ bool(false)
Warning: link(): No such file or directory in %s on line %d
bool(false)
-Warning: link(): No such file or directory in %s on line %d
-bool(false)
-
-Warning: link(): No such file or directory in %s on line %d
-bool(false)
-
*** Testing is_link() for error conditions ***
bool(false)
bool(false)
bool(false)
bool(false)
-bool(false)
Done
diff --git a/ext/standard/tests/file/tempnam_variation3-win32.phpt b/ext/standard/tests/file/tempnam_variation3-win32.phpt
index 86990f0341..5bc4f5ec88 100644
--- a/ext/standard/tests/file/tempnam_variation3-win32.phpt
+++ b/ext/standard/tests/file/tempnam_variation3-win32.phpt
@@ -26,7 +26,6 @@ $names_arr = array(
-1,
TRUE,
FALSE,
- NULL,
"",
" ",
"\0",
@@ -47,7 +46,6 @@ $res_arr = array(
true,
true,
true,
- true,
false,
/* prefix with path separator of a non existing directory*/
@@ -99,17 +97,15 @@ OK
-- Iteration 3 --
OK
-- Iteration 4 --
-OK
--- Iteration 5 --
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation3-win32.php on line %d
Failed, not created in the correct directory %s vs %s
0
--- Iteration 6 --
+-- Iteration 5 --
tempnam(): Argument #2 ($prefix) must not contain any null bytes
--- Iteration 7 --
+-- Iteration 6 --
tempnam(): Argument #2 ($prefix) must be of type string, array given
--- Iteration 8 --
+-- Iteration 7 --
OK
--- Iteration 9 --
+-- Iteration 8 --
OK
diff --git a/ext/standard/tests/file/tempnam_variation3.phpt b/ext/standard/tests/file/tempnam_variation3.phpt
index baf0a5a868..6f20ec140e 100644
--- a/ext/standard/tests/file/tempnam_variation3.phpt
+++ b/ext/standard/tests/file/tempnam_variation3.phpt
@@ -21,7 +21,6 @@ $names_arr = array(
-1,
TRUE,
FALSE,
- NULL,
"",
" ",
"\0",
@@ -98,18 +97,14 @@ File name is => %s/%s
File permissions are => 100600
File created in => directory specified
-- Iteration 5 --
-File name is => %s/%s
-File permissions are => 100600
-File created in => directory specified
--- Iteration 6 --
tempnam(): Argument #2 ($prefix) must not contain any null bytes
--- Iteration 7 --
+-- Iteration 6 --
tempnam(): Argument #2 ($prefix) must be of type string, array given
--- Iteration 8 --
+-- Iteration 7 --
File name is => %s/dir%s
File permissions are => 100600
File created in => directory specified
--- Iteration 9 --
+-- Iteration 8 --
File name is => %s/php%s
File permissions are => 100600
File created in => directory specified
diff --git a/ext/standard/tests/file/tempnam_variation7-win32.phpt b/ext/standard/tests/file/tempnam_variation7-win32.phpt
index 0c951e2657..b731c76449 100644
--- a/ext/standard/tests/file/tempnam_variation7-win32.phpt
+++ b/ext/standard/tests/file/tempnam_variation7-win32.phpt
@@ -19,7 +19,6 @@ $names_arr = array(
-1,
TRUE,
FALSE,
- NULL,
"",
" ",
"\0",
@@ -86,26 +85,22 @@ File name is => %s%et%s
File permissions are => 100666
File created in => temp dir
-- Iteration 4 --
-File name is => %s%et%s
-File permissions are => 100666
-File created in => temp dir
--- Iteration 5 --
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
File name is => %s%et%s
File permissions are => 100666
File created in => temp dir
--- Iteration 6 --
+-- Iteration 5 --
tempnam(): Argument #1 ($directory) must not contain any null bytes
--- Iteration 7 --
+-- Iteration 6 --
tempnam(): Argument #1 ($directory) must be of type string, array given
--- Iteration 8 --
+-- Iteration 7 --
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
File name is => %s%et%s
File permissions are => 100666
File created in => temp dir
--- Iteration 9 --
+-- Iteration 8 --
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
File name is => %s%et%s
diff --git a/ext/standard/tests/file/tempnam_variation7.phpt b/ext/standard/tests/file/tempnam_variation7.phpt
index 9a0b1151c6..1928da4f89 100644
--- a/ext/standard/tests/file/tempnam_variation7.phpt
+++ b/ext/standard/tests/file/tempnam_variation7.phpt
@@ -19,7 +19,6 @@ $names_arr = array(
-1,
TRUE,
FALSE,
- NULL,
"",
" ",
"\0",
@@ -91,26 +90,22 @@ File name is => %s%etempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir
-- Iteration 4 --
-File name is => %s%etempnam_variation3.tmp%s
-File permissions are => 100600
-File created in => temp dir
--- Iteration 5 --
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d
File name is => %s%etempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir
--- Iteration 6 --
+-- Iteration 5 --
tempnam(): Argument #1 ($directory) must not contain any null bytes
--- Iteration 7 --
+-- Iteration 6 --
tempnam(): Argument #1 ($directory) must be of type string, array given
--- Iteration 8 --
+-- Iteration 7 --
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d
File name is => %s/tempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir
--- Iteration 9 --
+-- Iteration 8 --
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d
File name is => %s/tempnam_variation3.tmp%s
diff --git a/ext/standard/tests/file/unlink_error-win32-mb.phpt b/ext/standard/tests/file/unlink_error-win32-mb.phpt
index e85db00600..df98e2e367 100644
--- a/ext/standard/tests/file/unlink_error-win32-mb.phpt
+++ b/ext/standard/tests/file/unlink_error-win32-mb.phpt
@@ -27,9 +27,6 @@ echo "\n-- Testing unlink() on invalid arguments --\n";
var_dump( unlink('') ); // $filename as empty string
var_dump( file_exists('') ); // confirm file doesn't exist
-var_dump( unlink(NULL) ); // $filename as NULL
-var_dump( file_exists(NULL) ); // confirm file doesn't exist
-
var_dump( unlink(false) ); // $filename as boolean false
var_dump( file_exists(false) ); // confirm file doesn't exist
@@ -66,10 +63,6 @@ Warning: unlink(): %s in %s on line %d
bool(false)
bool(false)
-Warning: unlink(): %s in %s on line %d
-bool(false)
-bool(false)
-
-- Testing unlink() on non-existent file --
Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
diff --git a/ext/standard/tests/file/unlink_error-win32.phpt b/ext/standard/tests/file/unlink_error-win32.phpt
index af579be58d..6bce3d4b80 100644
--- a/ext/standard/tests/file/unlink_error-win32.phpt
+++ b/ext/standard/tests/file/unlink_error-win32.phpt
@@ -25,9 +25,6 @@ echo "\n-- Testing unlink() on invalid arguments --\n";
var_dump( unlink('') ); // $filename as empty string
var_dump( file_exists('') ); // confirm file doesn't exist
-var_dump( unlink(NULL) ); // $filename as NULL
-var_dump( file_exists(NULL) ); // confirm file doesn't exist
-
var_dump( unlink(false) ); // $filename as boolean false
var_dump( file_exists(false) ); // confirm file doesn't exist
@@ -63,10 +60,6 @@ Warning: unlink(): %s in %s on line %d
bool(false)
bool(false)
-Warning: unlink(): %s in %s on line %d
-bool(false)
-bool(false)
-
-- Testing unlink() on non-existent file --
Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
diff --git a/ext/standard/tests/file/unlink_error.phpt b/ext/standard/tests/file/unlink_error.phpt
index e5f809df05..1dd8ef1a25 100644
--- a/ext/standard/tests/file/unlink_error.phpt
+++ b/ext/standard/tests/file/unlink_error.phpt
@@ -25,9 +25,6 @@ echo "\n-- Testing unlink() on invalid arguments --\n";
var_dump( unlink('') ); // $filename as empty string
var_dump( file_exists('') ); // confirm file doesn't exist
-var_dump( unlink(NULL) ); // $filename as NULL
-var_dump( file_exists(NULL) ); // confirm file doesn't exist
-
var_dump( unlink(false) ); // $filename as boolean false
var_dump( file_exists(false) ); // confirm file doesn't exist
@@ -62,10 +59,6 @@ Warning: unlink(): %s in %s on line %d
bool(false)
bool(false)
-Warning: unlink(): %s in %s on line %d
-bool(false)
-bool(false)
-
-- Testing unlink() on non-existent file --
Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt
index a81ff66dfb..3e024c5e56 100644
--- a/ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt
+++ b/ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt
@@ -17,7 +17,7 @@ $d = $base . '\\dev\\http\\tproj\\app\\cache\\dev_old\\annotations\\72';
$foo = $d . '\\5b53796d666f6e795c42756e646c655c5477696742756e646c655c436f6e74726f6c6c65725c457863657074696f6e436f6e74726f6c6c657223676574416e64436c65616e4f7574707574427566666572696e67405b416e6e6f745d5d5b.doctrinecache.data';
$bar = $d . '\\5b53796d666f6e795c42756e646c655c5477696742756e646c655c436f6e74726f6c6c65725c457863657074696f6e436f6e74726f6c6c657223676574416e64436c65616e4f7574707574427566666572696e67405b416e6e6f745d5d5b315d.doctrinecache.data';
-mkdir($d, NULL, true);
+mkdir($d, 0777, true);
foreach (array($foo, $bar) as $f) {
touch($f);