diff options
Diffstat (limited to 'ext/standard/tests')
896 files changed, 1619 insertions, 1619 deletions
diff --git a/ext/standard/tests/array/001.phpt b/ext/standard/tests/array/001.phpt index 797a79781f..3b9804655b 100644 --- a/ext/standard/tests/array/001.phpt +++ b/ext/standard/tests/array/001.phpt @@ -4,7 +4,7 @@ Test array_merge and array_walk precision=14 --FILE-- <?php -require(dirname(__FILE__) . '/data.inc'); +require(__DIR__ . '/data.inc'); /* ** Create sample arrays ** Test alpha, numeric (decimal, hex, octal) and special data diff --git a/ext/standard/tests/array/002.phpt b/ext/standard/tests/array/002.phpt index 204863f0e9..f6aa37b9fb 100644 --- a/ext/standard/tests/array/002.phpt +++ b/ext/standard/tests/array/002.phpt @@ -4,7 +4,7 @@ Test arsort, asort, krsort, ksort, rsort, and sort precision=14 --FILE-- <?php -require(dirname(__FILE__) . '/data.inc'); +require(__DIR__ . '/data.inc'); function test_sort ($sort_function, $data) { echo "\n -- Testing $sort_function() -- \n"; diff --git a/ext/standard/tests/array/003.phpt b/ext/standard/tests/array/003.phpt index f307186553..cce2d4922c 100644 --- a/ext/standard/tests/array/003.phpt +++ b/ext/standard/tests/array/003.phpt @@ -4,7 +4,7 @@ Test usort, uksort and uasort precision=14 --FILE-- <?php -require(dirname(__FILE__) . '/data.inc'); +require(__DIR__ . '/data.inc'); function cmp ($a, $b) { is_array ($a) diff --git a/ext/standard/tests/array/array_search_variation4.phpt b/ext/standard/tests/array/array_search_variation4.phpt index cbbf714b6f..f9b55dfe4d 100644 --- a/ext/standard/tests/array/array_search_variation4.phpt +++ b/ext/standard/tests/array/array_search_variation4.phpt @@ -14,7 +14,7 @@ echo "*** Testing resource type with array_search() ***\n"; $file_handle = fopen(__FILE__, "r"); //directory type resource -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); //store resources in array for comparison. $resources = array($file_handle, $dir_handle); diff --git a/ext/standard/tests/array/end.phpt b/ext/standard/tests/array/end.phpt index dc3f2eb75e..724f2e612f 100644 --- a/ext/standard/tests/array/end.phpt +++ b/ext/standard/tests/array/end.phpt @@ -99,7 +99,7 @@ echo "\n*** Testing end() on resource type ***\n"; $file_handle = fopen(__FILE__, "r"); //directory type resource -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); //store resources in array $resources = array($file_handle, $dir_handle); diff --git a/ext/standard/tests/array/end_64bit.phpt b/ext/standard/tests/array/end_64bit.phpt index 0af5064e82..0049041848 100644 --- a/ext/standard/tests/array/end_64bit.phpt +++ b/ext/standard/tests/array/end_64bit.phpt @@ -99,7 +99,7 @@ echo "\n*** Testing end() on resource type ***\n"; $file_handle = fopen(__FILE__, "r"); //directory type resource -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); //store resources in array $resources = array($file_handle, $dir_handle); diff --git a/ext/standard/tests/array/in_array_variation4.phpt b/ext/standard/tests/array/in_array_variation4.phpt index 186eb2718d..d481010211 100644 --- a/ext/standard/tests/array/in_array_variation4.phpt +++ b/ext/standard/tests/array/in_array_variation4.phpt @@ -17,7 +17,7 @@ echo "*** Testing resource type with in_array() ***\n"; $file_handle = fopen(__FILE__, "r"); //directory type resource -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); //store resources in array for comparison. $resources = array($file_handle, $dir_handle); diff --git a/ext/standard/tests/dir/bug73877.phpt b/ext/standard/tests/dir/bug73877.phpt index 2fa6c90f02..633a4eef81 100644 --- a/ext/standard/tests/dir/bug73877.phpt +++ b/ext/standard/tests/dir/bug73877.phpt @@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { --FILE-- <?php -$base = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug73877"; +$base = __DIR__ . DIRECTORY_SEPARATOR . "bug73877"; $dir0 = $base . DIRECTORY_SEPARATOR . "bug73877"; $dir1 = $base . DIRECTORY_SEPARATOR . "Серёжка"; $junk0 = $base . DIRECTORY_SEPARATOR . "Серёжка2"; @@ -31,7 +31,7 @@ var_dump( --CLEAN-- <?php -$base = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug73877"; +$base = __DIR__ . DIRECTORY_SEPARATOR . "bug73877"; $dir0 = $base . DIRECTORY_SEPARATOR . "bug73877"; $dir1 = $base . DIRECTORY_SEPARATOR . "Серёжка"; $junk0 = $base . DIRECTORY_SEPARATOR . "Серёжка2"; diff --git a/ext/standard/tests/dir/chdir_basic.phpt b/ext/standard/tests/dir/chdir_basic.phpt index 4e18988076..6c96898dd8 100644 --- a/ext/standard/tests/dir/chdir_basic.phpt +++ b/ext/standard/tests/dir/chdir_basic.phpt @@ -12,7 +12,7 @@ Test chdir() function : basic functionality */ echo "*** Testing chdir() : basic functionality ***\n"; -$base_dir_path = dirname(__FILE__); +$base_dir_path = __DIR__; $level1_one_dir_name = "level1_one"; $level1_one_dir_path = "$base_dir_path/$level1_one_dir_name"; @@ -36,7 +36,7 @@ var_dump(getcwd()); ===DONE=== --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/level1_one/level1_two"); rmdir("$file_path/level1_one"); ?> diff --git a/ext/standard/tests/dir/chdir_variation2.phpt b/ext/standard/tests/dir/chdir_variation2.phpt index 097ab56e00..7f9c3845ee 100644 --- a/ext/standard/tests/dir/chdir_variation2.phpt +++ b/ext/standard/tests/dir/chdir_variation2.phpt @@ -13,7 +13,7 @@ Test chdir() function : usage variations - relative paths echo "*** Testing chdir() : usage variations ***\n"; -$base_dir_path = dirname(__FILE__); +$base_dir_path = __DIR__; $level2_one_dir_name = "level2_one"; $level2_one_dir_path = "$base_dir_path/$level2_one_dir_name"; @@ -62,7 +62,7 @@ var_dump(getcwd()); ===DONE=== --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/level2_one/level2_two"); rmdir("$file_path/level2_one"); ?> diff --git a/ext/standard/tests/dir/closedir_basic-win32-mb.phpt b/ext/standard/tests/dir/closedir_basic-win32-mb.phpt index 8515756b17..f74ac29952 100644 --- a/ext/standard/tests/dir/closedir_basic-win32-mb.phpt +++ b/ext/standard/tests/dir/closedir_basic-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing closedir() : basic functionality ***\n"; -$base_dir = dirname(__FILE__); +$base_dir = __DIR__; $dir_path = $base_dir . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™closedir_basic'; mkdir($dir_path); @@ -43,7 +43,7 @@ var_dump($dh2); ===DONE=== --CLEAN-- <?php -$base_dir = dirname(__FILE__); +$base_dir = __DIR__; $dir_path = $base_dir . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™closedir_basic'; rmdir($dir_path); ?> diff --git a/ext/standard/tests/dir/closedir_basic.phpt b/ext/standard/tests/dir/closedir_basic.phpt index 2ef1aa7814..94aaebf9f9 100644 --- a/ext/standard/tests/dir/closedir_basic.phpt +++ b/ext/standard/tests/dir/closedir_basic.phpt @@ -14,7 +14,7 @@ Test closedir() function : basic functionality echo "*** Testing closedir() : basic functionality ***\n"; -$base_dir = dirname(__FILE__); +$base_dir = __DIR__; $dir_path = $base_dir . '/closedir_basic'; mkdir($dir_path); @@ -37,7 +37,7 @@ var_dump($dh2); ===DONE=== --CLEAN-- <?php -$base_dir = dirname(__FILE__); +$base_dir = __DIR__; $dir_path = $base_dir . '/closedir_basic'; rmdir($dir_path); ?> diff --git a/ext/standard/tests/dir/closedir_error-win32-mb.phpt b/ext/standard/tests/dir/closedir_error-win32-mb.phpt index e5ca80b7d2..e0a399c688 100644 --- a/ext/standard/tests/dir/closedir_error-win32-mb.phpt +++ b/ext/standard/tests/dir/closedir_error-win32-mb.phpt @@ -24,7 +24,7 @@ echo "*** Testing closedir() : error conditions ***\n"; //Test closedir with one more than the expected number of arguments echo "\n-- Testing closedir() function with more than expected no. of arguments --\n"; -$dir_path = dirname(__FILE__) . '\ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™closedir_error'; +$dir_path = __DIR__ . '\ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™closedir_error'; mkdir($dir_path); $dir_handle = opendir($dir_path); @@ -37,7 +37,7 @@ closedir($dir_handle); ===DONE=== --CLEAN-- <?php -$base_dir = dirname(__FILE__); +$base_dir = __DIR__; $dir_path = $base_dir . '\ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™closedir_error'; rmdir($dir_path); ?> diff --git a/ext/standard/tests/dir/closedir_variation2-win32-mb.phpt b/ext/standard/tests/dir/closedir_variation2-win32-mb.phpt index f46a99b872..07b9ab869a 100644 --- a/ext/standard/tests/dir/closedir_variation2-win32-mb.phpt +++ b/ext/standard/tests/dir/closedir_variation2-win32-mb.phpt @@ -21,7 +21,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing closedir() : usage variations ***\n"; //create temporary directory for test, removed in CLEAN section -$directory = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™closedir_variation2"; +$directory = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™closedir_variation2"; mkdir($directory); $dh = opendir($directory); @@ -39,7 +39,7 @@ var_dump($dh); ===DONE=== --CLEAN-- <?php -$directory = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™closedir_variation2"; +$directory = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™closedir_variation2"; rmdir($directory); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/closedir_variation2.phpt b/ext/standard/tests/dir/closedir_variation2.phpt index 303d47c84e..cb85750e71 100644 --- a/ext/standard/tests/dir/closedir_variation2.phpt +++ b/ext/standard/tests/dir/closedir_variation2.phpt @@ -15,7 +15,7 @@ Test closedir() function : usage variations - close directory handle twice echo "*** Testing closedir() : usage variations ***\n"; //create temporary directory for test, removed in CLEAN section -$directory = dirname(__FILE__) . "/closedir_variation2"; +$directory = __DIR__ . "/closedir_variation2"; mkdir($directory); $dh = opendir($directory); @@ -33,7 +33,7 @@ var_dump($dh); ===DONE=== --CLEAN-- <?php -$directory = dirname(__FILE__) . "/closedir_variation2"; +$directory = __DIR__ . "/closedir_variation2"; rmdir($directory); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/dir_basic-win32-mb.phpt b/ext/standard/tests/dir/dir_basic-win32-mb.phpt index d6c8ebca8f..d643846852 100644 --- a/ext/standard/tests/dir/dir_basic-win32-mb.phpt +++ b/ext/standard/tests/dir/dir_basic-win32-mb.phpt @@ -17,10 +17,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing dir() : basic functionality ***\n"; // include the file.inc for Function: function create_files() -include(dirname(__FILE__)."/../file/file.inc"); +include(__DIR__."/../file/file.inc"); // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™dir_basic"; @mkdir($dir_path); @@ -53,7 +53,7 @@ echo "Done"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™dir_basic"; rmdir($dir_path); diff --git a/ext/standard/tests/dir/dir_basic.phpt b/ext/standard/tests/dir/dir_basic.phpt index 68ac552a6f..4360a749c7 100644 --- a/ext/standard/tests/dir/dir_basic.phpt +++ b/ext/standard/tests/dir/dir_basic.phpt @@ -11,10 +11,10 @@ Test dir() function : basic functionality echo "*** Testing dir() : basic functionality ***\n"; // include the file.inc for Function: function create_files() -include(dirname(__FILE__)."/../file/file.inc"); +include(__DIR__."/../file/file.inc"); // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_basic"; @mkdir($dir_path); @@ -47,7 +47,7 @@ echo "Done"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_basic"; rmdir($dir_path); diff --git a/ext/standard/tests/dir/dir_variation3.phpt b/ext/standard/tests/dir/dir_variation3.phpt index 91dc504713..041304eba4 100644 --- a/ext/standard/tests/dir/dir_variation3.phpt +++ b/ext/standard/tests/dir/dir_variation3.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/dir_root_check.tmp"; +$filename = __DIR__."/dir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -31,7 +31,7 @@ unlink($filename); echo "*** Testing dir() : different directory permissions ***"; // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_variation3"; @mkdir($dir_path); @@ -58,7 +58,7 @@ for($count = 0; $count < count($permission_values); $count++) { echo "\n-- Iteration ".($count + 1)." --\n"; // try to remove the dir if exists & create - $file_path = dirname(__FILE__); + $file_path = __DIR__; $dir_path = $file_path."/dir_variation3"; @chmod ($dir_path, 0777); // change dir permission to allow all operation @rmdir ($dir_path); // try n delete the dir @@ -86,7 +86,7 @@ echo "Done"; --CLEAN-- <?php // deleting temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_variation3"; rmdir($dir_path); ?> diff --git a/ext/standard/tests/dir/dir_variation4-win32-mb.phpt b/ext/standard/tests/dir/dir_variation4-win32-mb.phpt index 71fe0b2979..cdb9711f23 100644 --- a/ext/standard/tests/dir/dir_variation4-win32-mb.phpt +++ b/ext/standard/tests/dir/dir_variation4-win32-mb.phpt @@ -22,10 +22,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing dir() : operate on previously opened directory ***\n"; // include the file.inc for Function: function create_files() -include( dirname(__FILE__)."/../file/file.inc"); +include( __DIR__."/../file/file.inc"); // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™dir_variation4"; @mkdir($dir_path); @@ -52,7 +52,7 @@ echo "Done"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™dir_variation4"; rmdir($dir_path); diff --git a/ext/standard/tests/dir/dir_variation4.phpt b/ext/standard/tests/dir/dir_variation4.phpt index ae57413754..c0c8dda2b7 100644 --- a/ext/standard/tests/dir/dir_variation4.phpt +++ b/ext/standard/tests/dir/dir_variation4.phpt @@ -16,10 +16,10 @@ Test dir() function : usage variations - operate on previously opened directory echo "*** Testing dir() : operate on previously opened directory ***\n"; // include the file.inc for Function: function create_files() -include( dirname(__FILE__)."/../file/file.inc"); +include( __DIR__."/../file/file.inc"); // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_variation4"; @mkdir($dir_path); @@ -46,7 +46,7 @@ echo "Done"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_variation4"; rmdir($dir_path); diff --git a/ext/standard/tests/dir/dir_variation6.phpt b/ext/standard/tests/dir/dir_variation6.phpt index 3fdfc789e2..c7ce2bc080 100644 --- a/ext/standard/tests/dir/dir_variation6.phpt +++ b/ext/standard/tests/dir/dir_variation6.phpt @@ -21,7 +21,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing dir() : open a non-existent directory ***\n"; // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_variation6"; @mkdir($dir_path); diff --git a/ext/standard/tests/dir/dir_variation7.phpt b/ext/standard/tests/dir/dir_variation7.phpt index 11bfa0cb8e..e069043fe3 100644 --- a/ext/standard/tests/dir/dir_variation7.phpt +++ b/ext/standard/tests/dir/dir_variation7.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/dir_root_check.tmp"; +$filename = __DIR__."/dir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -36,7 +36,7 @@ echo "*** Testing dir() : remove execute permission from the parent dir ***\n"; |-> sub_dir ( sub parent ) |-> child_dir ( child dir) */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $parent_dir_path = $file_path."/dir_variation7"; @mkdir($parent_dir_path); chmod($parent_dir_path, 0777); @@ -67,7 +67,7 @@ echo "Done"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $parent_dir_path = $file_path."/dir_variation7"; $sub_dir_path = $parent_dir_path."/sub_dir"; $child_dir_path = $sub_dir_path."/child_dir"; diff --git a/ext/standard/tests/dir/dir_variation8.phpt b/ext/standard/tests/dir/dir_variation8.phpt index 4e7bd13f2f..8664a33e34 100644 --- a/ext/standard/tests/dir/dir_variation8.phpt +++ b/ext/standard/tests/dir/dir_variation8.phpt @@ -22,7 +22,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing dir() : checking with wildcard characters ***\n"; // create the temporary directories -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_variation81"; $sub_dir_path = $dir_path."/sub_dir1"; diff --git a/ext/standard/tests/dir/dir_variation9.phpt b/ext/standard/tests/dir/dir_variation9.phpt index 3756ffd42d..50f6d6c3ce 100644 --- a/ext/standard/tests/dir/dir_variation9.phpt +++ b/ext/standard/tests/dir/dir_variation9.phpt @@ -23,7 +23,7 @@ echo "*** Testing dir() : checking with valid and invalid paths ***\n"; /* create the temporary directories */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // directory dir_variation91 with one sub-directory sub_dir11 and sub-sub-directory sub_dir111 $dir_path1 = $file_path."/dir_variation91"; @@ -58,7 +58,7 @@ echo "Done"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path1 = $file_path."/dir_variation91"; $sub_dir11 = $dir_path1."/sub_dir11"; diff --git a/ext/standard/tests/dir/getcwd_basic-win32-mb.phpt b/ext/standard/tests/dir/getcwd_basic-win32-mb.phpt index f3d2a6d1d4..41d90864ef 100644 --- a/ext/standard/tests/dir/getcwd_basic-win32-mb.phpt +++ b/ext/standard/tests/dir/getcwd_basic-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing getcwd() : basic functionality ***\n"; //create temporary directory for test, removed in CLEAN section -$directory = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™getcwd_basic"; +$directory = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™getcwd_basic"; mkdir($directory); var_dump(getcwd()); @@ -30,7 +30,7 @@ var_dump(getcwd()); ===DONE=== --CLEAN-- <?php -$directory = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™getcwd_basic"; +$directory = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™getcwd_basic"; rmdir($directory); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/getcwd_basic.phpt b/ext/standard/tests/dir/getcwd_basic.phpt index f09eb7165a..577521a347 100644 --- a/ext/standard/tests/dir/getcwd_basic.phpt +++ b/ext/standard/tests/dir/getcwd_basic.phpt @@ -14,7 +14,7 @@ Test getcwd() function : basic functionality echo "*** Testing getcwd() : basic functionality ***\n"; //create temporary directory for test, removed in CLEAN section -$directory = dirname(__FILE__) . "/getcwd_basic"; +$directory = __DIR__ . "/getcwd_basic"; mkdir($directory); var_dump(getcwd()); @@ -24,7 +24,7 @@ var_dump(getcwd()); ===DONE=== --CLEAN-- <?php -$directory = dirname(__FILE__) . "/getcwd_basic"; +$directory = __DIR__ . "/getcwd_basic"; rmdir($directory); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/opendir_error2.phpt b/ext/standard/tests/dir/opendir_error2.phpt index 9156585938..47b7709cec 100644 --- a/ext/standard/tests/dir/opendir_error2.phpt +++ b/ext/standard/tests/dir/opendir_error2.phpt @@ -20,11 +20,11 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing opendir() : error conditions ***\n"; echo "\n-- Pass a non-existent absolute path: --\n"; -$path = dirname(__FILE__) . "/idonotexist"; +$path = __DIR__ . "/idonotexist"; var_dump(opendir($path)); echo "\n-- Pass a non-existent relative path: --\n"; -chdir(dirname(__FILE__)); +chdir(__DIR__); var_dump(opendir('idonotexist')); ?> ===DONE=== diff --git a/ext/standard/tests/dir/opendir_variation3-win32-mb.phpt b/ext/standard/tests/dir/opendir_variation3-win32-mb.phpt index 6ffd12aaff..8bf2d3c26a 100644 --- a/ext/standard/tests/dir/opendir_variation3-win32-mb.phpt +++ b/ext/standard/tests/dir/opendir_variation3-win32-mb.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing opendir() : usage variation ***\n"; -$path = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™opendir_variation3"; +$path = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™opendir_variation3"; mkdir($path); echo "\n-- Open directory first time: --\n"; @@ -40,7 +40,7 @@ closedir($dh2); ===DONE=== --CLEAN-- <?php -$path = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™opendir_variation3"; +$path = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™opendir_variation3"; rmdir($path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/opendir_variation3.phpt b/ext/standard/tests/dir/opendir_variation3.phpt index 1e9a62f394..65ec8df82f 100644 --- a/ext/standard/tests/dir/opendir_variation3.phpt +++ b/ext/standard/tests/dir/opendir_variation3.phpt @@ -13,7 +13,7 @@ Test opendir() function : usage variations - open a directory twice echo "*** Testing opendir() : usage variation ***\n"; -$path = dirname(__FILE__) . "/opendir_variation3"; +$path = __DIR__ . "/opendir_variation3"; mkdir($path); echo "\n-- Open directory first time: --\n"; @@ -34,7 +34,7 @@ closedir($dh2); ===DONE=== --CLEAN-- <?php -$path = dirname(__FILE__) . "/opendir_variation3"; +$path = __DIR__ . "/opendir_variation3"; rmdir($path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/opendir_variation5.phpt b/ext/standard/tests/dir/opendir_variation5.phpt index bd8b90d464..ac12930280 100644 --- a/ext/standard/tests/dir/opendir_variation5.phpt +++ b/ext/standard/tests/dir/opendir_variation5.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/dir_root_check.tmp"; +$filename = __DIR__."/dir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -36,7 +36,7 @@ echo "*** Testing opendir() : usage variations ***\n"; * |-> child_dir ( child dir) */ -$parent_dir_path = dirname(__FILE__) . "/opendir_variation5"; +$parent_dir_path = __DIR__ . "/opendir_variation5"; mkdir($parent_dir_path); chmod($parent_dir_path, 0777); @@ -74,7 +74,7 @@ if (is_resource($dir_handle2)) { ===DONE=== --CLEAN-- <?php -$parent_dir_path = dirname(__FILE__) . "/opendir_variation5"; +$parent_dir_path = __DIR__ . "/opendir_variation5"; $sub_dir_path = $parent_dir_path."/sub_dir"; $child_dir_path = $sub_dir_path."/child_dir"; diff --git a/ext/standard/tests/dir/opendir_variation6-win32.phpt b/ext/standard/tests/dir/opendir_variation6-win32.phpt index caca6a0504..3e3c26e679 100644 --- a/ext/standard/tests/dir/opendir_variation6-win32.phpt +++ b/ext/standard/tests/dir/opendir_variation6-win32.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing opendir() : usage variations ***\n"; // create the temporary directories -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path . "/opendir_variation6"; $sub_dir_path = $dir_path . "/sub_dir1"; @@ -40,7 +40,7 @@ var_dump( opendir($dir_path . "/sub?dir1") ); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/opendir_variation6"; +$dir_path = __DIR__ . "/opendir_variation6"; $sub_dir_path = $dir_path . "/sub_dir1"; rmdir($sub_dir_path); diff --git a/ext/standard/tests/dir/opendir_variation6.phpt b/ext/standard/tests/dir/opendir_variation6.phpt index e16235ba87..c51cd4ca26 100644 --- a/ext/standard/tests/dir/opendir_variation6.phpt +++ b/ext/standard/tests/dir/opendir_variation6.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing opendir() : usage variations ***\n"; // create the temporary directories -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path . "/opendir_variation6"; $sub_dir_path = $dir_path . "/sub_dir1"; @@ -40,7 +40,7 @@ var_dump( opendir($dir_path . "/sub?dir1") ); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/opendir_variation6"; +$dir_path = __DIR__ . "/opendir_variation6"; $sub_dir_path = $dir_path . "/sub_dir1"; rmdir($sub_dir_path); diff --git a/ext/standard/tests/dir/opendir_variation7.phpt b/ext/standard/tests/dir/opendir_variation7.phpt index a75859b9fc..d468f27008 100644 --- a/ext/standard/tests/dir/opendir_variation7.phpt +++ b/ext/standard/tests/dir/opendir_variation7.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__) . "/opendir_root_check.tmp"; +$filename = __DIR__ . "/opendir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -29,7 +29,7 @@ unlink($filename); echo "*** Testing opendir() : usage variations ***\n"; // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path . "/opendir_variation7"; mkdir($dir_path); @@ -79,7 +79,7 @@ foreach ($permission_values as $perm) { --CLEAN-- <?php // deleting temporary directory -$dir_path = dirname(__FILE__) . "/opendir_variation7"; +$dir_path = __DIR__ . "/opendir_variation7"; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/readdir_basic-win32-mb.phpt b/ext/standard/tests/dir/readdir_basic-win32-mb.phpt index f9a7db632d..697d8774f9 100644 --- a/ext/standard/tests/dir/readdir_basic-win32-mb.phpt +++ b/ext/standard/tests/dir/readdir_basic-win32-mb.phpt @@ -20,10 +20,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing readdir() : basic functionality ***\n"; // include the file.inc for Function: function create_files() -chdir(dirname(__FILE__)); -include(dirname(__FILE__)."/../file/file.inc"); +chdir(__DIR__); +include(__DIR__."/../file/file.inc"); -$path = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_basic'; +$path = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_basic'; mkdir($path); create_files($path, 3); @@ -55,7 +55,7 @@ closedir($dh); ===DONE=== --CLEAN-- <?php -$path = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_basic'; +$path = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_basic'; rmdir($path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/readdir_basic.phpt b/ext/standard/tests/dir/readdir_basic.phpt index c6d1d79d79..8c615afc5e 100644 --- a/ext/standard/tests/dir/readdir_basic.phpt +++ b/ext/standard/tests/dir/readdir_basic.phpt @@ -14,10 +14,10 @@ Test readdir() function : basic functionality echo "*** Testing readdir() : basic functionality ***\n"; // include the file.inc for Function: function create_files() -chdir(dirname(__FILE__)); -include(dirname(__FILE__)."/../file/file.inc"); +chdir(__DIR__); +include(__DIR__."/../file/file.inc"); -$path = dirname(__FILE__) . '/readdir_basic'; +$path = __DIR__ . '/readdir_basic'; mkdir($path); create_files($path, 3); @@ -49,7 +49,7 @@ closedir($dh); ===DONE=== --CLEAN-- <?php -$path = dirname(__FILE__) . '/readdir_basic'; +$path = __DIR__ . '/readdir_basic'; rmdir($path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/readdir_variation2-win32-mb.phpt b/ext/standard/tests/dir/readdir_variation2-win32-mb.phpt index 31e52c1105..ede4199ac6 100644 --- a/ext/standard/tests/dir/readdir_variation2-win32-mb.phpt +++ b/ext/standard/tests/dir/readdir_variation2-win32-mb.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing readdir() : usage variations ***\n"; -$path = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation2'; +$path = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation2'; mkdir($path); $dir_handle = opendir($path); @@ -42,7 +42,7 @@ foreach($entries as $entry) { ===DONE=== --CLEAN-- <?php -$path = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation2'; +$path = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation2'; rmdir($path); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/readdir_variation2.phpt b/ext/standard/tests/dir/readdir_variation2.phpt index 38965872b0..fbe383e768 100644 --- a/ext/standard/tests/dir/readdir_variation2.phpt +++ b/ext/standard/tests/dir/readdir_variation2.phpt @@ -13,7 +13,7 @@ Test readdir() function : usage variations - empty directories echo "*** Testing readdir() : usage variations ***\n"; -$path = dirname(__FILE__) . '/readdir_variation2'; +$path = __DIR__ . '/readdir_variation2'; mkdir($path); $dir_handle = opendir($path); @@ -36,7 +36,7 @@ foreach($entries as $entry) { ===DONE=== --CLEAN-- <?php -$path = dirname(__FILE__) . '/readdir_variation2'; +$path = __DIR__ . '/readdir_variation2'; rmdir($path); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/readdir_variation3-win32-mb.phpt b/ext/standard/tests/dir/readdir_variation3-win32-mb.phpt index 1b3114c550..2f343dcd62 100644 --- a/ext/standard/tests/dir/readdir_variation3-win32-mb.phpt +++ b/ext/standard/tests/dir/readdir_variation3-win32-mb.phpt @@ -21,10 +21,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing readdir() : usage variations ***\n"; // include the file.inc for Function: function create_files() -chdir(dirname(__FILE__)); -include(dirname(__FILE__)."/../file/file.inc"); +chdir(__DIR__); +include(__DIR__."/../file/file.inc"); -$path_top = dirname(__FILE__) . '/readdir_variation3'; +$path_top = __DIR__ . '/readdir_variation3'; $path_sub = $path_top . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™sub_folder'; mkdir($path_top); mkdir($path_sub); @@ -52,7 +52,7 @@ closedir($dir_handle); ===DONE=== --CLEAN-- <?php -$path_top = dirname(__FILE__) . '/readdir_variation3'; +$path_top = __DIR__ . '/readdir_variation3'; $path_sub = $path_top . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™sub_folder'; rmdir($path_sub); rmdir($path_top); diff --git a/ext/standard/tests/dir/readdir_variation3.phpt b/ext/standard/tests/dir/readdir_variation3.phpt index 1a7566c547..849068e97a 100644 --- a/ext/standard/tests/dir/readdir_variation3.phpt +++ b/ext/standard/tests/dir/readdir_variation3.phpt @@ -15,10 +15,10 @@ Test readdir() function : usage variations - sub-directories echo "*** Testing readdir() : usage variations ***\n"; // include the file.inc for Function: function create_files() -chdir(dirname(__FILE__)); -include(dirname(__FILE__)."/../file/file.inc"); +chdir(__DIR__); +include(__DIR__."/../file/file.inc"); -$path_top = dirname(__FILE__) . '/readdir_variation3'; +$path_top = __DIR__ . '/readdir_variation3'; $path_sub = $path_top . '/sub_folder'; mkdir($path_top); mkdir($path_sub); @@ -46,7 +46,7 @@ closedir($dir_handle); ===DONE=== --CLEAN-- <?php -$path_top = dirname(__FILE__) . '/readdir_variation3'; +$path_top = __DIR__ . '/readdir_variation3'; $path_sub = $path_top . '/sub_folder'; rmdir($path_sub); rmdir($path_top); diff --git a/ext/standard/tests/dir/readdir_variation4-win32-mb.phpt b/ext/standard/tests/dir/readdir_variation4-win32-mb.phpt index 1c766a51d5..a77fcd8ca4 100644 --- a/ext/standard/tests/dir/readdir_variation4-win32-mb.phpt +++ b/ext/standard/tests/dir/readdir_variation4-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing readdir() : usage variations ***\n"; -$dir_path = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation4/"; +$dir_path = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation4/"; mkdir($dir_path); // heredoc string @@ -84,7 +84,7 @@ closedir($dir_handle); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation4/"; +$dir_path = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation4/"; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/readdir_variation4.phpt b/ext/standard/tests/dir/readdir_variation4.phpt index acbb8f32ab..22eb62381a 100644 --- a/ext/standard/tests/dir/readdir_variation4.phpt +++ b/ext/standard/tests/dir/readdir_variation4.phpt @@ -14,7 +14,7 @@ Test readdir() function : usage variations - different file names echo "*** Testing readdir() : usage variations ***\n"; -$dir_path = dirname(__FILE__) . "/readdir_variation4/"; +$dir_path = __DIR__ . "/readdir_variation4/"; mkdir($dir_path); // heredoc string @@ -78,7 +78,7 @@ closedir($dir_handle); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/readdir_variation4/"; +$dir_path = __DIR__ . "/readdir_variation4/"; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/readdir_variation5.phpt b/ext/standard/tests/dir/readdir_variation5.phpt index 0ed40964a6..575a4000ac 100644 --- a/ext/standard/tests/dir/readdir_variation5.phpt +++ b/ext/standard/tests/dir/readdir_variation5.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/readdir_root_check.tmp"; +$filename = __DIR__."/readdir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -30,7 +30,7 @@ unlink($filename); echo "*** Testing readdir() : usage variations ***\n"; // create the temporary directory -$dir_path = dirname(__FILE__) . "/readdir_variation5"; +$dir_path = __DIR__ . "/readdir_variation5"; mkdir($dir_path); /* different values for directory permissions */ @@ -76,7 +76,7 @@ foreach($permission_values as $perm) { ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/readdir_variation5"; +$dir_path = __DIR__ . "/readdir_variation5"; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/readdir_variation6-win32-mb.phpt b/ext/standard/tests/dir/readdir_variation6-win32-mb.phpt index fc7d0f78c5..57a8147a46 100644 --- a/ext/standard/tests/dir/readdir_variation6-win32-mb.phpt +++ b/ext/standard/tests/dir/readdir_variation6-win32-mb.phpt @@ -21,10 +21,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing readdir() : usage variations ***\n"; // include the file.inc for Function: function create_files() -include( dirname(__FILE__)."/../file/file.inc"); +include( __DIR__."/../file/file.inc"); // create the temporary directory -$dir_path = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation6"; +$dir_path = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation6"; mkdir($dir_path); // create files within the temporary directory @@ -64,7 +64,7 @@ closedir(); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation6"; +$dir_path = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™readdir_variation6"; rmdir($dir_path); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/readdir_variation6.phpt b/ext/standard/tests/dir/readdir_variation6.phpt index 889d96a387..379d5cc80c 100644 --- a/ext/standard/tests/dir/readdir_variation6.phpt +++ b/ext/standard/tests/dir/readdir_variation6.phpt @@ -15,10 +15,10 @@ Test readdir() function : usage variations - operate on previously opened direct echo "*** Testing readdir() : usage variations ***\n"; // include the file.inc for Function: function create_files() -include( dirname(__FILE__)."/../file/file.inc"); +include( __DIR__."/../file/file.inc"); // create the temporary directory -$dir_path = dirname(__FILE__) . "/readdir_variation6"; +$dir_path = __DIR__ . "/readdir_variation6"; mkdir($dir_path); // create files within the temporary directory @@ -58,7 +58,7 @@ closedir(); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/readdir_variation6"; +$dir_path = __DIR__ . "/readdir_variation6"; rmdir($dir_path); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt b/ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt index aaf01aab09..5e704870ee 100644 --- a/ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt +++ b/ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt @@ -21,10 +21,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing rewinddir() : basic functionality ***\n"; // include file.inc for create_files function -include(dirname(__FILE__) . "/../file/file.inc"); +include(__DIR__ . "/../file/file.inc"); -$dir_path1 = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_basic_dir1"; -$dir_path2 = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_basic_dir2"; +$dir_path1 = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_basic_dir1"; +$dir_path2 = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_basic_dir2"; mkdir($dir_path1); mkdir($dir_path2); @@ -66,8 +66,8 @@ delete_files($dir_path2, 1, "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file", 2); ===DONE=== --CLEAN-- <?php -$dir_path1 = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_basic_dir1"; -$dir_path2 = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_basic_dir2"; +$dir_path1 = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_basic_dir1"; +$dir_path2 = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_basic_dir2"; rmdir($dir_path1); rmdir($dir_path2); ?> diff --git a/ext/standard/tests/dir/rewinddir_basic.phpt b/ext/standard/tests/dir/rewinddir_basic.phpt index 3571808f85..b0abc0a379 100644 --- a/ext/standard/tests/dir/rewinddir_basic.phpt +++ b/ext/standard/tests/dir/rewinddir_basic.phpt @@ -15,10 +15,10 @@ Test rewinddir() function : basic functionality echo "*** Testing rewinddir() : basic functionality ***\n"; // include file.inc for create_files function -include(dirname(__FILE__) . "/../file/file.inc"); +include(__DIR__ . "/../file/file.inc"); -$dir_path1 = dirname(__FILE__) . "/rewinddir_basic_dir1"; -$dir_path2 = dirname(__FILE__) . "/rewinddir_basic_dir2"; +$dir_path1 = __DIR__ . "/rewinddir_basic_dir1"; +$dir_path2 = __DIR__ . "/rewinddir_basic_dir2"; mkdir($dir_path1); mkdir($dir_path2); @@ -60,8 +60,8 @@ delete_files($dir_path2, 1, 'file', 2); ===DONE=== --CLEAN-- <?php -$dir_path1 = dirname(__FILE__) . "/rewinddir_basic_dir1"; -$dir_path2 = dirname(__FILE__) . "/rewinddir_basic_dir2"; +$dir_path1 = __DIR__ . "/rewinddir_basic_dir1"; +$dir_path2 = __DIR__ . "/rewinddir_basic_dir2"; rmdir($dir_path1); rmdir($dir_path2); ?> diff --git a/ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt b/ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt index b8f36d7eb2..e46640c41e 100644 --- a/ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt +++ b/ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing rewinddir() : usage variations ***\n"; -$dir_path = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_variation2'; +$dir_path = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_variation2'; mkdir($dir_path); echo "\n-- Create the directory handle, read and close the directory --\n"; @@ -34,7 +34,7 @@ var_dump(rewinddir($dir_handle)); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_variation2'; +$dir_path = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™rewinddir_variation2'; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/rewinddir_variation2.phpt b/ext/standard/tests/dir/rewinddir_variation2.phpt index aa18641292..02654aa80c 100644 --- a/ext/standard/tests/dir/rewinddir_variation2.phpt +++ b/ext/standard/tests/dir/rewinddir_variation2.phpt @@ -14,7 +14,7 @@ Test rewinddir() function : usage variations - operate on a closed directory echo "*** Testing rewinddir() : usage variations ***\n"; -$dir_path = dirname(__FILE__) . '/rewinddir_variation2'; +$dir_path = __DIR__ . '/rewinddir_variation2'; mkdir($dir_path); echo "\n-- Create the directory handle, read and close the directory --\n"; @@ -28,7 +28,7 @@ var_dump(rewinddir($dir_handle)); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . '/rewinddir_variation2'; +$dir_path = __DIR__ . '/rewinddir_variation2'; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/scandir_basic-win32-mb.phpt b/ext/standard/tests/dir/scandir_basic-win32-mb.phpt index 14e9405303..39c375461e 100644 --- a/ext/standard/tests/dir/scandir_basic-win32-mb.phpt +++ b/ext/standard/tests/dir/scandir_basic-win32-mb.phpt @@ -20,10 +20,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing scandir() : basic functionality ***\n"; // include file.inc for create_files function -include (dirname(__FILE__) . '/../file/file.inc'); +include (__DIR__ . '/../file/file.inc'); // set up directory -$directory = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_basic'; +$directory = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_basic'; mkdir($directory); create_files($directory, 3, "numeric", 0755, 1, "w", "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file"); @@ -40,7 +40,7 @@ delete_files($directory, 3, "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file"); ===DONE=== --CLEAN-- <?php -$directory = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_basic'; +$directory = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_basic'; rmdir($directory); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/scandir_basic.phpt b/ext/standard/tests/dir/scandir_basic.phpt index 568ae5a5e2..e0e40f5620 100644 --- a/ext/standard/tests/dir/scandir_basic.phpt +++ b/ext/standard/tests/dir/scandir_basic.phpt @@ -14,10 +14,10 @@ Test scandir() function : basic functionality echo "*** Testing scandir() : basic functionality ***\n"; // include file.inc for create_files function -include (dirname(__FILE__) . '/../file/file.inc'); +include (__DIR__ . '/../file/file.inc'); // set up directory -$directory = dirname(__FILE__) . '/scandir_basic'; +$directory = __DIR__ . '/scandir_basic'; mkdir($directory); create_files($directory, 3); @@ -34,7 +34,7 @@ delete_files($directory, 3); ===DONE=== --CLEAN-- <?php -$directory = dirname(__FILE__) . '/scandir_basic'; +$directory = __DIR__ . '/scandir_basic'; rmdir($directory); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/scandir_error2.phpt b/ext/standard/tests/dir/scandir_error2.phpt index 2044471c66..121d68bab8 100644 --- a/ext/standard/tests/dir/scandir_error2.phpt +++ b/ext/standard/tests/dir/scandir_error2.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing scandir() : error conditions ***\n"; -$directory = dirname(__FILE__) . '/idonotexist'; +$directory = __DIR__ . '/idonotexist'; echo "\n-- Pass scandir() an absolute path that does not exist --\n"; var_dump(scandir($directory)); diff --git a/ext/standard/tests/dir/scandir_variation10-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation10-win32-mb.phpt index b525e3caed..b596eb0e17 100644 --- a/ext/standard/tests/dir/scandir_variation10-win32-mb.phpt +++ b/ext/standard/tests/dir/scandir_variation10-win32-mb.phpt @@ -25,10 +25,10 @@ printf("SCANDIR_SORT_NONE: %d\n", SCANDIR_SORT_NONE); echo "*** Testing scandir() : usage variations ***\n"; // include for create_files/delete_files functions -include(dirname(__FILE__) . '/../file/file.inc'); +include(__DIR__ . '/../file/file.inc'); // create directory and files -$dir = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation10'; +$dir = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation10'; mkdir($dir); @create_files($dir, 2, "numeric", 0755, 1, "w", "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file"); @@ -49,7 +49,7 @@ delete_files($dir, 2, "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file"); ===DONE=== --CLEAN-- <?php -$dir = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation10'; +$dir = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation10'; rmdir($dir); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/scandir_variation10.phpt b/ext/standard/tests/dir/scandir_variation10.phpt index 0fade971b4..28220c66ba 100644 --- a/ext/standard/tests/dir/scandir_variation10.phpt +++ b/ext/standard/tests/dir/scandir_variation10.phpt @@ -19,10 +19,10 @@ printf("SCANDIR_SORT_NONE: %d\n", SCANDIR_SORT_NONE); echo "*** Testing scandir() : usage variations ***\n"; // include for create_files/delete_files functions -include(dirname(__FILE__) . '/../file/file.inc'); +include(__DIR__ . '/../file/file.inc'); // create directory and files -$dir = dirname(__FILE__) . '/scandir_variation10'; +$dir = __DIR__ . '/scandir_variation10'; mkdir($dir); @create_files($dir, 2); @@ -43,7 +43,7 @@ delete_files($dir, 2); ===DONE=== --CLEAN-- <?php -$dir = dirname(__FILE__) . '/scandir_variation10'; +$dir = __DIR__ . '/scandir_variation10'; rmdir($dir); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt index ffb0284d95..5505b3db6d 100644 --- a/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt +++ b/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing scandir() : usage variations ***\n"; // Initialise function arguments not being substituted -$dir = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation3'; +$dir = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation3'; mkdir($dir); $sorting_order = SCANDIR_SORT_ASCENDING; @@ -106,7 +106,7 @@ fclose($fp); ===DONE=== --CLEAN-- <?php -$dir = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation3'; +$dir = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation3'; rmdir($dir); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt index 24fc04df6f..9bfeddf556 100644 --- a/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt +++ b/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing scandir() : usage variations ***\n"; // include for create_files/delete_files functions -include (dirname(__FILE__) . '/../file/file.inc'); +include (__DIR__ . '/../file/file.inc'); $base_dir_path = __DIR__ . '/scandir_variation4-win32-mb'; @mkdir($base_dir_path); diff --git a/ext/standard/tests/dir/scandir_variation4.phpt b/ext/standard/tests/dir/scandir_variation4.phpt index 2b7e6b6dbe..6030ace2ac 100644 --- a/ext/standard/tests/dir/scandir_variation4.phpt +++ b/ext/standard/tests/dir/scandir_variation4.phpt @@ -14,7 +14,7 @@ Test scandir() function : usage variations - different relative paths echo "*** Testing scandir() : usage variations ***\n"; // include for create_files/delete_files functions -include (dirname(__FILE__) . '/../file/file.inc'); +include (__DIR__ . '/../file/file.inc'); $base_dir_path = __DIR__ . '/scandir_variation4'; @mkdir($base_dir_path); diff --git a/ext/standard/tests/dir/scandir_variation5.phpt b/ext/standard/tests/dir/scandir_variation5.phpt index a17e8a5d35..47539c493f 100644 --- a/ext/standard/tests/dir/scandir_variation5.phpt +++ b/ext/standard/tests/dir/scandir_variation5.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/dir_root_check.tmp"; +$filename = __DIR__."/dir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -37,7 +37,7 @@ echo "*** Testing scandir() : usage variations ***\n"; * |-> child_dir ( child dir) */ -$parent_dir_path = dirname(__FILE__) . "/scandir_variation5"; +$parent_dir_path = __DIR__ . "/scandir_variation5"; mkdir($parent_dir_path); chmod($parent_dir_path, 0777); @@ -66,7 +66,7 @@ var_dump(scandir($child_dir_path)); ===DONE=== --CLEAN-- <?php -$parent_dir_path = dirname(__FILE__) . "/scandir_variation5"; +$parent_dir_path = __DIR__ . "/scandir_variation5"; $sub_dir_path = $parent_dir_path."/sub_dir"; $child_dir_path = $sub_dir_path."/child_dir"; diff --git a/ext/standard/tests/dir/scandir_variation6.phpt b/ext/standard/tests/dir/scandir_variation6.phpt index c4467d1536..d516411886 100644 --- a/ext/standard/tests/dir/scandir_variation6.phpt +++ b/ext/standard/tests/dir/scandir_variation6.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing scandir() : usage variations ***\n"; // create the temporary directories -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path . "/scandir_variation6"; $sub_dir_path = $dir_path . "/sub_dir1"; @@ -41,7 +41,7 @@ var_dump( scandir($dir_path . "/sub?dir1") ); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/scandir_variation6"; +$dir_path = __DIR__ . "/scandir_variation6"; $sub_dir_path = $dir_path . "/sub_dir1"; rmdir($sub_dir_path); diff --git a/ext/standard/tests/dir/scandir_variation7.phpt b/ext/standard/tests/dir/scandir_variation7.phpt index 6c77f69e4d..b0305a6e03 100644 --- a/ext/standard/tests/dir/scandir_variation7.phpt +++ b/ext/standard/tests/dir/scandir_variation7.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__) . "/dir_root_check.tmp"; +$filename = __DIR__ . "/dir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -29,7 +29,7 @@ unlink($filename); echo "*** Testing scandir() : usage variations ***\n"; // create the temporary directory -$dir_path = dirname(__FILE__) . "/scandir_variation7"; +$dir_path = __DIR__ . "/scandir_variation7"; mkdir($dir_path); // different values for directory permissions @@ -71,7 +71,7 @@ foreach ($permission_values as $perm) { ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/scandir_variation7"; +$dir_path = __DIR__ . "/scandir_variation7"; rmdir($dir_path); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/scandir_variation8-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation8-win32-mb.phpt index 9fead1e455..acc289e590 100644 --- a/ext/standard/tests/dir/scandir_variation8-win32-mb.phpt +++ b/ext/standard/tests/dir/scandir_variation8-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing scandir() : usage variations ***\n"; -$dir_path = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation8/"; +$dir_path = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation8/"; mkdir($dir_path); // heredoc string @@ -74,7 +74,7 @@ foreach ($content as $file_name) { ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation8"; +$dir_path = __DIR__ . "/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation8"; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/scandir_variation8.phpt b/ext/standard/tests/dir/scandir_variation8.phpt index 9311d030c1..5ba7a6391b 100644 --- a/ext/standard/tests/dir/scandir_variation8.phpt +++ b/ext/standard/tests/dir/scandir_variation8.phpt @@ -14,7 +14,7 @@ Test scandir() function : usage variations - different file names echo "*** Testing scandir() : usage variations ***\n"; -$dir_path = dirname(__FILE__) . "/scandir_variation8/"; +$dir_path = __DIR__ . "/scandir_variation8/"; mkdir($dir_path); // heredoc string @@ -68,7 +68,7 @@ foreach ($content as $file_name) { ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/scandir_variation8"; +$dir_path = __DIR__ . "/scandir_variation8"; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/scandir_variation9-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation9-win32-mb.phpt index 022c1e5ba8..c634f2d3b3 100644 --- a/ext/standard/tests/dir/scandir_variation9-win32-mb.phpt +++ b/ext/standard/tests/dir/scandir_variation9-win32-mb.phpt @@ -21,10 +21,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing scandir() : usage variations ***\n"; // include for create_files/delete_files functions -include(dirname(__FILE__) . '/../file/file.inc'); +include(__DIR__ . '/../file/file.inc'); // create directory and files -$dir = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation9'; +$dir = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation9'; mkdir($dir); @create_files($dir, 2, "numeric", 0755, 1, "w", "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file"); @@ -40,7 +40,7 @@ delete_files($dir, 2, "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™file"); ===DONE=== --CLEAN-- <?php -$dir = dirname(__FILE__) . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation9'; +$dir = __DIR__ . '/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™scandir_variation9'; rmdir($dir); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/scandir_variation9.phpt b/ext/standard/tests/dir/scandir_variation9.phpt index 8cabeb5e36..42e42bb6cb 100644 --- a/ext/standard/tests/dir/scandir_variation9.phpt +++ b/ext/standard/tests/dir/scandir_variation9.phpt @@ -15,10 +15,10 @@ Test scandir() function : usage variations - different ints as $sorting_order ar echo "*** Testing scandir() : usage variations ***\n"; // include for create_files/delete_files functions -include(dirname(__FILE__) . '/../file/file.inc'); +include(__DIR__ . '/../file/file.inc'); // create directory and files -$dir = dirname(__FILE__) . '/scandir_variation9'; +$dir = __DIR__ . '/scandir_variation9'; mkdir($dir); @create_files($dir, 2); @@ -34,7 +34,7 @@ delete_files($dir, 2); ===DONE=== --CLEAN-- <?php -$dir = dirname(__FILE__) . '/scandir_variation9'; +$dir = __DIR__ . '/scandir_variation9'; rmdir($dir); ?> --EXPECT-- diff --git a/ext/standard/tests/directory/bug74589_utf8.phpt b/ext/standard/tests/directory/bug74589_utf8.phpt index 126857da5c..1bec90fe16 100644 --- a/ext/standard/tests/directory/bug74589_utf8.phpt +++ b/ext/standard/tests/directory/bug74589_utf8.phpt @@ -16,7 +16,7 @@ internal_encoding=utf-8 */ $item = "bug74589_新建文件夹"; // utf-8 string -$dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . $item; +$dir = __DIR__ . DIRECTORY_SEPARATOR . $item; $test_file = $dir . DIRECTORY_SEPARATOR . "test.php"; mkdir($dir); @@ -25,7 +25,7 @@ file_put_contents($test_file, "<?php var_dump(__DIR__); var_dump(__FILE__); - var_dump(__DIR__ === dirname(__FILE__));"); + var_dump(__DIR__ === __DIR__);"); $php = getenv('TEST_PHP_EXECUTABLE'); @@ -41,7 +41,7 @@ bool(true) --CLEAN-- <?php $item = "bug74589_新建文件夹"; // utf-8 string - $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . $item; + $dir = __DIR__ . DIRECTORY_SEPARATOR . $item; $test_file = $dir . DIRECTORY_SEPARATOR . "test.php"; unlink($test_file); rmdir($dir); diff --git a/ext/standard/tests/file/001-win32-mb.phpt b/ext/standard/tests/file/001-win32-mb.phpt index e593270b12..cd7cc75ddc 100644 --- a/ext/standard/tests/file/001-win32-mb.phpt +++ b/ext/standard/tests/file/001-win32-mb.phpt @@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { ?> --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); $fname = 'test_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.file'; diff --git a/ext/standard/tests/file/001-win32.phpt b/ext/standard/tests/file/001-win32.phpt index 3372c6cb83..f40804fe23 100644 --- a/ext/standard/tests/file/001-win32.phpt +++ b/ext/standard/tests/file/001-win32.phpt @@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { ?> --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); @unlink('test.file'); if (file_exists('test.file')) { echo "test.file exists\n"; diff --git a/ext/standard/tests/file/001.phpt b/ext/standard/tests/file/001.phpt index d604699ac4..d5ab2e5a0b 100644 --- a/ext/standard/tests/file/001.phpt +++ b/ext/standard/tests/file/001.phpt @@ -9,7 +9,7 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); ?> --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); @unlink('test.file'); @unlink('test.link'); if (file_exists('test.file')) { diff --git a/ext/standard/tests/file/004.phpt b/ext/standard/tests/file/004.phpt index 3fead8b215..522b8320e4 100644 --- a/ext/standard/tests/file/004.phpt +++ b/ext/standard/tests/file/004.phpt @@ -2,7 +2,7 @@ file_put_contents() test --FILE-- <?php - chdir(dirname(__FILE__)); + chdir(__DIR__); for ($i = 1; $i < 6; $i++) { @unlink("./TEST{$i}"); } diff --git a/ext/standard/tests/file/005_basic.phpt b/ext/standard/tests/file/005_basic.phpt index 329fd15773..242110cef3 100644 --- a/ext/standard/tests/file/005_basic.phpt +++ b/ext/standard/tests/file/005_basic.phpt @@ -24,20 +24,20 @@ echo "*** Testing the basic functionality with file ***\n"; print( @date('Y:M:D:H:i:s', fileatime(__FILE__)) )."\n"; print( @date('Y:M:D:H:i:s', filemtime(__FILE__)) )."\n"; print( @date('Y:M:D:H:i:s', filectime(__FILE__)) )."\n"; -print( @date('Y:M:D:H:i:s', touch(dirname(__FILE__)."/005_basic.tmp")) )."\n"; +print( @date('Y:M:D:H:i:s', touch(__DIR__."/005_basic.tmp")) )."\n"; echo "*** Testing the basic functionality with dir ***\n"; print( @date('Y:M:D:H:i:s', fileatime(".")) )."\n"; print( @date('Y:M:D:H:i:s', filemtime(".")) )."\n"; print( @date('Y:M:D:H:i:s', filectime(".")) )."\n"; -print( @date('Y:M:D:H:i:s', touch(dirname(__FILE__)."/005_basic")) )."\n"; +print( @date('Y:M:D:H:i:s', touch(__DIR__."/005_basic")) )."\n"; echo "\n*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/005_basic.tmp"); -unlink(dirname(__FILE__)."/005_basic"); +unlink(__DIR__."/005_basic.tmp"); +unlink(__DIR__."/005_basic"); ?> --EXPECTF-- *** Testing the basic functionality with file *** diff --git a/ext/standard/tests/file/005_variation-win32.phpt b/ext/standard/tests/file/005_variation-win32.phpt index 68fa209b24..1e712b7828 100644 --- a/ext/standard/tests/file/005_variation-win32.phpt +++ b/ext/standard/tests/file/005_variation-win32.phpt @@ -44,7 +44,7 @@ function stat_fn( $filename ) { } echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // create files $file_handle = fopen("$file_path/005_variation1.tmp", "w"); fclose($file_handle); @@ -143,7 +143,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/005_variation_softlink.tmp"); unlink($file_path."/005_variation_hardlink.tmp"); unlink($file_path."/005_variation1.tmp"); diff --git a/ext/standard/tests/file/005_variation.phpt b/ext/standard/tests/file/005_variation.phpt index f2bf19f6a3..1f92bb73aa 100644 --- a/ext/standard/tests/file/005_variation.phpt +++ b/ext/standard/tests/file/005_variation.phpt @@ -47,7 +47,7 @@ function stat_fn( $filename ) { } echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // create files $file_handle = fopen("$file_path/005_variation1.tmp", "w"); fclose($file_handle); @@ -158,7 +158,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; if(file_exists($file_path."/005_variation_softlink.tmp")) { unlink($file_path."/005_variation_softlink.tmp"); } diff --git a/ext/standard/tests/file/006_basic.phpt b/ext/standard/tests/file/006_basic.phpt index e8b36c2c0d..553e8445f1 100644 --- a/ext/standard/tests/file/006_basic.phpt +++ b/ext/standard/tests/file/006_basic.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not on Windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/006_root_check.tmp"; +$filename = __DIR__."/006_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -27,7 +27,7 @@ unlink($filename); Description: Attempts to change the mode of the file specified by filename to that given in mode */ -$path = dirname(__FILE__); +$path = __DIR__; echo "*** Testing fileperms(), chmod() with files and dirs ***\n"; fopen($path."/perm.tmp", "w"); @@ -46,8 +46,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/perm.tmp"); -rmdir(dirname(__FILE__)."/perm"); +unlink(__DIR__."/perm.tmp"); +rmdir(__DIR__."/perm"); ?> --EXPECT-- *** Testing fileperms(), chmod() with files and dirs *** diff --git a/ext/standard/tests/file/006_error.phpt b/ext/standard/tests/file/006_error.phpt index c35eba2128..0e95f8056e 100644 --- a/ext/standard/tests/file/006_error.phpt +++ b/ext/standard/tests/file/006_error.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not on Windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/006_root_check.tmp"; +$filename = __DIR__."/006_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -47,23 +47,23 @@ var_dump( fileperms("/no/such/file/dir") ); echo "\n"; /* With args less than expected */ -$fp = fopen(dirname(__FILE__)."/006_error.tmp", "w"); +$fp = fopen(__DIR__."/006_error.tmp", "w"); fclose($fp); -var_dump( chmod(dirname(__FILE__)."/006_error.tmp") ); +var_dump( chmod(__DIR__."/006_error.tmp") ); var_dump( chmod("nofile") ); var_dump( chmod() ); var_dump( fileperms() ); /* With args greater than expected */ -var_dump( chmod(dirname(__FILE__)."/006_error.tmp", 0755, TRUE) ); -var_dump( fileperms(dirname(__FILE__)."/006_error.tmp", 0777) ); +var_dump( chmod(__DIR__."/006_error.tmp", 0755, TRUE) ); +var_dump( fileperms(__DIR__."/006_error.tmp", 0777) ); var_dump( fileperms("nofile", 0777) ); echo "\n*** Done ***\n"; ?> --CLEAN-- <?php -unlink( dirname(__FILE__)."/006_error.tmp"); +unlink( __DIR__."/006_error.tmp"); ?> --EXPECTF-- *** Testing error conditions for fileperms(), chmod() *** diff --git a/ext/standard/tests/file/006_variation1.phpt b/ext/standard/tests/file/006_variation1.phpt index 410f923a86..102bc28432 100644 --- a/ext/standard/tests/file/006_variation1.phpt +++ b/ext/standard/tests/file/006_variation1.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not on Windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/006_root_check.tmp"; +$filename = __DIR__."/006_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -30,10 +30,10 @@ unlink($filename); echo "*** Testing fileperms() & chmod() : usage variations ***\n"; -$file_name = dirname(__FILE__)."/006_variation1.tmp"; +$file_name = __DIR__."/006_variation1.tmp"; $file_handle = fopen($file_name, "w"); fclose($file_handle); -$dir_name = dirname(__FILE__)."/006_variation1"; +$dir_name = __DIR__."/006_variation1"; mkdir($dir_name); $count = 1; @@ -56,10 +56,10 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -chmod(dirname(__FILE__)."/006_variation1.tmp", 0777); -chmod(dirname(__FILE__)."/006_variation1", 0777); -unlink(dirname(__FILE__)."/006_variation1.tmp"); -rmdir(dirname(__FILE__)."/006_variation1"); +chmod(__DIR__."/006_variation1.tmp", 0777); +chmod(__DIR__."/006_variation1", 0777); +unlink(__DIR__."/006_variation1.tmp"); +rmdir(__DIR__."/006_variation1"); ?> --EXPECT-- *** Testing fileperms() & chmod() : usage variations *** diff --git a/ext/standard/tests/file/006_variation2.phpt b/ext/standard/tests/file/006_variation2.phpt index 19bbf60fe9..cba524882f 100644 --- a/ext/standard/tests/file/006_variation2.phpt +++ b/ext/standard/tests/file/006_variation2.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not on Windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/006_root_check.tmp"; +$filename = __DIR__."/006_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -32,10 +32,10 @@ unlink($filename); echo "*** Testing fileperms() & chmod() : usage variations ***\n"; -$file_name = dirname(__FILE__)."/006_variation2.tmp"; +$file_name = __DIR__."/006_variation2.tmp"; $file_handle = fopen($file_name, "w"); fclose($file_handle); -$dir_name = dirname(__FILE__)."/006_variation2"; +$dir_name = __DIR__."/006_variation2"; mkdir($dir_name); echo "\n*** Testing fileperms(), chmod() with miscellaneous permissions ***\n"; @@ -83,10 +83,10 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -chmod(dirname(__FILE__)."/006_variation2.tmp", 0777); -chmod(dirname(__FILE__)."/006_variation2", 0777); -unlink(dirname(__FILE__)."/006_variation2.tmp"); -rmdir(dirname(__FILE__)."/006_variation2"); +chmod(__DIR__."/006_variation2.tmp", 0777); +chmod(__DIR__."/006_variation2", 0777); +unlink(__DIR__."/006_variation2.tmp"); +rmdir(__DIR__."/006_variation2"); ?> --EXPECTF-- *** Testing fileperms() & chmod() : usage variations *** diff --git a/ext/standard/tests/file/007_basic.phpt b/ext/standard/tests/file/007_basic.phpt index 9fb473b368..fd2e5575a9 100644 --- a/ext/standard/tests/file/007_basic.phpt +++ b/ext/standard/tests/file/007_basic.phpt @@ -41,7 +41,7 @@ $modes = array( for( $i=0; $i<count($modes); $i++ ) { echo "\n-- Iteration with mode '$modes[$i]' --\n"; - $filename = dirname(__FILE__)."/007_basic.tmp"; + $filename = __DIR__."/007_basic.tmp"; // check fopen() $handle = fopen($filename, $modes[$i]); var_dump($handle ); diff --git a/ext/standard/tests/file/007_variation1.phpt b/ext/standard/tests/file/007_variation1.phpt index 2731b3bdc9..6ae441f61e 100644 --- a/ext/standard/tests/file/007_variation1.phpt +++ b/ext/standard/tests/file/007_variation1.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "r" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 1, "bytes"); @@ -38,7 +38,7 @@ var_dump( get_resource_type($file_handle) ); //Check whether resource is lost a echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation1.tmp"); +unlink(__DIR__."/007_variation1.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'r' mode *** diff --git a/ext/standard/tests/file/007_variation10.phpt b/ext/standard/tests/file/007_variation10.phpt index 3093535e64..7f163265aa 100644 --- a/ext/standard/tests/file/007_variation10.phpt +++ b/ext/standard/tests/file/007_variation10.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "r+t" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 10, "bytes"); @@ -40,7 +40,7 @@ var_dump( get_resource_type($file_handle) ); //Check whether resource is lost a echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation10.tmp"); +unlink(__DIR__."/007_variation10.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'r+t' mode *** diff --git a/ext/standard/tests/file/007_variation11-win32-mb.phpt b/ext/standard/tests/file/007_variation11-win32-mb.phpt index 68b8396639..b0d84dfe93 100644 --- a/ext/standard/tests/file/007_variation11-win32-mb.phpt +++ b/ext/standard/tests/file/007_variation11-win32-mb.phpt @@ -25,7 +25,7 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) checking for the file truncation when trying to open an existing file in "wt" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "wt", "007_variation_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™", 11, "bytes"); @@ -57,7 +57,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file = $file_path."/007_variation_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™11.tmp"; unlink($file); ?> diff --git a/ext/standard/tests/file/007_variation11-win32.phpt b/ext/standard/tests/file/007_variation11-win32.phpt index 242b38cada..436b22f8eb 100644 --- a/ext/standard/tests/file/007_variation11-win32.phpt +++ b/ext/standard/tests/file/007_variation11-win32.phpt @@ -25,7 +25,7 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) checking for the file truncation when trying to open an existing file in "wt" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "wt", "007_variation", 11, "bytes"); @@ -57,7 +57,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation11.tmp"); +unlink(__DIR__."/007_variation11.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'wt' mode *** diff --git a/ext/standard/tests/file/007_variation11.phpt b/ext/standard/tests/file/007_variation11.phpt index 92ec32eb22..9c6bff1417 100644 --- a/ext/standard/tests/file/007_variation11.phpt +++ b/ext/standard/tests/file/007_variation11.phpt @@ -25,7 +25,7 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) checking for the file truncation when trying to open an existing file in "wt" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "wt", "007_variation", 11, "bytes"); @@ -57,7 +57,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation11.tmp"); +unlink(__DIR__."/007_variation11.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'wt' mode *** diff --git a/ext/standard/tests/file/007_variation12-win32.phpt b/ext/standard/tests/file/007_variation12-win32.phpt index 87bfc45c49..08a3ff80d8 100644 --- a/ext/standard/tests/file/007_variation12-win32.phpt +++ b/ext/standard/tests/file/007_variation12-win32.phpt @@ -25,7 +25,7 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) checking for the file truncation when trying to open an existing file in "w+t" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 12, "bytes"); @@ -57,7 +57,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation12.tmp"); +unlink(__DIR__."/007_variation12.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'w+t' mode *** diff --git a/ext/standard/tests/file/007_variation12.phpt b/ext/standard/tests/file/007_variation12.phpt index 43ca4f78ff..f75ef8df96 100644 --- a/ext/standard/tests/file/007_variation12.phpt +++ b/ext/standard/tests/file/007_variation12.phpt @@ -25,7 +25,7 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) checking for the file truncation when trying to open an existing file in "w+t" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 12, "bytes"); @@ -57,7 +57,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation12.tmp"); +unlink(__DIR__."/007_variation12.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'w+t' mode *** diff --git a/ext/standard/tests/file/007_variation13-win32.phpt b/ext/standard/tests/file/007_variation13-win32.phpt index 6c6d22f64e..12484cfcde 100644 --- a/ext/standard/tests/file/007_variation13-win32.phpt +++ b/ext/standard/tests/file/007_variation13-win32.phpt @@ -24,7 +24,7 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 13, "bytes"); @@ -49,7 +49,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation13.tmp"); +unlink(__DIR__."/007_variation13.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'at' mode *** diff --git a/ext/standard/tests/file/007_variation13.phpt b/ext/standard/tests/file/007_variation13.phpt index 6c416d1103..98be673d8a 100644 --- a/ext/standard/tests/file/007_variation13.phpt +++ b/ext/standard/tests/file/007_variation13.phpt @@ -24,7 +24,7 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 13, "bytes"); @@ -49,7 +49,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation13.tmp"); +unlink(__DIR__."/007_variation13.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'at' mode *** diff --git a/ext/standard/tests/file/007_variation14.phpt b/ext/standard/tests/file/007_variation14.phpt index af07d1652a..405a6a2dfe 100644 --- a/ext/standard/tests/file/007_variation14.phpt +++ b/ext/standard/tests/file/007_variation14.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "a+t" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 14, "bytes"); @@ -43,7 +43,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation14.tmp"); +unlink(__DIR__."/007_variation14.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'a+t' mode *** diff --git a/ext/standard/tests/file/007_variation15.phpt b/ext/standard/tests/file/007_variation15.phpt index d17a89f64f..39a7e506e5 100644 --- a/ext/standard/tests/file/007_variation15.phpt +++ b/ext/standard/tests/file/007_variation15.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "xt" mode checking for the warning msg when trying to open an existing file in "xt" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation15.tmp"; @@ -40,7 +40,7 @@ $file_handle = fopen($file, "xt"); //Opening the existing data file in 'xt' mod echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation15.tmp"); +unlink(__DIR__."/007_variation15.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'xt' mode *** diff --git a/ext/standard/tests/file/007_variation16.phpt b/ext/standard/tests/file/007_variation16.phpt index c48776a4cd..9173138db4 100644 --- a/ext/standard/tests/file/007_variation16.phpt +++ b/ext/standard/tests/file/007_variation16.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "x+t" mode checking for the warning msg when trying to open an existing file in "x+t" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation16.tmp"; @@ -40,7 +40,7 @@ $file_handle = fopen($file, "x+t"); //Opening the existing data file in "x+t" m echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation16.tmp"); +unlink(__DIR__."/007_variation16.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'x+t' mode *** diff --git a/ext/standard/tests/file/007_variation17.phpt b/ext/standard/tests/file/007_variation17.phpt index 716dbbacb7..d468ad0452 100644 --- a/ext/standard/tests/file/007_variation17.phpt +++ b/ext/standard/tests/file/007_variation17.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "rb" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 17, "bytes"); @@ -38,7 +38,7 @@ var_dump( get_resource_type($file_handle) ); //Check whether resource is lost a echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation17.tmp"); +unlink(__DIR__."/007_variation17.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'rb' mode *** diff --git a/ext/standard/tests/file/007_variation18.phpt b/ext/standard/tests/file/007_variation18.phpt index 5d9b1ea212..0e510a421e 100644 --- a/ext/standard/tests/file/007_variation18.phpt +++ b/ext/standard/tests/file/007_variation18.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "r+b" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 18, "bytes"); @@ -40,7 +40,7 @@ var_dump( get_resource_type($file_handle) ); //Check whether resource is lost a echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation18.tmp"); +unlink(__DIR__."/007_variation18.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'r+b' mode *** diff --git a/ext/standard/tests/file/007_variation19.phpt b/ext/standard/tests/file/007_variation19.phpt index ebb19a0b2e..d6d3a3d761 100644 --- a/ext/standard/tests/file/007_variation19.phpt +++ b/ext/standard/tests/file/007_variation19.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "wb" mode checking for the file truncation when trying to open an existing file in "wb" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "wb", "007_variation", 19, "bytes"); @@ -52,7 +52,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation19.tmp"); +unlink(__DIR__."/007_variation19.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'wb' mode *** diff --git a/ext/standard/tests/file/007_variation2.phpt b/ext/standard/tests/file/007_variation2.phpt index 2adb9864f1..87ee8a3dd6 100644 --- a/ext/standard/tests/file/007_variation2.phpt +++ b/ext/standard/tests/file/007_variation2.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "r+" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 2, "bytes"); @@ -40,7 +40,7 @@ var_dump( get_resource_type($file_handle) ); //Check whether resource is lost a echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation2.tmp"); +unlink(__DIR__."/007_variation2.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'r+' mode *** diff --git a/ext/standard/tests/file/007_variation20.phpt b/ext/standard/tests/file/007_variation20.phpt index 26c5bb7152..d470063228 100644 --- a/ext/standard/tests/file/007_variation20.phpt +++ b/ext/standard/tests/file/007_variation20.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "w+b" mode checking for the file truncation when trying to open an existing file in "w+b" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 20, "bytes"); @@ -52,7 +52,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation20.tmp"); +unlink(__DIR__."/007_variation20.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'w+b' mode *** diff --git a/ext/standard/tests/file/007_variation21.phpt b/ext/standard/tests/file/007_variation21.phpt index 62d7f84568..92d8f1dee7 100644 --- a/ext/standard/tests/file/007_variation21.phpt +++ b/ext/standard/tests/file/007_variation21.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "ab" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 21, "bytes"); @@ -44,7 +44,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation21.tmp"); +unlink(__DIR__."/007_variation21.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'ab' mode *** diff --git a/ext/standard/tests/file/007_variation22.phpt b/ext/standard/tests/file/007_variation22.phpt index 106cd4b6f4..8e14a84b5b 100644 --- a/ext/standard/tests/file/007_variation22.phpt +++ b/ext/standard/tests/file/007_variation22.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "a+b" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 22, "bytes"); @@ -43,7 +43,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation22.tmp"); +unlink(__DIR__."/007_variation22.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'a+b' mode *** diff --git a/ext/standard/tests/file/007_variation23.phpt b/ext/standard/tests/file/007_variation23.phpt index 3c8bd2ff48..c4b4aa86a5 100644 --- a/ext/standard/tests/file/007_variation23.phpt +++ b/ext/standard/tests/file/007_variation23.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "xb" mode checking for the warning msg when trying to open an existing file in "xb" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation23.tmp"; @@ -40,7 +40,7 @@ $file_handle = fopen($file, "xb"); //Opening the existing data file in 'xb' mod echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation23.tmp"); +unlink(__DIR__."/007_variation23.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'xb' mode *** diff --git a/ext/standard/tests/file/007_variation24.phpt b/ext/standard/tests/file/007_variation24.phpt index b9c819f0a5..86b7347a1c 100644 --- a/ext/standard/tests/file/007_variation24.phpt +++ b/ext/standard/tests/file/007_variation24.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "x+b" mode checking for the warning msg when trying to open an existing file in "x+b" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation24.tmp"; @@ -40,7 +40,7 @@ $file_handle = fopen($file, "x+b"); //Opening the existing data file in "x+b" m echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation24.tmp"); +unlink(__DIR__."/007_variation24.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'x+b' mode *** diff --git a/ext/standard/tests/file/007_variation3.phpt b/ext/standard/tests/file/007_variation3.phpt index b2a276cacf..344a774f87 100644 --- a/ext/standard/tests/file/007_variation3.phpt +++ b/ext/standard/tests/file/007_variation3.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "w" mode checking for the file truncation when trying to open an existing file in "w" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 3, "bytes"); @@ -52,7 +52,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation3.tmp"); +unlink(__DIR__."/007_variation3.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'w' mode *** diff --git a/ext/standard/tests/file/007_variation4.phpt b/ext/standard/tests/file/007_variation4.phpt index 4124a143f0..217dbc5ce5 100644 --- a/ext/standard/tests/file/007_variation4.phpt +++ b/ext/standard/tests/file/007_variation4.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "w+" mode checking for the file truncation when trying to open an existing file in "w+" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 4, "bytes"); @@ -52,7 +52,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation4.tmp"); +unlink(__DIR__."/007_variation4.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'w+' mode *** diff --git a/ext/standard/tests/file/007_variation5.phpt b/ext/standard/tests/file/007_variation5.phpt index 4c54f473b2..1c50e96f71 100644 --- a/ext/standard/tests/file/007_variation5.phpt +++ b/ext/standard/tests/file/007_variation5.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "a" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 5, "bytes"); @@ -44,7 +44,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation5.tmp"); +unlink(__DIR__."/007_variation5.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'a' mode *** diff --git a/ext/standard/tests/file/007_variation6.phpt b/ext/standard/tests/file/007_variation6.phpt index 47bd3628d4..a2ac5d8050 100644 --- a/ext/standard/tests/file/007_variation6.phpt +++ b/ext/standard/tests/file/007_variation6.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "a+" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 6, "bytes"); @@ -43,7 +43,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation6.tmp"); +unlink(__DIR__."/007_variation6.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'a+' mode *** diff --git a/ext/standard/tests/file/007_variation7.phpt b/ext/standard/tests/file/007_variation7.phpt index 9474041581..974bfe0c8c 100644 --- a/ext/standard/tests/file/007_variation7.phpt +++ b/ext/standard/tests/file/007_variation7.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "x" mode checking for the warning msg when trying to open an existing file in "x" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation7.tmp"; @@ -40,7 +40,7 @@ $file_handle = fopen($file, "x"); //Opening the existing data file in 'x' mode echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation7.tmp"); +unlink(__DIR__."/007_variation7.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'x' mode *** diff --git a/ext/standard/tests/file/007_variation8.phpt b/ext/standard/tests/file/007_variation8.phpt index a57c76bd67..b19fbaf9ec 100644 --- a/ext/standard/tests/file/007_variation8.phpt +++ b/ext/standard/tests/file/007_variation8.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "x+" mode checking for the warning msg when trying to open an existing file in "x+" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation8.tmp"; @@ -40,7 +40,7 @@ $file_handle = fopen($file, "x+"); //Opening the existing data file in "x+" mod echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation8.tmp"); +unlink(__DIR__."/007_variation8.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'x+' mode *** diff --git a/ext/standard/tests/file/007_variation9.phpt b/ext/standard/tests/file/007_variation9.phpt index 7d8ebbee91..cd0fd63c75 100644 --- a/ext/standard/tests/file/007_variation9.phpt +++ b/ext/standard/tests/file/007_variation9.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "rt" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 9, "bytes"); @@ -38,7 +38,7 @@ var_dump( get_resource_type($file_handle) ); //Check whether resource is lost a echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation9.tmp"); +unlink(__DIR__."/007_variation9.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'rt' mode *** diff --git a/ext/standard/tests/file/bug12556.phpt b/ext/standard/tests/file/bug12556.phpt index c8e35cfcad..30299899a1 100644 --- a/ext/standard/tests/file/bug12556.phpt +++ b/ext/standard/tests/file/bug12556.phpt @@ -2,7 +2,7 @@ Bug #12556 (fgetcsv() ignores lengths when quotes not closed) --FILE-- <?php -$fp = fopen(dirname(__FILE__)."/test.csv", "r"); +$fp = fopen(__DIR__."/test.csv", "r"); while($line = fgetcsv($fp, 24)) { $line = str_replace("\x0d\x0a", "\x0a", $line); var_dump($line); diff --git a/ext/standard/tests/file/bug22382.phpt b/ext/standard/tests/file/bug22382.phpt index 2ba36ee1de..7768a13b3e 100644 --- a/ext/standard/tests/file/bug22382.phpt +++ b/ext/standard/tests/file/bug22382.phpt @@ -2,7 +2,7 @@ Bug #22382 (fgetcsv() does not handle escaped quotes correctly) --FILE-- <?php -$fp = fopen(dirname(__FILE__)."/test2.csv", "r"); +$fp = fopen(__DIR__."/test2.csv", "r"); while(($line = fgetcsv($fp, 1024))) { var_dump($line); } diff --git a/ext/standard/tests/file/bug26003.phpt b/ext/standard/tests/file/bug26003.phpt Binary files differindex 7d08374693..aaf3b34135 100644 --- a/ext/standard/tests/file/bug26003.phpt +++ b/ext/standard/tests/file/bug26003.phpt diff --git a/ext/standard/tests/file/bug30362.phpt b/ext/standard/tests/file/bug30362.phpt index 59fe02ad06..07117c5210 100644 --- a/ext/standard/tests/file/bug30362.phpt +++ b/ext/standard/tests/file/bug30362.phpt @@ -3,7 +3,7 @@ Bug #30362 (stream_get_line() not working as documented) --FILE-- <?php -$resource = fopen(dirname(__FILE__).'/bug30362.txt', 'rb'); +$resource = fopen(__DIR__.'/bug30362.txt', 'rb'); for ($i = 0; ($i < 10) && !feof($resource); ++$i ) { $a = "Y"; diff --git a/ext/standard/tests/file/bug32160.phpt b/ext/standard/tests/file/bug32160.phpt index e4968034ad..10b09daec2 100644 --- a/ext/standard/tests/file/bug32160.phpt +++ b/ext/standard/tests/file/bug32160.phpt @@ -2,9 +2,9 @@ Bug #32160 (copying a file into itself leads to data loss) --FILE-- <?php -$path = dirname(__FILE__) . "/bug32160.txt"; +$path = __DIR__ . "/bug32160.txt"; var_dump(copy($path, $path)); -chdir(dirname(__FILE__)); +chdir(__DIR__); var_dump(copy($path, "bug32160.txt")); var_dump(copy("bug32160.txt", "bug32160.txt")); ?> diff --git a/ext/standard/tests/file/bug35740.phpt b/ext/standard/tests/file/bug35740.phpt index 184dff264f..29e8d8ebf8 100644 --- a/ext/standard/tests/file/bug35740.phpt +++ b/ext/standard/tests/file/bug35740.phpt @@ -3,7 +3,7 @@ Bug #35740 (memory leak when including a directory) --FILE-- <?php -include (dirname(__FILE__)); +include (__DIR__); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/bug35781.phpt b/ext/standard/tests/file/bug35781.phpt index 226277b20f..b7ffa98760 100644 --- a/ext/standard/tests/file/bug35781.phpt +++ b/ext/standard/tests/file/bug35781.phpt @@ -3,7 +3,7 @@ Bug #35781 (stream_filter_append() causes segfault) --FILE-- <?php -$filename = dirname(__FILE__)."/bug35781.txt"; +$filename = __DIR__."/bug35781.txt"; $fp = fopen($filename, "w"); stream_filter_append($fp, "string.rot13", -49); diff --git a/ext/standard/tests/file/bug37158.phpt b/ext/standard/tests/file/bug37158.phpt index 673b4c6f3c..3200a62cf9 100644 --- a/ext/standard/tests/file/bug37158.phpt +++ b/ext/standard/tests/file/bug37158.phpt @@ -13,7 +13,7 @@ class VariableStream { stream_wrapper_register("var", "VariableStream"); -$file = dirname(__FILE__) . '/footest.txt'; +$file = __DIR__ . '/footest.txt'; $x = str_repeat(1, 8192); $fp = fopen($file, 'w'); for ($i = 0; $i < 5; $i++) { diff --git a/ext/standard/tests/file/bug38086.phpt b/ext/standard/tests/file/bug38086.phpt index 0544e06692..ed9b7cc114 100644 --- a/ext/standard/tests/file/bug38086.phpt +++ b/ext/standard/tests/file/bug38086.phpt @@ -4,8 +4,8 @@ Bug #38086 (stream_copy_to_stream() returns 0 when maxlen is bigger than the act <?php define('WIN', substr(PHP_OS, 0, 3) == 'WIN'); -$initial_file = dirname(__FILE__).'/bug38086.txt'; -$new_file = dirname(__FILE__).'/bug38086_1.txt'; +$initial_file = __DIR__.'/bug38086.txt'; +$new_file = __DIR__.'/bug38086_1.txt'; $src = fopen($initial_file, 'r'); stream_filter_append($src, "string.rot13", STREAM_FILTER_READ); diff --git a/ext/standard/tests/file/bug39538.phpt b/ext/standard/tests/file/bug39538.phpt index 71b5dea616..cdff507b48 100644 --- a/ext/standard/tests/file/bug39538.phpt +++ b/ext/standard/tests/file/bug39538.phpt @@ -4,7 +4,7 @@ Bug #39538 (fgetcsv can't handle starting newlines and trailing odd number of ba <?php $content = array("\"\nthis is an test\", \"next data\", \"p\narsed\"","\"\r\nthis is an test\", \"next data\", \"p\r\narsed\"","\"\n\rthis is an test\", \"next data\", \"p\n\rarsed\""); -$file = dirname(__FILE__) . "/bug39538.csv"; +$file = __DIR__ . "/bug39538.csv"; @unlink($file); foreach ($content as $v) { file_put_contents($file, $v); diff --git a/ext/standard/tests/file/bug39673.phpt b/ext/standard/tests/file/bug39673.phpt index 71484578d0..70a47e3fc1 100644 --- a/ext/standard/tests/file/bug39673.phpt +++ b/ext/standard/tests/file/bug39673.phpt @@ -5,7 +5,7 @@ Bug #39673 (file_get_contents causes bus error on certain offsets) $str = str_repeat("test", 3456); -$filename = dirname(__FILE__).'/bug39673.txt'; +$filename = __DIR__.'/bug39673.txt'; file_put_contents($filename, $str); $offsets = array( diff --git a/ext/standard/tests/file/bug40501.phpt b/ext/standard/tests/file/bug40501.phpt index 806aba637c..42fcd296cf 100644 --- a/ext/standard/tests/file/bug40501.phpt +++ b/ext/standard/tests/file/bug40501.phpt @@ -2,7 +2,7 @@ Bug #40501 (fgetcsv() can't handle trailing odd number of backslashes) --FILE-- <?php -$file = dirname(__FILE__).'/bug40501.csv'; +$file = __DIR__.'/bug40501.csv'; $h = fopen($file, 'r'); $data = fgetcsv($h, NULL, ',', '"', '"'); diff --git a/ext/standard/tests/file/bug41655_2.phpt b/ext/standard/tests/file/bug41655_2.phpt index 96f5cc86f0..20c29844c1 100644 --- a/ext/standard/tests/file/bug41655_2.phpt +++ b/ext/standard/tests/file/bug41655_2.phpt @@ -4,7 +4,7 @@ Bug #41655 (open_basedir bypass via glob()) 2/2 open_basedir=/ --FILE-- <?php - $dir = dirname(__FILE__); + $dir = __DIR__; $a=glob($dir . "/test*csv"); print_r($a); ?> diff --git a/ext/standard/tests/file/bug41815.phpt b/ext/standard/tests/file/bug41815.phpt index 040754b131..58f287cedf 100644 --- a/ext/standard/tests/file/bug41815.phpt +++ b/ext/standard/tests/file/bug41815.phpt @@ -3,7 +3,7 @@ Bug #41815 (Concurrent read/write fails when EOF is reached) --FILE-- <?php -$filename = dirname(__FILE__)."/concur_rw.txt"; +$filename = __DIR__."/concur_rw.txt"; @unlink($filename); $writer = fopen($filename, "wt"); diff --git a/ext/standard/tests/file/bug43248.phpt b/ext/standard/tests/file/bug43248.phpt index 1096435832..05a0cbda6b 100644 --- a/ext/standard/tests/file/bug43248.phpt +++ b/ext/standard/tests/file/bug43248.phpt @@ -2,7 +2,7 @@ Bug #43248 (backward compatibility break in realpath()) --FILE-- <?php -echo realpath(dirname(__FILE__) . '/../file/'); +echo realpath(__DIR__ . '/../file/'); ?> --EXPECTF-- %sfile diff --git a/ext/standard/tests/file/bug44805.phpt b/ext/standard/tests/file/bug44805.phpt index c9a2918e9c..ac4e334f53 100644 --- a/ext/standard/tests/file/bug44805.phpt +++ b/ext/standard/tests/file/bug44805.phpt @@ -2,7 +2,7 @@ Bug#44806 (rename() function is not portable to Windows) --FILE-- <?php -$dirname = dirname(__FILE__); +$dirname = __DIR__; $file1 = $dirname . DIRECTORY_SEPARATOR . "file1.txt"; $file2 = $dirname . DIRECTORY_SEPARATOR . "file2.txt"; diff --git a/ext/standard/tests/file/bug53848.phpt b/ext/standard/tests/file/bug53848.phpt index 016d59d0ca..eacf110969 100644 --- a/ext/standard/tests/file/bug53848.phpt +++ b/ext/standard/tests/file/bug53848.phpt @@ -2,7 +2,7 @@ Bug #53848 (fgetcsv removes leading spaces from fields) --FILE-- <?php -$file = dirname(__FILE__) . "/bug39538.csv"; +$file = __DIR__ . "/bug39538.csv"; @unlink($file); file_put_contents($file, "a,b\n c, d"); $fp = fopen($file, "r"); diff --git a/ext/standard/tests/file/bug65272.phpt b/ext/standard/tests/file/bug65272.phpt index 81a1e48979..24e50d15be 100644 --- a/ext/standard/tests/file/bug65272.phpt +++ b/ext/standard/tests/file/bug65272.phpt @@ -3,7 +3,7 @@ Bug #65272: flock() correctly sets wouldblock out param in windows --FILE-- <?php -$file = dirname(__FILE__)."/flock_bug65272.dat"; +$file = __DIR__."/flock_bug65272.dat"; $fp1 = fopen($file, "w"); var_dump(flock($fp1, LOCK_SH)); @@ -16,7 +16,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file = dirname(__FILE__)."/flock_bug65272.dat"; +$file = __DIR__."/flock_bug65272.dat"; unlink($file); ?> --EXPECT-- diff --git a/ext/standard/tests/file/bug65701.phpt b/ext/standard/tests/file/bug65701.phpt index 98c3d3d381..c4a356b41b 100644 --- a/ext/standard/tests/file/bug65701.phpt +++ b/ext/standard/tests/file/bug65701.phpt @@ -4,7 +4,7 @@ Test for bug #65701: copy() doesn't work when destination filename is created by Boro Sitnikovski <buritomath@yahoo.com> --FILE-- <?php -$file_path = dirname(__FILE__) . "/bug65701/"; +$file_path = __DIR__ . "/bug65701/"; if (!is_dir($file_path)) { mkdir($file_path); @@ -20,7 +20,7 @@ var_dump(filesize($dst)); ?> --CLEAN-- <?php -$file_path = dirname(__FILE__) . "/bug65701/"; +$file_path = __DIR__ . "/bug65701/"; foreach (scandir($file_path) as $file) { if (strpos($file, "bug65701") !== false || 'WIN' == substr(PHP_OS, 0, 3)) { unlink($file_path . $file); diff --git a/ext/standard/tests/file/bug68335.phpt b/ext/standard/tests/file/bug68335.phpt index 63eda4d923..b3a8165e5b 100644 --- a/ext/standard/tests/file/bug68335.phpt +++ b/ext/standard/tests/file/bug68335.phpt @@ -2,7 +2,7 @@ Bug #68335: rmdir doesnt work with file:// stream wrapper --FILE-- <?php -$dir = 'file://' . dirname(__FILE__) . '/testDir'; +$dir = 'file://' . __DIR__ . '/testDir'; mkdir($dir); var_dump(is_dir($dir)); rmdir($dir); diff --git a/ext/standard/tests/file/bug69628.phpt b/ext/standard/tests/file/bug69628.phpt index 7e18619a3e..378a8f722e 100644 --- a/ext/standard/tests/file/bug69628.phpt +++ b/ext/standard/tests/file/bug69628.phpt @@ -9,7 +9,7 @@ if (!defined('GLOB_BRACE')) { --FILE-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dirname used here $dirname = "$file_path/bug69628"; @@ -33,7 +33,7 @@ function sort_var_dump($results) { --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/bug69628/image.jPg"); unlink("$file_path/bug69628/image.gIf"); unlink("$file_path/bug69628/image.png"); diff --git a/ext/standard/tests/file/bug72035.phpt b/ext/standard/tests/file/bug72035.phpt index feb4eb9acd..704d746efc 100644 --- a/ext/standard/tests/file/bug72035.phpt +++ b/ext/standard/tests/file/bug72035.phpt @@ -11,7 +11,7 @@ if (!file_exists($cgi)) die('skip CGI binary not found'); --FILE-- <?php -$fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . md5(uniqid()) . ".php"; +$fl = __DIR__ . DIRECTORY_SEPARATOR . md5(uniqid()) . ".php"; $fl = substr($fl, 2); $cgi = realpath(dirname(PHP_BINARY) . DIRECTORY_SEPARATOR . "php-cgi.exe"); diff --git a/ext/standard/tests/file/bug75679.phpt b/ext/standard/tests/file/bug75679.phpt index af44565c45..1441447853 100644 --- a/ext/standard/tests/file/bug75679.phpt +++ b/ext/standard/tests/file/bug75679.phpt @@ -2,7 +2,7 @@ Bug #75679 Path 260 character problem --FILE-- <?php -$d = dirname(__FILE__); +$d = __DIR__; $Files2Report = [ str_pad ($d . '/' . str_repeat (str_pad ('bug75679_path_259_characters_long_', 100, '_') . '/', 1), 259, '_') => [], @@ -27,7 +27,7 @@ foreach ($Files2Report as $file => &$Report) ==DONE== --CLEAN-- <?php -$d = dirname(__FILE__); +$d = __DIR__; $Files2Report = [ str_pad ($d . '/' . str_repeat (str_pad ('bug75679_path_259_characters_long_', 100, '_') . '/', 1), 259, '_') => [], diff --git a/ext/standard/tests/file/chmod_variation1.phpt b/ext/standard/tests/file/chmod_variation1.phpt index f35e54efb6..935d30ce55 100644 --- a/ext/standard/tests/file/chmod_variation1.phpt +++ b/ext/standard/tests/file/chmod_variation1.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { define("PERMISSIONS_MASK", 0777); -$dirname = dirname(__FILE__) . "/" . basename(__FILE__, ".php") . "testdir"; +$dirname = __DIR__ . "/" . basename(__FILE__, ".php") . "testdir"; mkdir($dirname); for ($perms_to_set = 0777; $perms_to_set >= 0; $perms_to_set--) { diff --git a/ext/standard/tests/file/chmod_variation2-win32-mb.phpt b/ext/standard/tests/file/chmod_variation2-win32-mb.phpt index 525052b9d9..2766e224aa 100644 --- a/ext/standard/tests/file/chmod_variation2-win32-mb.phpt +++ b/ext/standard/tests/file/chmod_variation2-win32-mb.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { define("PERMISSIONS_MASK", 0777); -$script_directory = dirname(__FILE__); +$script_directory = __DIR__; chdir($script_directory); $test_dirname = basename(__FILE__, ".php") . "testdirç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"; mkdir($test_dirname); diff --git a/ext/standard/tests/file/chmod_variation2-win32.phpt b/ext/standard/tests/file/chmod_variation2-win32.phpt index 1e6f3286f9..9cab065024 100644 --- a/ext/standard/tests/file/chmod_variation2-win32.phpt +++ b/ext/standard/tests/file/chmod_variation2-win32.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { define("PERMISSIONS_MASK", 0777); -$script_directory = dirname(__FILE__); +$script_directory = __DIR__; chdir($script_directory); $test_dirname = basename(__FILE__, ".php") . "testdir"; mkdir($test_dirname); diff --git a/ext/standard/tests/file/chmod_variation2.phpt b/ext/standard/tests/file/chmod_variation2.phpt index c7a3db0fe7..e96af25ec4 100644 --- a/ext/standard/tests/file/chmod_variation2.phpt +++ b/ext/standard/tests/file/chmod_variation2.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { define("PERMISSIONS_MASK", 0777); -$script_directory = dirname(__FILE__); +$script_directory = __DIR__; chdir($script_directory); $test_dirname = basename(__FILE__, ".php") . "testdir"; mkdir($test_dirname); diff --git a/ext/standard/tests/file/copy_basic.phpt b/ext/standard/tests/file/copy_basic.phpt index b23a262649..2bd3fc5176 100644 --- a/ext/standard/tests/file/copy_basic.phpt +++ b/ext/standard/tests/file/copy_basic.phpt @@ -12,7 +12,7 @@ echo "*** Testing copy() function: to copy file from source to destination --\n" var_dump( file_exists(__FILE__) ); /* copying the file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name1 = $file_path."/copy_basic1.tmp"; $file_name2 = $file_path."/copy_basic2.tmp"; var_dump( copy(__FILE__, $file_name1) ); @@ -34,7 +34,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name1 = $file_path."/copy_basic1.tmp"; $file_name2 = $file_path."/copy_basic2.tmp"; unlink($file_name1); diff --git a/ext/standard/tests/file/copy_variation1.phpt b/ext/standard/tests/file/copy_variation1.phpt index bb7ae44fe1..018ff47048 100644 --- a/ext/standard/tests/file/copy_variation1.phpt +++ b/ext/standard/tests/file/copy_variation1.phpt @@ -12,7 +12,7 @@ Test copy() function: usage variations - destination file names(numerics/strings */ echo "*** Test copy() function: destination file names containing numerics/strings ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation1.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -71,7 +71,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation1.tmp"); +unlink(__DIR__."/copy_variation1.tmp"); ?> --EXPECTF-- *** Test copy() function: destination file names containing numerics/strings *** diff --git a/ext/standard/tests/file/copy_variation10.phpt b/ext/standard/tests/file/copy_variation10.phpt index a0daa2a574..78c3426adc 100644 --- a/ext/standard/tests/file/copy_variation10.phpt +++ b/ext/standard/tests/file/copy_variation10.phpt @@ -9,7 +9,7 @@ Test copy() function: usage variations - identical names /* Test copy(): Try copying source file to desntination file, where destination file name is identical to source name */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy(): Trying to create a copy of file with the same source name ***\n"; $file = $file_path."/copy_variation10.tmp"; @@ -25,7 +25,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation10.tmp"); +unlink(__DIR__."/copy_variation10.tmp"); ?> --EXPECT-- *** Test copy(): Trying to create a copy of file with the same source name *** diff --git a/ext/standard/tests/file/copy_variation11.phpt b/ext/standard/tests/file/copy_variation11.phpt index 225351c619..312802f181 100644 --- a/ext/standard/tests/file/copy_variation11.phpt +++ b/ext/standard/tests/file/copy_variation11.phpt @@ -9,7 +9,7 @@ Test copy() function: usage variations - existing dir as destination /* Test copy(): Trying to copy the file to a destination, where destination is an existing dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: Trying to create a copy of source file as a dir ***\n"; $file = $file_path."/copy_variation11.tmp"; @@ -46,8 +46,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation11.tmp"); -rmdir(dirname(__FILE__)."/copy_variation11"); +unlink(__DIR__."/copy_variation11.tmp"); +rmdir(__DIR__."/copy_variation11"); ?> --EXPECTF-- *** Test copy() function: Trying to create a copy of source file as a dir *** diff --git a/ext/standard/tests/file/copy_variation12-win32.phpt b/ext/standard/tests/file/copy_variation12-win32.phpt index ff74c5e42c..01bf14cc54 100644 --- a/ext/standard/tests/file/copy_variation12-win32.phpt +++ b/ext/standard/tests/file/copy_variation12-win32.phpt @@ -14,7 +14,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Test copy(): Trying to create a copy of an existing dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: Trying to create a copy of an existing dir ***\n"; $src_dir = $file_path."/copy_variation12"; @@ -32,8 +32,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_copy_variation12"); -rmdir(dirname(__FILE__)."/copy_variation12"); +unlink(__DIR__."/copy_copy_variation12"); +rmdir(__DIR__."/copy_variation12"); ?> --EXPECTF-- *** Test copy() function: Trying to create a copy of an existing dir *** diff --git a/ext/standard/tests/file/copy_variation12.phpt b/ext/standard/tests/file/copy_variation12.phpt index a5f375b6c9..945ec07083 100644 --- a/ext/standard/tests/file/copy_variation12.phpt +++ b/ext/standard/tests/file/copy_variation12.phpt @@ -14,7 +14,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Test copy(): Trying to create a copy of an existing dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: Trying to create a copy of an existing dir ***\n"; $src_dir = $file_path."/copy_variation12"; @@ -33,7 +33,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/copy_variation12"); +rmdir(__DIR__."/copy_variation12"); ?> --EXPECTF-- *** Test copy() function: Trying to create a copy of an existing dir *** diff --git a/ext/standard/tests/file/copy_variation13.phpt b/ext/standard/tests/file/copy_variation13.phpt index a831d845c7..fcd3d6a2a6 100644 --- a/ext/standard/tests/file/copy_variation13.phpt +++ b/ext/standard/tests/file/copy_variation13.phpt @@ -10,7 +10,7 @@ Test copy() function: usage variations - src as dir and dest as an existing file /* Test copy(): Trying to copy dir to an existing file */ echo "*** Test copy() function: Trying to copy dir to file ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file = $file_path."/copy_variation13_dir.tmp"; fclose(fopen($file, "w")); $dir = $file_path."/copy_variation13"; @@ -35,8 +35,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation13_dir.tmp"); -rmdir(dirname(__FILE__)."/copy_variation13"); +unlink(__DIR__."/copy_variation13_dir.tmp"); +rmdir(__DIR__."/copy_variation13"); ?> --EXPECTF-- *** Test copy() function: Trying to copy dir to file *** diff --git a/ext/standard/tests/file/copy_variation14.phpt b/ext/standard/tests/file/copy_variation14.phpt index 49251bb495..45289af90a 100644 --- a/ext/standard/tests/file/copy_variation14.phpt +++ b/ext/standard/tests/file/copy_variation14.phpt @@ -10,7 +10,7 @@ Test copy() function: usage variations - non existing src/dest /* Test copy(): Trying to create a copy of non-existing source in an existing destination and an existing source in non-existing destiantion */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: Trying to create a copy of non-existing source in existing destination ***"; $file = $file_path."/copy_variation14.tmp"; @@ -30,7 +30,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation14.tmp"); +unlink(__DIR__."/copy_variation14.tmp"); ?> --EXPECTF-- *** Test copy() function: Trying to create a copy of non-existing source in existing destination *** diff --git a/ext/standard/tests/file/copy_variation15.phpt b/ext/standard/tests/file/copy_variation15.phpt index 8f85f923d5..a641a8675a 100644 --- a/ext/standard/tests/file/copy_variation15.phpt +++ b/ext/standard/tests/file/copy_variation15.phpt @@ -5,7 +5,7 @@ Test copy() function: usage variations - destination dir access perms if(substr(PHP_OS, 0, 3) == 'WIN') die("skip do not run on Windows"); // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/copy_variation15_root_check.tmp"; +$filename = __DIR__."/copy_variation15_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -23,7 +23,7 @@ unlink($filename); /* Test copy(): Trying to create a copy of file in a dir which doesn't have write permissions */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: Trying to create a copy of file in a dir which doesn't have write permissions ***"; $file = $file_path."/copy_variation15.tmp"; @@ -50,8 +50,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation15.tmp"); -rmdir(dirname(__FILE__)."/copy_variation15"); +unlink(__DIR__."/copy_variation15.tmp"); +rmdir(__DIR__."/copy_variation15"); ?> --EXPECTF-- *** Test copy() function: Trying to create a copy of file in a dir which doesn't have write permissions *** diff --git a/ext/standard/tests/file/copy_variation16-win32.phpt b/ext/standard/tests/file/copy_variation16-win32.phpt index 7872a2138e..9321c1d9a9 100644 --- a/ext/standard/tests/file/copy_variation16-win32.phpt +++ b/ext/standard/tests/file/copy_variation16-win32.phpt @@ -16,7 +16,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") into different destination dir paths given in various notations */ echo "*** Testing copy() function: copying data file across directories ***\n"; -$base_dir = dirname(__FILE__)."/copy_variation16"; +$base_dir = __DIR__."/copy_variation16"; mkdir($base_dir); $sub_dir = $base_dir."/copy_variation16_sub"; @@ -25,7 +25,7 @@ mkdir($sub_dir); $dirname_with_blank = $sub_dir."/copy variation16"; mkdir($dirname_with_blank); -$src_file_name = dirname(__FILE__)."/copy_variation16.tmp"; +$src_file_name = __DIR__."/copy_variation16.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite($file_handle, str_repeat("Hello world, this is 2007 year ...\n", 100)); fclose($file_handle); diff --git a/ext/standard/tests/file/copy_variation16.phpt b/ext/standard/tests/file/copy_variation16.phpt index e231715b0b..e594aa244b 100644 --- a/ext/standard/tests/file/copy_variation16.phpt +++ b/ext/standard/tests/file/copy_variation16.phpt @@ -16,7 +16,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") into different destination dir paths given in various notations */ echo "*** Testing copy() function: copying data file across directories ***\n"; -$base_dir = dirname(__FILE__)."/copy_variation16"; +$base_dir = __DIR__."/copy_variation16"; mkdir($base_dir); $sub_dir = $base_dir."/copy_variation16_sub"; @@ -25,7 +25,7 @@ mkdir($sub_dir); $dirname_with_blank = $sub_dir."/copy variation16"; mkdir($dirname_with_blank); -$src_file_name = dirname(__FILE__)."/copy_variation16.tmp"; +$src_file_name = __DIR__."/copy_variation16.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite($file_handle, str_repeat("Hello world, this is 2007 year ...\n", 100)); fclose($file_handle); diff --git a/ext/standard/tests/file/copy_variation17.phpt b/ext/standard/tests/file/copy_variation17.phpt index 970e3155c3..337e7ec46e 100644 --- a/ext/standard/tests/file/copy_variation17.phpt +++ b/ext/standard/tests/file/copy_variation17.phpt @@ -9,7 +9,7 @@ Test copy() function: usage variations - wildcard chars in source /* Test copy(): Trying to copy the source file which is given with the combination of wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: With source file names containing wild-card chars ***\n"; $src_file = $file_path."/copy_variation17.tmp"; @@ -47,8 +47,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation17.tmp"); -rmdir(dirname(__FILE__)."/copy_variation17"); +unlink(__DIR__."/copy_variation17.tmp"); +rmdir(__DIR__."/copy_variation17"); ?> --EXPECTF-- *** Test copy() function: With source file names containing wild-card chars *** diff --git a/ext/standard/tests/file/copy_variation18.phpt b/ext/standard/tests/file/copy_variation18.phpt index 0e39ca6c67..81d5e3dab9 100644 --- a/ext/standard/tests/file/copy_variation18.phpt +++ b/ext/standard/tests/file/copy_variation18.phpt @@ -9,7 +9,7 @@ Test copy() function: usage variations - stat after copy /* Test copy(): checking stat of file before and after after copy operation */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); @@ -44,8 +44,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_copy_variation18.tmp"); -unlink(dirname(__FILE__)."/copy_variation18.tmp"); +unlink(__DIR__."/copy_copy_variation18.tmp"); +unlink(__DIR__."/copy_variation18.tmp"); ?> --EXPECT-- *** Test copy() function: stat of file before and after copy *** diff --git a/ext/standard/tests/file/copy_variation2-win32-mb.phpt b/ext/standard/tests/file/copy_variation2-win32-mb.phpt index 50c91b1936..530fb6089c 100644 --- a/ext/standard/tests/file/copy_variation2-win32-mb.phpt +++ b/ext/standard/tests/file/copy_variation2-win32-mb.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") */ echo "*** Test copy() function: destination file names containing special characters ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation2ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -85,7 +85,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation2ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"); +unlink(__DIR__."/copy_variation2ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"); ?> --EXPECTF-- *** Test copy() function: destination file names containing special characters *** diff --git a/ext/standard/tests/file/copy_variation2-win32.phpt b/ext/standard/tests/file/copy_variation2-win32.phpt index 3bde2e37de..563475a3bb 100644 --- a/ext/standard/tests/file/copy_variation2-win32.phpt +++ b/ext/standard/tests/file/copy_variation2-win32.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") */ echo "*** Test copy() function: destination file names containing special characters ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation2.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -85,7 +85,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation2.tmp"); +unlink(__DIR__."/copy_variation2.tmp"); ?> --EXPECTF-- *** Test copy() function: destination file names containing special characters *** diff --git a/ext/standard/tests/file/copy_variation2.phpt b/ext/standard/tests/file/copy_variation2.phpt index b3bd5e6a8a..2106cd5ed7 100644 --- a/ext/standard/tests/file/copy_variation2.phpt +++ b/ext/standard/tests/file/copy_variation2.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") */ echo "*** Test copy() function: destination file names containing special characters ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation2.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -86,7 +86,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation2.tmp"); +unlink(__DIR__."/copy_variation2.tmp"); ?> --EXPECTF-- *** Test copy() function: destination file names containing special characters *** diff --git a/ext/standard/tests/file/copy_variation3-win32.phpt b/ext/standard/tests/file/copy_variation3-win32.phpt index 28cbd7b120..011e342be4 100644 --- a/ext/standard/tests/file/copy_variation3-win32.phpt +++ b/ext/standard/tests/file/copy_variation3-win32.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") */ echo "*** Test copy() function: destination file names containing whitespaces ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation3.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -72,7 +72,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation3.tmp"); +unlink(__DIR__."/copy_variation3.tmp"); ?> --EXPECTF-- *** Test copy() function: destination file names containing whitespaces *** diff --git a/ext/standard/tests/file/copy_variation3.phpt b/ext/standard/tests/file/copy_variation3.phpt index cbbfd51ebc..af2b47749d 100644 --- a/ext/standard/tests/file/copy_variation3.phpt +++ b/ext/standard/tests/file/copy_variation3.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") */ echo "*** Test copy() function: destination file names containing whitespaces ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation3.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -71,7 +71,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation3.tmp"); +unlink(__DIR__."/copy_variation3.tmp"); ?> --EXPECT-- *** Test copy() function: destination file names containing whitespaces *** diff --git a/ext/standard/tests/file/copy_variation4.phpt b/ext/standard/tests/file/copy_variation4.phpt Binary files differindex 3c3abea05a..b082c082b5 100644 --- a/ext/standard/tests/file/copy_variation4.phpt +++ b/ext/standard/tests/file/copy_variation4.phpt diff --git a/ext/standard/tests/file/copy_variation5-win32.phpt b/ext/standard/tests/file/copy_variation5-win32.phpt index d26161a226..8ef72ef8ce 100644 --- a/ext/standard/tests/file/copy_variation5-win32.phpt +++ b/ext/standard/tests/file/copy_variation5-win32.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") */ echo "*** Test copy() function: checking case sensitivity in creation of destination file names ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation5.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -75,7 +75,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation5.tmp"); +unlink(__DIR__."/copy_variation5.tmp"); ?> --EXPECTF-- *** Test copy() function: checking case sensitivity in creation of destination file names *** diff --git a/ext/standard/tests/file/copy_variation5.phpt b/ext/standard/tests/file/copy_variation5.phpt index 5a577508e7..404ff843fb 100644 --- a/ext/standard/tests/file/copy_variation5.phpt +++ b/ext/standard/tests/file/copy_variation5.phpt @@ -17,7 +17,7 @@ if( (stristr(PHP_OS, "Darwin")) || (stristr(PHP_OS, "Win")) ) */ echo "*** Test copy() function: checking case sensitivity in creation of destination file names ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation5.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -74,7 +74,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation5.tmp"); +unlink(__DIR__."/copy_variation5.tmp"); ?> --EXPECTF-- *** Test copy() function: checking case sensitivity in creation of destination file names *** diff --git a/ext/standard/tests/file/copy_variation6-win32.phpt b/ext/standard/tests/file/copy_variation6-win32.phpt index a65b63f3b0..ce2dc89f99 100644 --- a/ext/standard/tests/file/copy_variation6-win32.phpt +++ b/ext/standard/tests/file/copy_variation6-win32.phpt @@ -16,7 +16,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") into different destination dir paths given in various notations */ echo "*** Test copy() function: copying file across directories ***\n"; -$base_dir = dirname(__FILE__)."/copy_variation6"; +$base_dir = __DIR__."/copy_variation6"; mkdir($base_dir); $sub_dir = $base_dir."/copy_variation6_sub"; @@ -25,7 +25,7 @@ mkdir($sub_dir); $dirname_with_blank = $sub_dir."/copy variation6"; mkdir($dirname_with_blank); -$src_file_name = dirname(__FILE__)."/copy_variation6.tmp"; +$src_file_name = __DIR__."/copy_variation6.tmp"; fclose( fopen($src_file_name, "w") ); echo "Size of source file => "; diff --git a/ext/standard/tests/file/copy_variation6.phpt b/ext/standard/tests/file/copy_variation6.phpt index 15de119035..2e7ffd64d4 100644 --- a/ext/standard/tests/file/copy_variation6.phpt +++ b/ext/standard/tests/file/copy_variation6.phpt @@ -16,7 +16,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") into different destination dir paths given in various notations */ echo "*** Test copy() function: copying file across directories ***\n"; -$base_dir = dirname(__FILE__)."/copy_variation6"; +$base_dir = __DIR__."/copy_variation6"; mkdir($base_dir); $sub_dir = $base_dir."/copy_variation6_sub"; @@ -25,7 +25,7 @@ mkdir($sub_dir); $dirname_with_blank = $sub_dir."/copy variation6"; mkdir($dirname_with_blank); -$src_file_name = dirname(__FILE__)."/copy_variation6.tmp"; +$src_file_name = __DIR__."/copy_variation6.tmp"; fclose( fopen($src_file_name, "w") ); echo "Size of source file => "; diff --git a/ext/standard/tests/file/copy_variation7.phpt b/ext/standard/tests/file/copy_variation7.phpt index 8a0fae01e3..0ab30cdb7b 100644 --- a/ext/standard/tests/file/copy_variation7.phpt +++ b/ext/standard/tests/file/copy_variation7.phpt @@ -14,7 +14,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Test copy() function: Trying to create copy of links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing copy() with symlink and hardlink ***\n"; $file = $file_path."/copy_variation7.tmp"; @@ -55,7 +55,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/copy_copy_variation7_symlink.tmp"); unlink($file_path."/copy_copy_variation7_hardlink.tmp"); unlink($file_path."/copy_variation7_symlink.tmp"); diff --git a/ext/standard/tests/file/copy_variation8.phpt b/ext/standard/tests/file/copy_variation8.phpt index e67375dfb5..ebad6e2c4e 100644 --- a/ext/standard/tests/file/copy_variation8.phpt +++ b/ext/standard/tests/file/copy_variation8.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") echo "*** Testing copy() function: copying links across different directories ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $base_dir = $file_path."/copy_variation8"; mkdir($base_dir); diff --git a/ext/standard/tests/file/copy_variation9.phpt b/ext/standard/tests/file/copy_variation9.phpt index c6cb309433..c0651a7375 100644 --- a/ext/standard/tests/file/copy_variation9.phpt +++ b/ext/standard/tests/file/copy_variation9.phpt @@ -6,7 +6,7 @@ if(substr(PHP_OS, 0, 3) == 'WIN') die("skip do not run on Windows"); // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/copy_variation9_root_check.tmp"; +$filename = __DIR__."/copy_variation9_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -24,7 +24,7 @@ unlink($filename); /* Test copy(): Trying to copy source file to destination file with and without write permissions */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: destination with/without write permissions ***\n"; $src_file_name = $file_path."/copy_variation9.tmp"; @@ -52,8 +52,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_copy_variation9.tmp"); -unlink(dirname(__FILE__)."/copy_variation9.tmp"); +unlink(__DIR__."/copy_copy_variation9.tmp"); +unlink(__DIR__."/copy_variation9.tmp"); ?> --EXPECTF-- *** Test copy() function: destination with/without write permissions *** diff --git a/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt b/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt index 2c3aea79cf..9131a4cfcd 100644 --- a/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt +++ b/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt @@ -2,7 +2,7 @@ Test function fstat() on directory wrapper --FILE-- <?php -$d = dirname(__FILE__); +$d = __DIR__; $h = opendir($d); var_dump(fstat($h)); closedir($h); diff --git a/ext/standard/tests/file/disk_free_space_basic.phpt b/ext/standard/tests/file/disk_free_space_basic.phpt index 4ab48604ad..fcb2a93e41 100644 --- a/ext/standard/tests/file/disk_free_space_basic.phpt +++ b/ext/standard/tests/file/disk_free_space_basic.phpt @@ -15,7 +15,7 @@ memory_limit=32M * filesystem or disk partition */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing with existing directory ***\n"; var_dump( disk_free_space($file_path) ); @@ -51,7 +51,7 @@ echo"\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/disk_free_space/disk_free_space.tmp"); rmdir($file_path."/disk_free_space"); ?> diff --git a/ext/standard/tests/file/disk_free_space_error-win32.phpt b/ext/standard/tests/file/disk_free_space_error-win32.phpt index acb0fdd717..43e71719c0 100644 --- a/ext/standard/tests/file/disk_free_space_error-win32.phpt +++ b/ext/standard/tests/file/disk_free_space_error-win32.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) != 'WIN' ) */ echo "*** Testing error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( disk_free_space() ); // Zero Arguments var_dump( diskfreespace() ); @@ -36,7 +36,7 @@ echo"\n-- Done --"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/disk_free_space.tmp"); ?> diff --git a/ext/standard/tests/file/disk_free_space_error.phpt b/ext/standard/tests/file/disk_free_space_error.phpt index 6433cde702..aca17b2331 100644 --- a/ext/standard/tests/file/disk_free_space_error.phpt +++ b/ext/standard/tests/file/disk_free_space_error.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) == 'WIN') */ echo "*** Testing error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( disk_free_space() ); // Zero Arguments var_dump( diskfreespace() ); @@ -36,7 +36,7 @@ echo"\n-- Done --"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/disk_free_space.tmp"); ?> diff --git a/ext/standard/tests/file/disk_free_space_variation.phpt b/ext/standard/tests/file/disk_free_space_variation.phpt index 6c6575d896..1008d9ecbb 100644 --- a/ext/standard/tests/file/disk_free_space_variation.phpt +++ b/ext/standard/tests/file/disk_free_space_variation.phpt @@ -9,7 +9,7 @@ Test disk_free_space and its alias diskfreespace() functions : Usage Variations * filesystem or disk partition */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing with a directory ***\n"; var_dump( disk_free_space($file_path."/..") ); @@ -57,7 +57,7 @@ echo"\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir($file_path."/disk_free_space"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/disk_total_space_basic.phpt b/ext/standard/tests/file/disk_total_space_basic.phpt index 52c46e7785..f6f041118c 100644 --- a/ext/standard/tests/file/disk_total_space_basic.phpt +++ b/ext/standard/tests/file/disk_total_space_basic.phpt @@ -9,7 +9,7 @@ Test disk_total_space() function : basic functionality * or disk partition. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing with normal directory ***\n"; var_dump( disk_total_space($file_path) ); @@ -31,7 +31,7 @@ echo"\n-- Done --"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/disk_total_space/disk_total_space.tmp"); rmdir($file_path."/disk_total_space"); ?> diff --git a/ext/standard/tests/file/disk_total_space_error-win32.phpt b/ext/standard/tests/file/disk_total_space_error-win32.phpt index 0d511b37a7..c3a2854eff 100644 --- a/ext/standard/tests/file/disk_total_space_error-win32.phpt +++ b/ext/standard/tests/file/disk_total_space_error-win32.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) != 'WIN' ) */ echo "*** Testing error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( disk_total_space() ); // Zero Arguments var_dump( disk_total_space( $file_path, "extra argument") ); // More than valid number of arguments @@ -32,7 +32,7 @@ echo"\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/disk_total_space.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/disk_total_space_error.phpt b/ext/standard/tests/file/disk_total_space_error.phpt index 2c8a940117..125d093ccd 100644 --- a/ext/standard/tests/file/disk_total_space_error.phpt +++ b/ext/standard/tests/file/disk_total_space_error.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) == 'WIN') */ echo "*** Testing error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( disk_total_space() ); // Zero Arguments var_dump( disk_total_space( $file_path, "extra argument") ); // More than valid number of arguments @@ -32,7 +32,7 @@ echo"\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/disk_total_space.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/disk_total_space_variation.phpt b/ext/standard/tests/file/disk_total_space_variation.phpt index 071fa60749..3ba3771aac 100644 --- a/ext/standard/tests/file/disk_total_space_variation.phpt +++ b/ext/standard/tests/file/disk_total_space_variation.phpt @@ -9,7 +9,7 @@ Testing disk_total_space() functions : Usage Variations. * filesystem or disk partition. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing with a directory ***\n"; var_dump( disk_total_space($file_path."/..") ); @@ -60,7 +60,7 @@ echo"\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir($file_path."/disk_total_space"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fflush_basic.phpt b/ext/standard/tests/file/fflush_basic.phpt index 22a62ed1b0..2c9314394b 100644 --- a/ext/standard/tests/file/fflush_basic.phpt +++ b/ext/standard/tests/file/fflush_basic.phpt @@ -13,7 +13,7 @@ second line of string third line of string EOD; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fflush_basic.tmp"; // opening a file @@ -38,7 +38,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fflush_basic.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fflush_variation1-win32-mb.phpt b/ext/standard/tests/file/fflush_variation1-win32-mb.phpt index 19349b4442..9c654a8688 100644 --- a/ext/standard/tests/file/fflush_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/fflush_variation1-win32-mb.phpt @@ -13,7 +13,7 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) /* test fflush() with handle to the files opened in different modes */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require $file_path.'/file.inc'; echo "*** Testing fflush(): with various types of files ***\n"; diff --git a/ext/standard/tests/file/fflush_variation1-win32.phpt b/ext/standard/tests/file/fflush_variation1-win32.phpt index 3ebde9ef85..fd72d652b4 100644 --- a/ext/standard/tests/file/fflush_variation1-win32.phpt +++ b/ext/standard/tests/file/fflush_variation1-win32.phpt @@ -13,7 +13,7 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) /* test fflush() with handle to the files opened in different modes */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require $file_path.'/file.inc'; echo "*** Testing fflush(): with various types of files ***\n"; diff --git a/ext/standard/tests/file/fflush_variation1.phpt b/ext/standard/tests/file/fflush_variation1.phpt index caadbf2de4..8dd2db1d21 100644 --- a/ext/standard/tests/file/fflush_variation1.phpt +++ b/ext/standard/tests/file/fflush_variation1.phpt @@ -13,7 +13,7 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) /* test fflush() with handle of files opened in different modes */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require $file_path.'/file.inc'; echo "*** Testing fflush(): with various types of files ***\n"; diff --git a/ext/standard/tests/file/fflush_variation2.phpt b/ext/standard/tests/file/fflush_variation2.phpt index 39d29f699c..7f6b914304 100644 --- a/ext/standard/tests/file/fflush_variation2.phpt +++ b/ext/standard/tests/file/fflush_variation2.phpt @@ -13,7 +13,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') /* test fflush() with handle to symbollic link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require $file_path.'/file.inc'; echo "*** Testing fflush(): with soft links to files opened in diff modes ***\n"; diff --git a/ext/standard/tests/file/fflush_variation3.phpt b/ext/standard/tests/file/fflush_variation3.phpt index 1f13ee5c31..c74eeb8e25 100644 --- a/ext/standard/tests/file/fflush_variation3.phpt +++ b/ext/standard/tests/file/fflush_variation3.phpt @@ -13,7 +13,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') /* test fflush() with handle to hard links as resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require $file_path.'/file.inc'; echo "*** Testing fflush(): with hard links to files opened in diff modes ***\n"; diff --git a/ext/standard/tests/file/fflush_variation4.phpt b/ext/standard/tests/file/fflush_variation4.phpt index 823de4c56a..94c0f6a31e 100644 --- a/ext/standard/tests/file/fflush_variation4.phpt +++ b/ext/standard/tests/file/fflush_variation4.phpt @@ -8,7 +8,7 @@ Test fflush() function: usage variations - file opened in read-only mode /* test fflush() with handle to a file opened in read-only mode as resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require $file_path.'/file.inc'; echo "*** Testing fflush(): with file handles of files opened in various read modes ***\n"; diff --git a/ext/standard/tests/file/fgetc_basic.phpt b/ext/standard/tests/file/fgetc_basic.phpt index 6db0d58c91..f5b8ef9055 100644 --- a/ext/standard/tests/file/fgetc_basic.phpt +++ b/ext/standard/tests/file/fgetc_basic.phpt @@ -21,7 +21,7 @@ for($outerloop_counter = 0; $outerloop_counter < count($file_content_types); $ou echo $outerloop_counter + 1; echo " ---\n"; // create file file - create_files(dirname(__FILE__), 1, $file_content_types[$outerloop_counter], 0755, 1, "w", "fgetc_basic", 1); + create_files(__DIR__, 1, $file_content_types[$outerloop_counter], 0755, 1, "w", "fgetc_basic", 1); //open the file in different modes and check the working of fgetc for($innerloop_counter = 0; $innerloop_counter < count($file_modes); $innerloop_counter++) { @@ -32,7 +32,7 @@ for($outerloop_counter = 0; $outerloop_counter < count($file_content_types); $ou echo " --\n"; // open the file using the $file_modes - $filename = dirname(__FILE__)."/fgetc_basic1.tmp"; // file name that is created by create_files + $filename = __DIR__."/fgetc_basic1.tmp"; // file name that is created by create_files echo "-- Testing fgetc() : file opened using $file_modes[$innerloop_counter] mode --\n"; $file_handle = fopen($filename, $file_modes[$innerloop_counter]); if ( !$file_handle ) { @@ -55,7 +55,7 @@ for($outerloop_counter = 0; $outerloop_counter < count($file_content_types); $ou } // end of innerloop for // delete the file - delete_files(dirname(__FILE__), 1, "fgetc_basic", 1, ".tmp"); + delete_files(__DIR__, 1, "fgetc_basic", 1, ".tmp"); } // end of outerloop for diff --git a/ext/standard/tests/file/fgetc_variation1.phpt b/ext/standard/tests/file/fgetc_variation1.phpt index 6635e8d554..7c6a01ded9 100644 --- a/ext/standard/tests/file/fgetc_variation1.phpt +++ b/ext/standard/tests/file/fgetc_variation1.phpt @@ -12,9 +12,9 @@ include ("file.inc"); echo "*** Testing fgetc() : usage variations ***\n"; echo "-- Testing fgetc() with file whose file pointer is pointing to EOF --\n"; // create a file -create_files(dirname(__FILE__), 1, "text_with_new_line", 0755, 1, "w", "fgetc_variation"); +create_files(__DIR__, 1, "text_with_new_line", 0755, 1, "w", "fgetc_variation"); -$filename = dirname(__FILE__)."/fgetc_variation1.tmp"; +$filename = __DIR__."/fgetc_variation1.tmp"; // loop to check the file opened in different read modes $file_modes = array("r", "rb", "rt", "r+", "r+b", "r+t"); @@ -44,7 +44,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink( dirname(__FILE__)."/fgetc_variation1.tmp"); +unlink( __DIR__."/fgetc_variation1.tmp"); ?> --EXPECT-- *** Testing fgetc() : usage variations *** diff --git a/ext/standard/tests/file/fgetc_variation3.phpt b/ext/standard/tests/file/fgetc_variation3.phpt index aab7bbbf8f..8e052907e8 100644 --- a/ext/standard/tests/file/fgetc_variation3.phpt +++ b/ext/standard/tests/file/fgetc_variation3.phpt @@ -18,7 +18,7 @@ include ("file.inc"); echo "*** Testing fgetc() with file opened in write only mode ***\n"; $file_modes = array("w", "wb", "wt", "a", "ab", "at", "x", "xb", "xt"); -$filename = dirname(__FILE__)."/fgetc_variation3.tmp"; +$filename = __DIR__."/fgetc_variation3.tmp"; foreach ($file_modes as $file_mode ) { echo "-- File opened in mode : $file_mode --\n"; diff --git a/ext/standard/tests/file/fgetc_variation4.phpt b/ext/standard/tests/file/fgetc_variation4.phpt index 1a61108f41..99af3c80af 100644 --- a/ext/standard/tests/file/fgetc_variation4.phpt +++ b/ext/standard/tests/file/fgetc_variation4.phpt @@ -17,7 +17,7 @@ $file_modes = array( "a+", "a+b", "a+t", "x+", "x+b", "x+t", "w+", "w+b", "w+t" ); -$filename = dirname(__FILE__)."/fgetc_variation4.tmp"; +$filename = __DIR__."/fgetc_variation4.tmp"; foreach ($file_modes as $file_mode ) { echo "-- File opened in mode : $file_mode --\n"; diff --git a/ext/standard/tests/file/fgetcsv.phpt b/ext/standard/tests/file/fgetcsv.phpt index 868212c033..45be06ba0b 100644 --- a/ext/standard/tests/file/fgetcsv.phpt +++ b/ext/standard/tests/file/fgetcsv.phpt @@ -25,7 +25,7 @@ various fgetcsv() functionality tests 'aaa"\\"a","bbb"' ); - $file = dirname(__FILE__) . 'fgetcsv.csv'; + $file = __DIR__ . 'fgetcsv.csv'; @unlink($file); foreach ($list as $v) { $fp = fopen($file, "w"); diff --git a/ext/standard/tests/file/fgetcsv_variation1.phpt b/ext/standard/tests/file/fgetcsv_variation1.phpt index 5fc8108a62..e0569288fc 100644 --- a/ext/standard/tests/file/fgetcsv_variation1.phpt +++ b/ext/standard/tests/file/fgetcsv_variation1.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation1.tmp'; +$filename = __DIR__ . '/fgetcsv_variation1.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation10.phpt b/ext/standard/tests/file/fgetcsv_variation10.phpt index 41388fb00c..ee173b8cd6 100644 --- a/ext/standard/tests/file/fgetcsv_variation10.phpt +++ b/ext/standard/tests/file/fgetcsv_variation10.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation10.tmp'; +$filename = __DIR__ . '/fgetcsv_variation10.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation11.phpt b/ext/standard/tests/file/fgetcsv_variation11.phpt index ed15ae3e83..25815a0174 100644 --- a/ext/standard/tests/file/fgetcsv_variation11.phpt +++ b/ext/standard/tests/file/fgetcsv_variation11.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation11.tmp'; +$filename = __DIR__ . '/fgetcsv_variation11.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation12.phpt b/ext/standard/tests/file/fgetcsv_variation12.phpt index 6ae6ae61b1..4989f5f8e7 100644 --- a/ext/standard/tests/file/fgetcsv_variation12.phpt +++ b/ext/standard/tests/file/fgetcsv_variation12.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation12.tmp'; +$filename = __DIR__ . '/fgetcsv_variation12.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation13.phpt b/ext/standard/tests/file/fgetcsv_variation13.phpt index 97edcab1c8..f1ca0a6ab0 100644 --- a/ext/standard/tests/file/fgetcsv_variation13.phpt +++ b/ext/standard/tests/file/fgetcsv_variation13.phpt @@ -12,7 +12,7 @@ Test fgetcsv() : usage variations - with line without any csv fields echo "*** Testing fgetcsv() : reading the line which is without csv fields ***\n"; -$filename = dirname(__FILE__) . '/fgetcsv_variation13.tmp'; +$filename = __DIR__ . '/fgetcsv_variation13.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation14.phpt b/ext/standard/tests/file/fgetcsv_variation14.phpt index 44eb066e9c..a8486e56a8 100644 --- a/ext/standard/tests/file/fgetcsv_variation14.phpt +++ b/ext/standard/tests/file/fgetcsv_variation14.phpt @@ -12,7 +12,7 @@ Test fgetcsv() : usage variations - reading the blank line echo "*** Testing fgetcsv() : reading the blank line ***\n"; -$filename = dirname(__FILE__) . '/fgetcsv_variation14.tmp'; +$filename = __DIR__ . '/fgetcsv_variation14.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation15.phpt b/ext/standard/tests/file/fgetcsv_variation15.phpt index 212f197745..6e1c71438b 100644 --- a/ext/standard/tests/file/fgetcsv_variation15.phpt +++ b/ext/standard/tests/file/fgetcsv_variation15.phpt @@ -22,7 +22,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation15.tmp'; +$filename = __DIR__ . '/fgetcsv_variation15.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation16.phpt b/ext/standard/tests/file/fgetcsv_variation16.phpt index 4768cf2770..3e83ca46bb 100644 --- a/ext/standard/tests/file/fgetcsv_variation16.phpt +++ b/ext/standard/tests/file/fgetcsv_variation16.phpt @@ -24,7 +24,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation16.tmp'; +$filename = __DIR__ . '/fgetcsv_variation16.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation17.phpt b/ext/standard/tests/file/fgetcsv_variation17.phpt index 75cb1c5ced..1dffb6c2be 100644 --- a/ext/standard/tests/file/fgetcsv_variation17.phpt +++ b/ext/standard/tests/file/fgetcsv_variation17.phpt @@ -24,7 +24,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation17.tmp'; +$filename = __DIR__ . '/fgetcsv_variation17.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation18.phpt b/ext/standard/tests/file/fgetcsv_variation18.phpt index a5889ee77d..022a46075d 100644 --- a/ext/standard/tests/file/fgetcsv_variation18.phpt +++ b/ext/standard/tests/file/fgetcsv_variation18.phpt @@ -24,7 +24,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation18.tmp'; +$filename = __DIR__ . '/fgetcsv_variation18.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation19.phpt b/ext/standard/tests/file/fgetcsv_variation19.phpt index 5200b5e8e1..0f40f25266 100644 --- a/ext/standard/tests/file/fgetcsv_variation19.phpt +++ b/ext/standard/tests/file/fgetcsv_variation19.phpt @@ -25,7 +25,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation19.tmp'; +$filename = __DIR__ . '/fgetcsv_variation19.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation2.phpt b/ext/standard/tests/file/fgetcsv_variation2.phpt index 40fb910cf9..f235186d3a 100644 --- a/ext/standard/tests/file/fgetcsv_variation2.phpt +++ b/ext/standard/tests/file/fgetcsv_variation2.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation2.tmp'; +$filename = __DIR__ . '/fgetcsv_variation2.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation20.phpt b/ext/standard/tests/file/fgetcsv_variation20.phpt index 529fc89957..dce4c82c59 100644 --- a/ext/standard/tests/file/fgetcsv_variation20.phpt +++ b/ext/standard/tests/file/fgetcsv_variation20.phpt @@ -14,7 +14,7 @@ Test fgetcsv() : usage variations - with default enclosure, line without any csv echo "*** Testing fgetcsv() : with default enclosure, line without any csv fields ***\n"; -$filename = dirname(__FILE__) . '/fgetcsv_variation20.tmp'; +$filename = __DIR__ . '/fgetcsv_variation20.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation21.phpt b/ext/standard/tests/file/fgetcsv_variation21.phpt index 6acbbf4f88..91503ff487 100644 --- a/ext/standard/tests/file/fgetcsv_variation21.phpt +++ b/ext/standard/tests/file/fgetcsv_variation21.phpt @@ -14,7 +14,7 @@ Test fgetcsv() : usage variations - with default enclosure, blank line echo "*** Testing fgetcsv() : with default enclosure, blank line ***\n"; -$filename = dirname(__FILE__) . '/fgetcsv_variation21.tmp'; +$filename = __DIR__ . '/fgetcsv_variation21.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation22.phpt b/ext/standard/tests/file/fgetcsv_variation22.phpt index ed4e129eb5..14d808ab87 100644 --- a/ext/standard/tests/file/fgetcsv_variation22.phpt +++ b/ext/standard/tests/file/fgetcsv_variation22.phpt @@ -25,7 +25,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation22.tmp'; +$filename = __DIR__ . '/fgetcsv_variation22.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation23.phpt b/ext/standard/tests/file/fgetcsv_variation23.phpt index a9b51f06a5..cb74351fb9 100644 --- a/ext/standard/tests/file/fgetcsv_variation23.phpt +++ b/ext/standard/tests/file/fgetcsv_variation23.phpt @@ -13,7 +13,7 @@ echo "*** Testing fgetcsv() : reading from file which is having zero content *** // try reading from file which is having zero content // create the file and then open in read mode and try reading -$filename = dirname(__FILE__) . '/fgetcsv_variation23.tmp'; +$filename = __DIR__ . '/fgetcsv_variation23.tmp'; $fp = fopen ($filename, "w"); fclose($fp); $fp = fopen ($filename, "r"); diff --git a/ext/standard/tests/file/fgetcsv_variation24.phpt b/ext/standard/tests/file/fgetcsv_variation24.phpt index 154c6f9104..d1e8b7ca80 100644 --- a/ext/standard/tests/file/fgetcsv_variation24.phpt +++ b/ext/standard/tests/file/fgetcsv_variation24.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation24.tmp'; +$filename = __DIR__ . '/fgetcsv_variation24.tmp'; @unlink($filename); $file_modes = array ("w+", "w+b", "w+t", diff --git a/ext/standard/tests/file/fgetcsv_variation25.phpt b/ext/standard/tests/file/fgetcsv_variation25.phpt index 9ba0aa15ed..073248c101 100644 --- a/ext/standard/tests/file/fgetcsv_variation25.phpt +++ b/ext/standard/tests/file/fgetcsv_variation25.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation25.tmp'; +$filename = __DIR__ . '/fgetcsv_variation25.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation26.phpt b/ext/standard/tests/file/fgetcsv_variation26.phpt index 53077f3372..16f080aaf2 100644 --- a/ext/standard/tests/file/fgetcsv_variation26.phpt +++ b/ext/standard/tests/file/fgetcsv_variation26.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation26.tmp'; +$filename = __DIR__ . '/fgetcsv_variation26.tmp'; @unlink($filename); $file_modes = array ("w", "wb", "wt", diff --git a/ext/standard/tests/file/fgetcsv_variation27.phpt b/ext/standard/tests/file/fgetcsv_variation27.phpt index ff10286b4c..484ac89472 100644 --- a/ext/standard/tests/file/fgetcsv_variation27.phpt +++ b/ext/standard/tests/file/fgetcsv_variation27.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation27.tmp'; +$filename = __DIR__ . '/fgetcsv_variation27.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation28.phpt b/ext/standard/tests/file/fgetcsv_variation28.phpt index 4facbcf1ea..95d59dcec4 100644 --- a/ext/standard/tests/file/fgetcsv_variation28.phpt +++ b/ext/standard/tests/file/fgetcsv_variation28.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation28.tmp'; +$filename = __DIR__ . '/fgetcsv_variation28.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation29.phpt b/ext/standard/tests/file/fgetcsv_variation29.phpt index df4ee6c6f5..de9d4b0e5d 100644 --- a/ext/standard/tests/file/fgetcsv_variation29.phpt +++ b/ext/standard/tests/file/fgetcsv_variation29.phpt @@ -25,7 +25,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation29.tmp'; +$filename = __DIR__ . '/fgetcsv_variation29.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation3.phpt b/ext/standard/tests/file/fgetcsv_variation3.phpt index 20507973db..e94f81d56d 100644 --- a/ext/standard/tests/file/fgetcsv_variation3.phpt +++ b/ext/standard/tests/file/fgetcsv_variation3.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation3.tmp'; +$filename = __DIR__ . '/fgetcsv_variation3.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation30.phpt b/ext/standard/tests/file/fgetcsv_variation30.phpt index 2cb570c8dc..120267849e 100644 --- a/ext/standard/tests/file/fgetcsv_variation30.phpt +++ b/ext/standard/tests/file/fgetcsv_variation30.phpt @@ -25,7 +25,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation30.tmp'; +$filename = __DIR__ . '/fgetcsv_variation30.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation31.phpt b/ext/standard/tests/file/fgetcsv_variation31.phpt index d4e3d8a43d..c487d2eb28 100644 --- a/ext/standard/tests/file/fgetcsv_variation31.phpt +++ b/ext/standard/tests/file/fgetcsv_variation31.phpt @@ -25,7 +25,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation31.tmp'; +$filename = __DIR__ . '/fgetcsv_variation31.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation4.phpt b/ext/standard/tests/file/fgetcsv_variation4.phpt index e42163bd98..1f32907b53 100644 --- a/ext/standard/tests/file/fgetcsv_variation4.phpt +++ b/ext/standard/tests/file/fgetcsv_variation4.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation4.tmp'; +$filename = __DIR__ . '/fgetcsv_variation4.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation5.phpt b/ext/standard/tests/file/fgetcsv_variation5.phpt index ff18d6fe13..4c883abf69 100644 --- a/ext/standard/tests/file/fgetcsv_variation5.phpt +++ b/ext/standard/tests/file/fgetcsv_variation5.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation5.tmp'; +$filename = __DIR__ . '/fgetcsv_variation5.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation6.phpt b/ext/standard/tests/file/fgetcsv_variation6.phpt index 95db326598..23bbfffcf8 100644 --- a/ext/standard/tests/file/fgetcsv_variation6.phpt +++ b/ext/standard/tests/file/fgetcsv_variation6.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation6.tmp'; +$filename = __DIR__ . '/fgetcsv_variation6.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation7.phpt b/ext/standard/tests/file/fgetcsv_variation7.phpt index 2854dc766f..b351757c91 100644 --- a/ext/standard/tests/file/fgetcsv_variation7.phpt +++ b/ext/standard/tests/file/fgetcsv_variation7.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation7.tmp'; +$filename = __DIR__ . '/fgetcsv_variation7.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation8.phpt b/ext/standard/tests/file/fgetcsv_variation8.phpt index cd518cb144..073a44e4cc 100644 --- a/ext/standard/tests/file/fgetcsv_variation8.phpt +++ b/ext/standard/tests/file/fgetcsv_variation8.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation8.tmp'; +$filename = __DIR__ . '/fgetcsv_variation8.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation9.phpt b/ext/standard/tests/file/fgetcsv_variation9.phpt index dd0d788f6c..859d0ef002 100644 --- a/ext/standard/tests/file/fgetcsv_variation9.phpt +++ b/ext/standard/tests/file/fgetcsv_variation9.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation9.tmp'; +$filename = __DIR__ . '/fgetcsv_variation9.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgets_basic.phpt b/ext/standard/tests/file/fgets_basic.phpt index a8e8249aa8..9b2cd715cc 100644 --- a/ext/standard/tests/file/fgets_basic.phpt +++ b/ext/standard/tests/file/fgets_basic.phpt @@ -20,8 +20,8 @@ foreach($file_modes as $file_mode) { foreach($file_content_types as $file_content_type) { echo "-- File content type : $file_content_type --\n"; /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 50, "w", "fgets_basic", 1, "bytes"); //create a file - $filename = dirname(__FILE__)."/fgets_basic1.tmp"; // this is name of the file created by create_files() + create_files ( __DIR__, 1, $file_content_type, 0755, 50, "w", "fgets_basic", 1, "bytes"); //create a file + $filename = __DIR__."/fgets_basic1.tmp"; // this is name of the file created by create_files() $file_handle = fopen($filename, $file_mode); if ( !$file_handle ) { echo "Error: failed to open file $filename!"; diff --git a/ext/standard/tests/file/fgets_variation1.phpt b/ext/standard/tests/file/fgets_variation1.phpt index 3e7eba9fb1..b4f7ad5a0e 100644 --- a/ext/standard/tests/file/fgets_variation1.phpt +++ b/ext/standard/tests/file/fgets_variation1.phpt @@ -17,7 +17,7 @@ include ("file.inc"); echo "*** Testing fgets() with file opened in write only mode ***\n"; $file_modes = array("w", "wb", "wt", "a", "ab", "at", "x", "xb", "xt"); -$filename = dirname(__FILE__)."/fgets_variation1.tmp"; +$filename = __DIR__."/fgets_variation1.tmp"; foreach ($file_modes as $file_mode ) { echo "-- File opened in mode : $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation3.phpt b/ext/standard/tests/file/fgets_variation3.phpt index d63ab8c268..ee3f8996ab 100644 --- a/ext/standard/tests/file/fgets_variation3.phpt +++ b/ext/standard/tests/file/fgets_variation3.phpt @@ -18,7 +18,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation3.tmp"; +$filename = __DIR__."/fgets_variation3.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation4-win32-mb.phpt b/ext/standard/tests/file/fgets_variation4-win32-mb.phpt index b5c3eaae8f..629af64ad1 100644 --- a/ext/standard/tests/file/fgets_variation4-win32-mb.phpt +++ b/ext/standard/tests/file/fgets_variation4-win32-mb.phpt @@ -24,7 +24,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation4ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"; +$filename = __DIR__."/fgets_variation4ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation4-win32.phpt b/ext/standard/tests/file/fgets_variation4-win32.phpt index d5b2c5a53d..ed8378d357 100644 --- a/ext/standard/tests/file/fgets_variation4-win32.phpt +++ b/ext/standard/tests/file/fgets_variation4-win32.phpt @@ -24,7 +24,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation4.tmp"; +$filename = __DIR__."/fgets_variation4.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation4.phpt b/ext/standard/tests/file/fgets_variation4.phpt index 3a26dca477..cc29e2a620 100644 --- a/ext/standard/tests/file/fgets_variation4.phpt +++ b/ext/standard/tests/file/fgets_variation4.phpt @@ -24,7 +24,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation4.tmp"; +$filename = __DIR__."/fgets_variation4.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation5.phpt b/ext/standard/tests/file/fgets_variation5.phpt index f474e45a1d..e0eaa9fe5d 100644 --- a/ext/standard/tests/file/fgets_variation5.phpt +++ b/ext/standard/tests/file/fgets_variation5.phpt @@ -18,7 +18,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation5.tmp"; +$filename = __DIR__."/fgets_variation5.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation6-win32.phpt b/ext/standard/tests/file/fgets_variation6-win32.phpt index a402cb1073..aa69e31ec7 100644 --- a/ext/standard/tests/file/fgets_variation6-win32.phpt +++ b/ext/standard/tests/file/fgets_variation6-win32.phpt @@ -24,7 +24,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation4.tmp"; +$filename = __DIR__."/fgets_variation4.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation6.phpt b/ext/standard/tests/file/fgets_variation6.phpt index 23e447db3b..7e7db3e59a 100644 --- a/ext/standard/tests/file/fgets_variation6.phpt +++ b/ext/standard/tests/file/fgets_variation6.phpt @@ -24,7 +24,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation4.tmp"; +$filename = __DIR__."/fgets_variation4.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgetss.phpt b/ext/standard/tests/file/fgetss.phpt index 41ac46dc92..7ca6169762 100644 --- a/ext/standard/tests/file/fgetss.phpt +++ b/ext/standard/tests/file/fgetss.phpt @@ -3,7 +3,7 @@ fgetss() tests --FILE-- <?php -$filename = dirname(__FILE__)."/fgetss.html"; +$filename = __DIR__."/fgetss.html"; $array = array( "askasdfasdf<b>aaaaaa\n</b>dddddd", diff --git a/ext/standard/tests/file/fgetss1.phpt b/ext/standard/tests/file/fgetss1.phpt index 0266371865..55b6adbe6b 100644 --- a/ext/standard/tests/file/fgetss1.phpt +++ b/ext/standard/tests/file/fgetss1.phpt @@ -4,7 +4,7 @@ more fgetss() tests <?php error_reporting(E_ALL & ~E_DEPRECATED); -$filename = dirname(__FILE__)."/fgetss1.html"; +$filename = __DIR__."/fgetss1.html"; $array = array( "askasdfasdf<b>aaaaaa\n</b>dddddd", @@ -34,7 +34,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$filename = dirname(__FILE__)."/fgetss1.html"; +$filename = __DIR__."/fgetss1.html"; unlink($filename); ?> --EXPECT-- diff --git a/ext/standard/tests/file/fgetss_basic1.phpt b/ext/standard/tests/file/fgetss_basic1.phpt index b1e4a89c64..80d1b74f3c 100644 --- a/ext/standard/tests/file/fgetss_basic1.phpt +++ b/ext/standard/tests/file/fgetss_basic1.phpt @@ -34,7 +34,7 @@ for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) { echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n"; /* create an empty file and write the strings with tags */ - $filename = dirname(__FILE__)."/fgetss_basic1.tmp"; + $filename = __DIR__."/fgetss_basic1.tmp"; create_file ($filename); //create an empty file file_put_contents($filename, $string_with_tags); $file_handle = fopen($filename, $file_modes[$mode_counter]); diff --git a/ext/standard/tests/file/fgetss_basic2-win32-mb.phpt b/ext/standard/tests/file/fgetss_basic2-win32-mb.phpt index 41ebf8e1da..68fd7059d0 100644 --- a/ext/standard/tests/file/fgetss_basic2-win32-mb.phpt +++ b/ext/standard/tests/file/fgetss_basic2-win32-mb.phpt @@ -34,7 +34,7 @@ EOT; if(substr(PHP_OS, 0, 3) == "WIN") { $string_with_tags = str_replace("\r",'', $string_with_tags); } -$filename = dirname(__FILE__)."/fgetss_basic2ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"; +$filename = __DIR__."/fgetss_basic2ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/fgetss_basic2-win32.phpt b/ext/standard/tests/file/fgetss_basic2-win32.phpt index ea76bb8a8b..9e9ab50788 100644 --- a/ext/standard/tests/file/fgetss_basic2-win32.phpt +++ b/ext/standard/tests/file/fgetss_basic2-win32.phpt @@ -34,7 +34,7 @@ EOT; if(substr(PHP_OS, 0, 3) == "WIN") { $string_with_tags = str_replace("\r",'', $string_with_tags); } -$filename = dirname(__FILE__)."/fgetss_basic2.tmp"; +$filename = __DIR__."/fgetss_basic2.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/fgetss_basic2.phpt b/ext/standard/tests/file/fgetss_basic2.phpt index d77689d980..887a752435 100644 --- a/ext/standard/tests/file/fgetss_basic2.phpt +++ b/ext/standard/tests/file/fgetss_basic2.phpt @@ -32,7 +32,7 @@ is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg> <html> html </html> <?php echo "php"; ?> EOT; -$filename = dirname(__FILE__)."/fgetss_basic2.tmp"; +$filename = __DIR__."/fgetss_basic2.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/fgetss_variation1-win32.phpt b/ext/standard/tests/file/fgetss_variation1-win32.phpt index b8ad242d9e..54c48e4280 100644 --- a/ext/standard/tests/file/fgetss_variation1-win32.phpt +++ b/ext/standard/tests/file/fgetss_variation1-win32.phpt @@ -42,7 +42,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") { $string_with_tags = str_replace("\r",'', $string_with_tags); } -$filename = dirname(__FILE__)."/fgetss_variation1.tmp"; +$filename = __DIR__."/fgetss_variation1.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w","wb", "wt","a", "ab", "at","x","xb","xt"); diff --git a/ext/standard/tests/file/fgetss_variation1.phpt b/ext/standard/tests/file/fgetss_variation1.phpt index 6166f8468c..391e0ec4af 100644 --- a/ext/standard/tests/file/fgetss_variation1.phpt +++ b/ext/standard/tests/file/fgetss_variation1.phpt @@ -38,7 +38,7 @@ this text contains some html tags <body> body </body> <br> br </br> this is the line with \n character. EOT; -$filename = dirname(__FILE__)."/fgetss_variation1.tmp"; +$filename = __DIR__."/fgetss_variation1.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w","wb", "wt","a", "ab", "at","x","xb","xt"); diff --git a/ext/standard/tests/file/fgetss_variation2.phpt b/ext/standard/tests/file/fgetss_variation2.phpt index 228d476079..7c581793c2 100644 --- a/ext/standard/tests/file/fgetss_variation2.phpt +++ b/ext/standard/tests/file/fgetss_variation2.phpt @@ -29,7 +29,7 @@ this text contains some html tags <body> body </body> <br> br </br> this is the line with \n character. EOT; -$filename = dirname(__FILE__)."/fgetss_variation2.tmp"; +$filename = __DIR__."/fgetss_variation2.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("r","rb", "rt","r+", "r+b", "r+t"); diff --git a/ext/standard/tests/file/fgetss_variation3-win32.phpt b/ext/standard/tests/file/fgetss_variation3-win32.phpt index c1777fc495..f53d76ce27 100644 --- a/ext/standard/tests/file/fgetss_variation3-win32.phpt +++ b/ext/standard/tests/file/fgetss_variation3-win32.phpt @@ -41,7 +41,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") { $string_with_tags = str_replace("\r",'', $string_with_tags); } -$filename = dirname(__FILE__)."/fgetss_variation3.tmp"; +$filename = __DIR__."/fgetss_variation3.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/fgetss_variation3.phpt b/ext/standard/tests/file/fgetss_variation3.phpt index 53a2ac879c..d4120f7fc9 100644 --- a/ext/standard/tests/file/fgetss_variation3.phpt +++ b/ext/standard/tests/file/fgetss_variation3.phpt @@ -37,7 +37,7 @@ this text contains some html tags <body> body </body> <br> br </br> this is the line with \n character. EOT; -$filename = dirname(__FILE__)."/fgetss_variation3.tmp"; +$filename = __DIR__."/fgetss_variation3.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/fgetss_variation4.phpt b/ext/standard/tests/file/fgetss_variation4.phpt index 91470e1d44..585f277e72 100644 --- a/ext/standard/tests/file/fgetss_variation4.phpt +++ b/ext/standard/tests/file/fgetss_variation4.phpt @@ -32,7 +32,7 @@ this text contains some html tags <body> body </body> <br> br </br> this is the line with \n character. EOT; -$filename = dirname(__FILE__)."/fgetss_variation4.tmp"; +$filename = __DIR__."/fgetss_variation4.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("r","rb", "rt","r+", "r+b", "r+t"); diff --git a/ext/standard/tests/file/fgetss_variation5-win32.phpt b/ext/standard/tests/file/fgetss_variation5-win32.phpt index 57f1fd9059..035186fd09 100644 --- a/ext/standard/tests/file/fgetss_variation5-win32.phpt +++ b/ext/standard/tests/file/fgetss_variation5-win32.phpt @@ -39,7 +39,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") { $string_with_tags = str_replace("\r",'', $string_with_tags); } -$filename = dirname(__FILE__)."/fgetss_variation5.tmp"; +$filename = __DIR__."/fgetss_variation5.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/fgetss_variation5.phpt b/ext/standard/tests/file/fgetss_variation5.phpt index e6fc15a98c..928fdeadf5 100644 --- a/ext/standard/tests/file/fgetss_variation5.phpt +++ b/ext/standard/tests/file/fgetss_variation5.phpt @@ -36,7 +36,7 @@ this text contains some html tags <body> body </body> <br> br </br> this is the line with \n character. EOT; -$filename = dirname(__FILE__)."/fgetss_variation5.tmp"; +$filename = __DIR__."/fgetss_variation5.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/file_basic.phpt b/ext/standard/tests/file/file_basic.phpt index 3518968110..f1fb58f621 100644 --- a/ext/standard/tests/file/file_basic.phpt +++ b/ext/standard/tests/file/file_basic.phpt @@ -7,8 +7,8 @@ Test file() function : basic functionality * Description: Reads entire file into an array * Returns the file in an array */ -require(dirname(__FILE__) . '/file.inc'); -$file_path = dirname(__FILE__); +require(__DIR__ . '/file.inc'); +$file_path = __DIR__; echo "*** Testing file() with basic types of files ***\n"; $filetypes = array("numeric", "text", "empty", "text_with_new_line"); diff --git a/ext/standard/tests/file/file_error.phpt b/ext/standard/tests/file/file_error.phpt index 12148189e8..d932966ee5 100644 --- a/ext/standard/tests/file/file_error.phpt +++ b/ext/standard/tests/file/file_error.phpt @@ -7,7 +7,7 @@ Test file() function : error conditions Description: Reads entire file into an array Returns the file in an array */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "\n*** Testing error conditions ***"; $file_handle = fopen($file_path."/file.tmp", "w"); var_dump( file() ); // Zero No. of args @@ -25,7 +25,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/file.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/file_get_contents_basic.phpt b/ext/standard/tests/file/file_get_contents_basic.phpt index 267f86e3f6..7fbca00249 100644 --- a/ext/standard/tests/file/file_get_contents_basic.phpt +++ b/ext/standard/tests/file/file_get_contents_basic.phpt @@ -10,7 +10,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> * Description: Reads entire file into a string */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; include($file_path."/file.inc"); echo "*** Testing the basic functionality of the file_get_contents() function ***\n"; diff --git a/ext/standard/tests/file/file_get_contents_basic001.phpt b/ext/standard/tests/file/file_get_contents_basic001.phpt index 71b69634d2..86569d7917 100644 --- a/ext/standard/tests/file/file_get_contents_basic001.phpt +++ b/ext/standard/tests/file/file_get_contents_basic001.phpt @@ -5,7 +5,7 @@ file_get_contents() test using basic syntax --FILE-- <?php $file_content = "Bienvenue au CodeFest a Montreal"; - $temp_filename = dirname(__FILE__)."/fichier_a_lire.txt"; + $temp_filename = __DIR__."/fichier_a_lire.txt"; $handle = fopen($temp_filename,"w"); fwrite($handle,$file_content); fclose($handle); @@ -14,7 +14,7 @@ file_get_contents() test using basic syntax ?> --CLEAN-- <?php - $temp_filename = dirname(__FILE__)."/fichier_a_lire.txt"; + $temp_filename = __DIR__."/fichier_a_lire.txt"; unlink($temp_filename); ?> --EXPECT-- diff --git a/ext/standard/tests/file/file_get_contents_error.phpt b/ext/standard/tests/file/file_get_contents_error.phpt index f06628f516..d4c6f16529 100644 --- a/ext/standard/tests/file/file_get_contents_error.phpt +++ b/ext/standard/tests/file/file_get_contents_error.phpt @@ -11,7 +11,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> echo "*** Testing error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; include($file_path."/file.inc"); echo "\n-- Testing with Non-existing file --\n"; @@ -37,7 +37,7 @@ echo "\n*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; if(file_exists($file_path."/file_put_contents_error.tmp")) { unlink($file_path."/file_put_contents_error.tmp"); } diff --git a/ext/standard/tests/file/file_get_contents_file_put_contents_basic.phpt b/ext/standard/tests/file/file_get_contents_file_put_contents_basic.phpt index 3d5a688b9b..85f44f2cb7 100644 --- a/ext/standard/tests/file/file_get_contents_file_put_contents_basic.phpt +++ b/ext/standard/tests/file/file_get_contents_file_put_contents_basic.phpt @@ -12,7 +12,7 @@ Test file_put_contents() and file_get_contents() functions : basic functionality * Description: Write a string to a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; include($file_path."/file.inc"); echo "*** Testing the basic functionality of file_put_contents() and file_get_contents() functions ***\n"; @@ -35,7 +35,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/file_put_contents.tmp"); unlink($file_path."/file_put_contents1.tmp"); ?> diff --git a/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt b/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt index b2a09798e3..f34e6ef418 100644 --- a/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt +++ b/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt @@ -13,7 +13,7 @@ Test file-get_contents() and file_put_contents() functions : error conditions echo "*** Testing error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "\n-- Testing with Non-existing file --\n"; print( file_get_contents("/no/such/file/or/dir") ); @@ -38,7 +38,7 @@ echo "\n*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/file_put_contents.tmp"); unlink($file_path."/file_put_contents1.tmp"); diff --git a/ext/standard/tests/file/file_get_contents_file_put_contents_variation1.phpt b/ext/standard/tests/file/file_get_contents_file_put_contents_variation1.phpt index 4a604fa56d..80ddf1f5db 100644 --- a/ext/standard/tests/file/file_get_contents_file_put_contents_variation1.phpt +++ b/ext/standard/tests/file/file_get_contents_file_put_contents_variation1.phpt @@ -12,7 +12,7 @@ Test file_get_contents() and file_put_contents() functions : usage variations - */ /* Testing variation in all argument values */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; include($file_path."/file.inc"); echo "*** Testing with variations in the arguments values ***\n"; @@ -37,7 +37,7 @@ echo "--- Done ---"; <?php //Deleting the temporary file -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/file_put_contents_variation1.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/file_get_contents_file_put_contents_variation2.phpt b/ext/standard/tests/file/file_get_contents_file_put_contents_variation2.phpt index aa67869597..0a35283aeb 100644 --- a/ext/standard/tests/file/file_get_contents_file_put_contents_variation2.phpt +++ b/ext/standard/tests/file/file_get_contents_file_put_contents_variation2.phpt @@ -12,7 +12,7 @@ Test file_get_contents() and file_put_contents() functions : usage variations - */ /* Testing variation using use_include_path argument */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; include($file_path."/file.inc"); echo "*** Testing with variation in use_include_path argument ***\n"; @@ -41,7 +41,7 @@ echo "--- Done ---"; <?php //Deleting the temporary files and directory used in the testcase -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/file_get_contents_variation2/file_get_contents_variation2.tmp"); rmdir($file_path."/file_get_contents_variation2"); ?> diff --git a/ext/standard/tests/file/file_get_contents_variation2.phpt b/ext/standard/tests/file/file_get_contents_variation2.phpt index 12d740c5f0..c1f07d920f 100644 --- a/ext/standard/tests/file/file_get_contents_variation2.phpt +++ b/ext/standard/tests/file/file_get_contents_variation2.phpt @@ -23,7 +23,7 @@ mkdir($thisTestDir); chdir($thisTestDir); $filename = 'FileGetContentsVar2.tmp'; -$scriptLocFile = dirname(__FILE__)."/".$filename; +$scriptLocFile = __DIR__."/".$filename; $newpath = create_include_path(); set_include_path($newpath); diff --git a/ext/standard/tests/file/file_get_contents_variation7-win32-mb.phpt b/ext/standard/tests/file/file_get_contents_variation7-win32-mb.phpt index 27ddea0060..0f2c58a86d 100644 --- a/ext/standard/tests/file/file_get_contents_variation7-win32-mb.phpt +++ b/ext/standard/tests/file/file_get_contents_variation7-win32-mb.phpt @@ -18,13 +18,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing file_get_contents() : variation ***\n"; $mainDir = "fileGetContentsVar7ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.dir"; $subDir = "fileGetContentsVar7Subç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/file_get_contents_variation7-win32.phpt b/ext/standard/tests/file/file_get_contents_variation7-win32.phpt index 4f1dfac57b..8e9f34520a 100644 --- a/ext/standard/tests/file/file_get_contents_variation7-win32.phpt +++ b/ext/standard/tests/file/file_get_contents_variation7-win32.phpt @@ -18,13 +18,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing file_get_contents() : variation ***\n"; $mainDir = "fileGetContentsVar7.dir"; $subDir = "fileGetContentsVar7Sub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/file_get_contents_variation7.phpt b/ext/standard/tests/file/file_get_contents_variation7.phpt index 0fb662b0a8..e2d317a4a0 100644 --- a/ext/standard/tests/file/file_get_contents_variation7.phpt +++ b/ext/standard/tests/file/file_get_contents_variation7.phpt @@ -13,13 +13,13 @@ Dave Kelsey <d_kelsey@uk.ibm.com> echo "*** Testing file_get_contents() : variation ***\n"; $mainDir = "fileGetContentsVar7.dir"; $subDir = "fileGetContentsVar7Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $allDirs = array( // absolute paths diff --git a/ext/standard/tests/file/file_get_contents_variation9.phpt b/ext/standard/tests/file/file_get_contents_variation9.phpt index 74e2cb4a6e..c5bd75f331 100644 --- a/ext/standard/tests/file/file_get_contents_variation9.phpt +++ b/ext/standard/tests/file/file_get_contents_variation9.phpt @@ -16,10 +16,10 @@ if(substr(PHP_OS, 0, 3) == "WIN") */ echo "*** Testing file_get_contents() : variation ***\n"; -$filename = dirname(__FILE__).'/fileGetContentsVar9.tmp'; -$softlink = dirname(__FILE__).'/fileGetContentsVar9.SoftLink'; -$hardlink = dirname(__FILE__).'/fileGetContentsVar9.HardLink'; -$chainlink = dirname(__FILE__).'/fileGetContentsVar9.ChainLink'; +$filename = __DIR__.'/fileGetContentsVar9.tmp'; +$softlink = __DIR__.'/fileGetContentsVar9.SoftLink'; +$hardlink = __DIR__.'/fileGetContentsVar9.HardLink'; +$chainlink = __DIR__.'/fileGetContentsVar9.ChainLink'; // create file $h = fopen($filename,"w"); diff --git a/ext/standard/tests/file/file_put_contents.phpt b/ext/standard/tests/file/file_put_contents.phpt index 1607ab1bde..be2a6ca0ac 100644 --- a/ext/standard/tests/file/file_put_contents.phpt +++ b/ext/standard/tests/file/file_put_contents.phpt @@ -7,7 +7,7 @@ class foo { return __METHOD__; } } -$file = dirname(__FILE__)."/file_put_contents.txt"; +$file = __DIR__."/file_put_contents.txt"; $context = stream_context_create(); diff --git a/ext/standard/tests/file/file_put_contents_variation5.phpt b/ext/standard/tests/file/file_put_contents_variation5.phpt index fed872f8a3..c069c35a7e 100644 --- a/ext/standard/tests/file/file_put_contents_variation5.phpt +++ b/ext/standard/tests/file/file_put_contents_variation5.phpt @@ -6,12 +6,12 @@ Dave Kelsey <d_kelsey@uk.ibm.com> <?php -$thisTestDir = dirname(__FILE__) . '/' .basename(__FILE__, ".php") . ".directory"; +$thisTestDir = __DIR__ . '/' .basename(__FILE__, ".php") . ".directory"; mkdir($thisTestDir); chdir($thisTestDir); $filename = basename(__FILE__, ".php") . ".tmp"; -$scriptLocFile = dirname(__FILE__)."/".$filename; +$scriptLocFile = __DIR__."/".$filename; $newpath = "rubbish"; set_include_path($newpath); @@ -24,7 +24,7 @@ runtest(); set_include_path(";; ; ;c:\\rubbish"); runtest(); -chdir(dirname(__FILE__)); +chdir(__DIR__); rmdir($thisTestDir); diff --git a/ext/standard/tests/file/file_put_contents_variation7-win32.phpt b/ext/standard/tests/file/file_put_contents_variation7-win32.phpt index d4ee0585fd..138b4ede84 100644 --- a/ext/standard/tests/file/file_put_contents_variation7-win32.phpt +++ b/ext/standard/tests/file/file_put_contents_variation7-win32.phpt @@ -19,13 +19,13 @@ echo "*** Testing file_put_contents() : usage variation ***\n"; $mainDir = "filePutContentsVar7.dir"; $subDir = "filePutContentsVar7Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); diff --git a/ext/standard/tests/file/file_put_contents_variation7.phpt b/ext/standard/tests/file/file_put_contents_variation7.phpt index 94cfa627d3..561c78b374 100644 --- a/ext/standard/tests/file/file_put_contents_variation7.phpt +++ b/ext/standard/tests/file/file_put_contents_variation7.phpt @@ -14,13 +14,13 @@ echo "*** Testing file_put_contents() : usage variation ***\n"; $mainDir = "filePutContentsVar7.dir"; $subDir = "filePutContentsVar7Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); // Note invalid dirs in p8 result in (The system cannot find the path specified.) diff --git a/ext/standard/tests/file/file_put_contents_variation9.phpt b/ext/standard/tests/file/file_put_contents_variation9.phpt index 64a5a67e33..554ce344e7 100644 --- a/ext/standard/tests/file/file_put_contents_variation9.phpt +++ b/ext/standard/tests/file/file_put_contents_variation9.phpt @@ -17,10 +17,10 @@ if(substr(PHP_OS, 0, 3) == "WIN") echo "*** Testing file_put_contents() : usage variation ***\n"; -$filename = dirname(__FILE__).'/filePutContentsVar9.tmp'; -$softlink = dirname(__FILE__).'/filePutContentsVar9.SoftLink'; -$hardlink = dirname(__FILE__).'/filePutContentsVar9.HardLink'; -$chainlink = dirname(__FILE__).'/filePutContentsVar9.ChainLink'; +$filename = __DIR__.'/filePutContentsVar9.tmp'; +$softlink = __DIR__.'/filePutContentsVar9.SoftLink'; +$hardlink = __DIR__.'/filePutContentsVar9.HardLink'; +$chainlink = __DIR__.'/filePutContentsVar9.ChainLink'; // link files even though it original file doesn't exist yet diff --git a/ext/standard/tests/file/file_variation.phpt b/ext/standard/tests/file/file_variation.phpt index bd4366b945..c430845335 100644 --- a/ext/standard/tests/file/file_variation.phpt +++ b/ext/standard/tests/file/file_variation.phpt @@ -7,12 +7,12 @@ Test file() function : usage variations * Description: Reads entire file into an array Returns the file in an array */ -require(dirname(__FILE__) . '/file.inc'); +require(__DIR__ . '/file.inc'); $data_array = array( "Garbage data", "Gar\nba\nge d\nata", "Gar\n\nbage \n\n data" ); echo "*** Using various flags values with different data in a file\n"; $count=1; -$file_path = dirname(__FILE__); +$file_path = __DIR__; foreach( $data_array as $data ) { echo "--Iteration $count --\n"; $fh = fopen($file_path."/file_variation.tmp", "w"); @@ -24,7 +24,7 @@ foreach( $data_array as $data ) { } echo "*** Testing with variation in use_include_path argument ***\n"; -$file_path1 = dirname(__FILE__)."/file_variation"; +$file_path1 = __DIR__."/file_variation"; mkdir($file_path1); ini_set( 'include_path',$file_path.'/file_variation' ); @@ -55,7 +55,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/file_variation.tmp"); unlink($file_path."/file_variation/file1_variation.tmp"); unlink($file_path."/file2_variation.tmp"); diff --git a/ext/standard/tests/file/file_variation5-win32-mb.phpt b/ext/standard/tests/file/file_variation5-win32-mb.phpt index 783efd6624..ff7c5648db 100644 --- a/ext/standard/tests/file/file_variation5-win32-mb.phpt +++ b/ext/standard/tests/file/file_variation5-win32-mb.phpt @@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { --FILE-- <?php -$script_directory = dirname(__FILE__); +$script_directory = __DIR__; chdir($script_directory); $test_dirname = basename(__FILE__, ".php") . "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™testdir"; mkdir($test_dirname); diff --git a/ext/standard/tests/file/file_variation5-win32.phpt b/ext/standard/tests/file/file_variation5-win32.phpt index d6390db6dd..f31f3c769a 100644 --- a/ext/standard/tests/file/file_variation5-win32.phpt +++ b/ext/standard/tests/file/file_variation5-win32.phpt @@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { --FILE-- <?php -$script_directory = dirname(__FILE__); +$script_directory = __DIR__; chdir($script_directory); $test_dirname = basename(__FILE__, ".php") . "testdir"; mkdir($test_dirname); diff --git a/ext/standard/tests/file/file_variation5.phpt b/ext/standard/tests/file/file_variation5.phpt index b8badd0e42..7f012b7d43 100644 --- a/ext/standard/tests/file/file_variation5.phpt +++ b/ext/standard/tests/file/file_variation5.phpt @@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- <?php -$script_directory = dirname(__FILE__); +$script_directory = __DIR__; chdir($script_directory); $test_dirname = basename(__FILE__, ".php") . "testdir"; mkdir($test_dirname); diff --git a/ext/standard/tests/file/file_variation8-win32.phpt b/ext/standard/tests/file/file_variation8-win32.phpt index f80ae0eeac..b5a2004473 100644 --- a/ext/standard/tests/file/file_variation8-win32.phpt +++ b/ext/standard/tests/file/file_variation8-win32.phpt @@ -18,13 +18,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing file() : variation ***\n"; $mainDir = "fileVar8.dir"; $subDir = "fileVar8Sub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/file_variation8.phpt b/ext/standard/tests/file/file_variation8.phpt index 49ab92a41c..f56ca9af7d 100644 --- a/ext/standard/tests/file/file_variation8.phpt +++ b/ext/standard/tests/file/file_variation8.phpt @@ -13,13 +13,13 @@ Dave Kelsey <d_kelsey@uk.ibm.com> echo "*** Testing file() : variation ***\n"; $mainDir = "fileVar8.dir"; $subDir = "fileVar8Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $allDirs = array( // absolute paths diff --git a/ext/standard/tests/file/file_variation9.phpt b/ext/standard/tests/file/file_variation9.phpt index dca79ff7b2..13860878d9 100644 --- a/ext/standard/tests/file/file_variation9.phpt +++ b/ext/standard/tests/file/file_variation9.phpt @@ -11,7 +11,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> */ echo "*** Testing file() : variation ***\n"; -$testfile = dirname(__FILE__)."/fileVar9.txt"; +$testfile = __DIR__."/fileVar9.txt"; $contents = array( "File ends on a single character\na", diff --git a/ext/standard/tests/file/filegroup_basic.phpt b/ext/standard/tests/file/filegroup_basic.phpt index 5defbbb2e9..ff546501ed 100644 --- a/ext/standard/tests/file/filegroup_basic.phpt +++ b/ext/standard/tests/file/filegroup_basic.phpt @@ -16,7 +16,7 @@ echo "*** Testing filegroup(): basic functionality ***\n"; echo "-- Testing with the file or directory created by owner --\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( filegroup(__FILE__) ); var_dump( filegroup(".") ); var_dump( filegroup("./..") ); @@ -44,7 +44,7 @@ echo "\n*** Done ***\n"; --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name = $file_path."/filegroup_basic.tmp"; $dir_name = $file_path."/filegroup_basic"; unlink($file_name); diff --git a/ext/standard/tests/file/filegroup_variation1.phpt b/ext/standard/tests/file/filegroup_variation1.phpt index a41f5b2382..06c39cfbda 100644 --- a/ext/standard/tests/file/filegroup_variation1.phpt +++ b/ext/standard/tests/file/filegroup_variation1.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Creating soft and hard links to a file and applying filegroup() on links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; fclose( fopen($file_path."/filegroup_variation1.tmp", "w") ); echo "*** Testing filegroup() with links ***\n"; @@ -33,7 +33,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filegroup_variation1_symlink.tmp"); unlink($file_path."/filegroup_variation1_link.tmp"); unlink($file_path."/filegroup_variation1.tmp"); diff --git a/ext/standard/tests/file/filegroup_variation2.phpt b/ext/standard/tests/file/filegroup_variation2.phpt index 809d61ba73..71def66e29 100644 --- a/ext/standard/tests/file/filegroup_variation2.phpt +++ b/ext/standard/tests/file/filegroup_variation2.phpt @@ -10,7 +10,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> /* Testing filegroup() with invalid arguments -int, float, bool, NULL, resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen($file_path."/filegroup_variation2.tmp", "w"); echo "*** Testing Invalid file types ***\n"; @@ -40,7 +40,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filegroup_variation2.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/filegroup_variation3.phpt b/ext/standard/tests/file/filegroup_variation3.phpt index ebefeb7e3f..a43a54da0d 100644 --- a/ext/standard/tests/file/filegroup_variation3.phpt +++ b/ext/standard/tests/file/filegroup_variation3.phpt @@ -10,7 +10,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> /* Passing file names with different notations, using slashes, wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing filegroup() with different notations of file names ***\n"; $dir_name = $file_path."/filegroup_variation3"; @@ -48,7 +48,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/filegroup_variation3"; unlink($dir_name."/filegroup_variation3.tmp"); rmdir($dir_name); diff --git a/ext/standard/tests/file/fileinode_basic.phpt b/ext/standard/tests/file/fileinode_basic.phpt index c7fc77e7d5..dfcabe16bb 100644 --- a/ext/standard/tests/file/fileinode_basic.phpt +++ b/ext/standard/tests/file/fileinode_basic.phpt @@ -10,7 +10,7 @@ Description: Returns the inode number of the file, or FALSE in case of an error. echo "*** Testing fileinode() with file, directory ***\n"; /* Getting inode of created file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; fopen("$file_path/inode.tmp", "w"); print( fileinode("$file_path/inode.tmp") )."\n"; @@ -24,7 +24,7 @@ print( fileinode("./..") )."\n"; echo "\n*** Done ***"; --CLEAN-- <?php -unlink (dirname(__FILE__)."/inode.tmp"); +unlink (__DIR__."/inode.tmp"); ?> --EXPECTF-- *** Testing fileinode() with file, directory *** diff --git a/ext/standard/tests/file/fileinode_variation.phpt b/ext/standard/tests/file/fileinode_variation.phpt index 5f5cec47ed..881aa2ce59 100644 --- a/ext/standard/tests/file/fileinode_variation.phpt +++ b/ext/standard/tests/file/fileinode_variation.phpt @@ -14,7 +14,7 @@ Description: Returns the inode number of the file, or FALSE in case of an error. */ echo "*** Testing fileinode() with files, links and directories ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file1 = $file_path."/fileinode1_variation.tmp"; $file2 = $file_path."/fileinode2_variation.tmp"; $link1 = $file_path."/fileinode1_variation_link.tmp"; diff --git a/ext/standard/tests/file/fileinode_variation1.phpt b/ext/standard/tests/file/fileinode_variation1.phpt index c45bf3a5b2..49cc6a937d 100644 --- a/ext/standard/tests/file/fileinode_variation1.phpt +++ b/ext/standard/tests/file/fileinode_variation1.phpt @@ -16,7 +16,7 @@ Description: Returns the inode number of the file, or FALSE in case of an error. /* Creating soft and hard links to a file and applying fileinode() on links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; fclose( fopen($file_path."/fileinode_variation1.tmp", "w") ); echo "*** Testing fileinode() with links ***\n"; @@ -34,7 +34,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/fileinode_variation1_symlink.tmp"); unlink($file_path."/fileinode_variation1_link.tmp"); unlink($file_path."/fileinode_variation1.tmp"); diff --git a/ext/standard/tests/file/fileinode_variation2.phpt b/ext/standard/tests/file/fileinode_variation2.phpt index 90c7eb19e3..3ccfc76476 100644 --- a/ext/standard/tests/file/fileinode_variation2.phpt +++ b/ext/standard/tests/file/fileinode_variation2.phpt @@ -11,7 +11,7 @@ Description: Returns the inode number of the file, or FALSE in case of an error. /* Testing fileinode() with invalid arguments -int, float, bool, NULL, resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen($file_path."/fileinode_variation2.tmp", "w"); echo "*** Testing Invalid file types ***\n"; @@ -41,7 +41,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/fileinode_variation2.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fileinode_variation3.phpt b/ext/standard/tests/file/fileinode_variation3.phpt index 2f51e8f595..72dfcbdc55 100644 --- a/ext/standard/tests/file/fileinode_variation3.phpt +++ b/ext/standard/tests/file/fileinode_variation3.phpt @@ -11,7 +11,7 @@ Description: Returns the inode number of the file, or FALSE in case of an error. /* Passing file names with different notations, using slashes, wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing fileinode() with different notations of file names ***\n"; $dir_name = $file_path."/fileinode_variation3"; @@ -49,7 +49,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/fileinode_variation3"; unlink($dir_name."/fileinode_variation3.tmp"); rmdir($dir_name); diff --git a/ext/standard/tests/file/fileowner_basic.phpt b/ext/standard/tests/file/fileowner_basic.phpt index 63ac59680e..9bb0827ec8 100644 --- a/ext/standard/tests/file/fileowner_basic.phpt +++ b/ext/standard/tests/file/fileowner_basic.phpt @@ -15,7 +15,7 @@ var_dump( fileowner(".") ); var_dump( fileowner("./..") ); /* Newly created files and dirs */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name = $file_path."/fileowner_basic.tmp"; $file_handle = fopen($file_name, "w"); $string = "Hello, world\n1234\n123Hello"; @@ -31,7 +31,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name = $file_path."/fileowner_basic.tmp"; $dir_name = $file_path."/fileowner_basic"; unlink($file_name); diff --git a/ext/standard/tests/file/fileowner_variation1.phpt b/ext/standard/tests/file/fileowner_variation1.phpt index 75873679ca..03602092e3 100644 --- a/ext/standard/tests/file/fileowner_variation1.phpt +++ b/ext/standard/tests/file/fileowner_variation1.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Creating soft and hard links to a file and applying fileowner() on links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; fclose( fopen($file_path."/fileowner_variation1.tmp", "w") ); echo "*** Testing fileowner() with links ***\n"; @@ -34,7 +34,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/fileowner_variation1_symlink.tmp"); unlink($file_path."/fileowner_variation1_link.tmp"); unlink($file_path."/fileowner_variation1.tmp"); diff --git a/ext/standard/tests/file/fileowner_variation2.phpt b/ext/standard/tests/file/fileowner_variation2.phpt index 131d43bfaa..8a943e549e 100644 --- a/ext/standard/tests/file/fileowner_variation2.phpt +++ b/ext/standard/tests/file/fileowner_variation2.phpt @@ -11,7 +11,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> /* Testing fileowner() with invalid arguments -int, float, bool, NULL, resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen($file_path."/fileowner_variation2.tmp", "w"); echo "*** Testing Invalid file types ***\n"; @@ -41,7 +41,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/fileowner_variation2.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fileowner_variation3.phpt b/ext/standard/tests/file/fileowner_variation3.phpt index 5768f528f1..e5d8852776 100644 --- a/ext/standard/tests/file/fileowner_variation3.phpt +++ b/ext/standard/tests/file/fileowner_variation3.phpt @@ -11,7 +11,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> /* Passing file names with different notations, using slashes, wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing fileowner() with different notations of file names ***\n"; $dir_name = $file_path."/fileowner_variation3"; @@ -49,7 +49,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/fileowner_variation3"; unlink($dir_name."/fileowner_variation3.tmp"); rmdir($dir_name); diff --git a/ext/standard/tests/file/fileperms_variation1.phpt b/ext/standard/tests/file/fileperms_variation1.phpt index 1fd5203e50..b3ea2d5cf6 100644 --- a/ext/standard/tests/file/fileperms_variation1.phpt +++ b/ext/standard/tests/file/fileperms_variation1.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Creating soft and hard links to a file and applying fileperms() on links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; fclose( fopen($file_path."/fileperms_variation1.tmp", "w") ); echo "*** Testing fileperms() with links ***\n"; @@ -33,7 +33,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/fileperms_variation1_symlink.tmp"); unlink($file_path."/fileperms_variation1_link.tmp"); unlink($file_path."/fileperms_variation1.tmp"); diff --git a/ext/standard/tests/file/fileperms_variation2.phpt b/ext/standard/tests/file/fileperms_variation2.phpt index 6b1778e74e..c8d62fd5bd 100644 --- a/ext/standard/tests/file/fileperms_variation2.phpt +++ b/ext/standard/tests/file/fileperms_variation2.phpt @@ -10,7 +10,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> /* Testing fileperms() with invalid arguments -int, float, bool, NULL, resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen($file_path."/fileperms_variation2.tmp", "w"); echo "*** Testing Invalid file types ***\n"; @@ -40,7 +40,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/fileperms_variation2.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fileperms_variation3.phpt b/ext/standard/tests/file/fileperms_variation3.phpt index 6ae97d1601..6a4aacdc6d 100644 --- a/ext/standard/tests/file/fileperms_variation3.phpt +++ b/ext/standard/tests/file/fileperms_variation3.phpt @@ -10,7 +10,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> /* Passing file names with different notations, using slashes, wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing fileperms() with different notations of file names ***\n"; $dir_name = $file_path."/fileperms_variation3"; @@ -48,7 +48,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/fileperms_variation3"; unlink($dir_name."/fileperms_variation3.tmp"); rmdir($dir_name); diff --git a/ext/standard/tests/file/filesize_basic.phpt b/ext/standard/tests/file/filesize_basic.phpt index 9cf0995035..09c3352f62 100644 --- a/ext/standard/tests/file/filesize_basic.phpt +++ b/ext/standard/tests/file/filesize_basic.phpt @@ -11,7 +11,7 @@ Test filesize() function: basic functionaity echo "*** Testing size of files and directories with filesize() ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( filesize(__FILE__) ); var_dump( filesize(".") ); @@ -26,7 +26,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name = $file_path."/filesize_basic.tmp"; unlink($file_name); ?> diff --git a/ext/standard/tests/file/filesize_variation1-win32-mb.phpt b/ext/standard/tests/file/filesize_variation1-win32-mb.phpt index 888fca546b..73d37c9ec3 100644 --- a/ext/standard/tests/file/filesize_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/filesize_variation1-win32-mb.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing filesize(): usage variations ***\n"; diff --git a/ext/standard/tests/file/filesize_variation1-win32.phpt b/ext/standard/tests/file/filesize_variation1-win32.phpt index 30d7475fd8..b312d09fc1 100644 --- a/ext/standard/tests/file/filesize_variation1-win32.phpt +++ b/ext/standard/tests/file/filesize_variation1-win32.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing filesize(): usage variations ***\n"; diff --git a/ext/standard/tests/file/filesize_variation1.phpt b/ext/standard/tests/file/filesize_variation1.phpt index 6ee44159ce..e9a5af86ba 100644 --- a/ext/standard/tests/file/filesize_variation1.phpt +++ b/ext/standard/tests/file/filesize_variation1.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing filesize(): usage variations ***\n"; diff --git a/ext/standard/tests/file/filesize_variation2-win32.phpt b/ext/standard/tests/file/filesize_variation2-win32.phpt index 132ecd7e9f..06cef27bc6 100644 --- a/ext/standard/tests/file/filesize_variation2-win32.phpt +++ b/ext/standard/tests/file/filesize_variation2-win32.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing filesize(): usage variations ***\n"; @@ -59,7 +59,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filesize_variation2/filesize_variation2_sub/filesize_variation2.tmp"); rmdir($file_path."/filesize_variation2/filesize_variation2_sub"); rmdir($file_path."/filesize_variation2"); diff --git a/ext/standard/tests/file/filesize_variation2.phpt b/ext/standard/tests/file/filesize_variation2.phpt index 0379451660..851d2d526a 100644 --- a/ext/standard/tests/file/filesize_variation2.phpt +++ b/ext/standard/tests/file/filesize_variation2.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing filesize(): usage variations ***\n"; @@ -59,7 +59,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filesize_variation2/filesize_variation2_sub/filesize_variation2.tmp"); rmdir($file_path."/filesize_variation2/filesize_variation2_sub"); rmdir($file_path."/filesize_variation2"); diff --git a/ext/standard/tests/file/filesize_variation3-win32.phpt b/ext/standard/tests/file/filesize_variation3-win32.phpt index 215c767616..67b97a8009 100644 --- a/ext/standard/tests/file/filesize_variation3-win32.phpt +++ b/ext/standard/tests/file/filesize_variation3-win32.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing filesize(): usage variations ***\n"; $filename = $file_path."/filesize_variation3.tmp"; @@ -37,7 +37,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filesize_variation3.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/filesize_variation3.phpt b/ext/standard/tests/file/filesize_variation3.phpt index 604887d116..09b9c341ca 100644 --- a/ext/standard/tests/file/filesize_variation3.phpt +++ b/ext/standard/tests/file/filesize_variation3.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing filesize(): usage variations ***\n"; $filename = $file_path."/filesize_variation3.tmp"; @@ -37,7 +37,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filesize_variation3.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/filesize_variation4-win32.phpt b/ext/standard/tests/file/filesize_variation4-win32.phpt index f954401891..89bb869e31 100644 --- a/ext/standard/tests/file/filesize_variation4-win32.phpt +++ b/ext/standard/tests/file/filesize_variation4-win32.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing filesize(): usage variations ***\n"; @@ -71,7 +71,7 @@ var_dump( filesize($filename) ); //0 bytes clearstatcache(); echo "-- with empty file --\n"; -$filename = dirname(__FILE__)."/filesize_variation4_empty.tmp"; +$filename = __DIR__."/filesize_variation4_empty.tmp"; fclose( fopen($filename, "w") ); var_dump( filesize($filename) ); //0 bytes @@ -79,7 +79,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filesize_variation4.tmp"); unlink($file_path."/filesize_variation4_empty.tmp"); ?> diff --git a/ext/standard/tests/file/filesize_variation4.phpt b/ext/standard/tests/file/filesize_variation4.phpt index f0baedb378..4abb64dca6 100644 --- a/ext/standard/tests/file/filesize_variation4.phpt +++ b/ext/standard/tests/file/filesize_variation4.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Testing filesize() with data written using different file modes and by creating holes in file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing filesize(): usage variations ***\n"; echo "\n*** Testing filesize() with data written using different file modes and by creating holes in file ***\n"; @@ -73,7 +73,7 @@ var_dump( filesize($filename) ); //0 bytes clearstatcache(); echo "-- with empty file --\n"; -$filename = dirname(__FILE__)."/filesize_variation4_empty.tmp"; +$filename = __DIR__."/filesize_variation4_empty.tmp"; fclose( fopen($filename, "w") ); var_dump( filesize($filename) ); //0 bytes @@ -81,7 +81,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filesize_variation4.tmp"); unlink($file_path."/filesize_variation4_empty.tmp"); ?> diff --git a/ext/standard/tests/file/filetype_variation.phpt b/ext/standard/tests/file/filetype_variation.phpt index b6b306a37a..019f73a3c8 100644 --- a/ext/standard/tests/file/filetype_variation.phpt +++ b/ext/standard/tests/file/filetype_variation.phpt @@ -18,7 +18,7 @@ Description: Returns the type of the file. Possible values are fifo, char, */ echo "*** Testing filetype() with various types ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file1 = $file_path."/filetype1_variation.tmp"; $file2 = $file_path."/filetype2_variation.tmp"; $file3 = $file_path."/filetype3_variation.tmp"; diff --git a/ext/standard/tests/file/flock.phpt b/ext/standard/tests/file/flock.phpt index 2330270113..43f9112887 100644 --- a/ext/standard/tests/file/flock.phpt +++ b/ext/standard/tests/file/flock.phpt @@ -3,7 +3,7 @@ flock() tests --FILE-- <?php -$file = dirname(__FILE__)."/flock.dat"; +$file = __DIR__."/flock.dat"; var_dump(flock()); var_dump(flock("", "", $var)); @@ -37,7 +37,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file = dirname(__FILE__)."/flock.dat"; +$file = __DIR__."/flock.dat"; unlink($file); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/flock_basic.phpt b/ext/standard/tests/file/flock_basic.phpt index ddfb136f64..97dd98a36c 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"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen("$file_path/lock.tmp", "w"); var_dump(flock($file_handle, LOCK_SH|LOCK_NB)); diff --git a/ext/standard/tests/file/flock_error.phpt b/ext/standard/tests/file/flock_error.phpt index ccb6274756..9f64dd0531 100644 --- a/ext/standard/tests/file/flock_error.phpt +++ b/ext/standard/tests/file/flock_error.phpt @@ -10,7 +10,7 @@ Description: PHP supports a portable way of locking complete files echo "*** Testing error conditions ***\n"; -$file = dirname(__FILE__)."/flock.tmp"; +$file = __DIR__."/flock.tmp"; $fp = fopen($file, "w"); /* array of operatons */ @@ -52,7 +52,7 @@ echo "\n*** Done ***\n"; ?> --CLEAN-- <?php -$file = dirname(__FILE__)."/flock.tmp"; +$file = __DIR__."/flock.tmp"; unlink($file); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/flock_variation.phpt b/ext/standard/tests/file/flock_variation.phpt index 0fd2be4606..1f7880ec0c 100644 --- a/ext/standard/tests/file/flock_variation.phpt +++ b/ext/standard/tests/file/flock_variation.phpt @@ -10,7 +10,7 @@ Description: PHP supports a portable way of locking complete files echo "*** Testing flock() fun with the various operation and wouldblock values ***\n"; -$file = dirname(__FILE__)."/flock.tmp"; +$file = __DIR__."/flock.tmp"; $fp = fopen($file, "w"); /* array of operatons */ diff --git a/ext/standard/tests/file/fnmatch_variation.phpt b/ext/standard/tests/file/fnmatch_variation.phpt index b3607be58b..919e80eec0 100644 --- a/ext/standard/tests/file/fnmatch_variation.phpt +++ b/ext/standard/tests/file/fnmatch_variation.phpt @@ -13,7 +13,7 @@ if (!function_exists('fnmatch')) */ echo "*** Testing fnmatch() with file and various patterns ***\n"; -$file_name = dirname(__FILE__)."/match.tmp"; +$file_name = __DIR__."/match.tmp"; /* avoid using \, it breaks the pattern */ if (substr(PHP_OS, 0, 3) == 'WIN') { diff --git a/ext/standard/tests/file/fopen_unlink.phpt b/ext/standard/tests/file/fopen_unlink.phpt index c069ea1b94..117863b63d 100644 --- a/ext/standard/tests/file/fopen_unlink.phpt +++ b/ext/standard/tests/file/fopen_unlink.phpt @@ -4,7 +4,7 @@ Test fopen() function : check fopen()ed descriptor is usable after the fs object <?php var_dump( - $p = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tututu', + $p = __DIR__ . DIRECTORY_SEPARATOR . 'tututu', $f = fopen($p, 'w+'), unlink($p), file_exists($p), diff --git a/ext/standard/tests/file/fopen_variation10-win32.phpt b/ext/standard/tests/file/fopen_variation10-win32.phpt index 19b2e6507e..300cf52864 100644 --- a/ext/standard/tests/file/fopen_variation10-win32.phpt +++ b/ext/standard/tests/file/fopen_variation10-win32.phpt @@ -23,7 +23,7 @@ if (!is_writable('c:\\fopen_variation10.tmp')) { echo "*** Testing fopen() : variation ***\n"; // fopen with interesting windows paths. -$testdir = dirname(__FILE__).'/fopen10.tmpDir'; +$testdir = __DIR__.'/fopen10.tmpDir'; $rootdir = 'fopen10.tmpdirTwo'; mkdir($testdir); mkdir('c:\\'.$rootdir); diff --git a/ext/standard/tests/file/fopen_variation11-win32.phpt b/ext/standard/tests/file/fopen_variation11-win32.phpt index 8d8d36fe92..ed6508b69a 100644 --- a/ext/standard/tests/file/fopen_variation11-win32.phpt +++ b/ext/standard/tests/file/fopen_variation11-win32.phpt @@ -22,7 +22,7 @@ if (!is_writable('c:\\fopen_variation10.tmp')) { echo "*** Testing fopen() : variation ***\n"; // fopen with interesting windows paths. -$testdir = dirname(__FILE__).'/fopen11.tmpDir'; +$testdir = __DIR__.'/fopen11.tmpDir'; $rootdir = 'fopen11.tmpdirTwo'; mkdir($testdir); mkdir('c:\\'.$rootdir); diff --git a/ext/standard/tests/file/fopen_variation12.phpt b/ext/standard/tests/file/fopen_variation12.phpt index e39ecedf87..91d482276a 100644 --- a/ext/standard/tests/file/fopen_variation12.phpt +++ b/ext/standard/tests/file/fopen_variation12.phpt @@ -33,7 +33,7 @@ function testme() { } - $scriptDirFile = dirname(__FILE__).'/'.$tmpfile; + $scriptDirFile = __DIR__.'/'.$tmpfile; $h = @fopen($scriptDirFile, "r"); if ($h === false) { echo "Not created in script dir\n"; diff --git a/ext/standard/tests/file/fopen_variation5.phpt b/ext/standard/tests/file/fopen_variation5.phpt index b7e4e0a4cb..b5c7edbfbb 100644 --- a/ext/standard/tests/file/fopen_variation5.phpt +++ b/ext/standard/tests/file/fopen_variation5.phpt @@ -19,7 +19,7 @@ chdir($thisTestDir); $workingDir = "workdir"; $filename = basename(__FILE__, ".php") . ".tmp"; -$scriptDir = dirname(__FILE__); +$scriptDir = __DIR__; $baseDir = getcwd(); $secondFile = $baseDir."/dir2/".$filename; $firstFile = "../dir1/".$filename; diff --git a/ext/standard/tests/file/fopen_variation8.phpt b/ext/standard/tests/file/fopen_variation8.phpt index 221b6e62ef..7e02aa8efe 100644 --- a/ext/standard/tests/file/fopen_variation8.phpt +++ b/ext/standard/tests/file/fopen_variation8.phpt @@ -19,7 +19,7 @@ chdir($thisTestDir); //create the include directory structure $workingDir = "workdir"; $filename = basename(__FILE__, ".php") . ".tmp"; -$scriptDir = dirname(__FILE__); +$scriptDir = __DIR__; $baseDir = getcwd(); $secondFile = $baseDir."/dir2/".$filename; $firstFile = "../dir1/".$filename; diff --git a/ext/standard/tests/file/fpassthru_basic.phpt b/ext/standard/tests/file/fpassthru_basic.phpt index 162c6f77ec..9376714368 100644 --- a/ext/standard/tests/file/fpassthru_basic.phpt +++ b/ext/standard/tests/file/fpassthru_basic.phpt @@ -8,7 +8,7 @@ Description: Reads to EOF on the given file pointer from the current position and writes the results to the output buffer. */ -$file_name = dirname(__FILE__)."/passthru.tmp"; +$file_name = __DIR__."/passthru.tmp"; $write_handle = fopen($file_name, "w"); $string = "Hello, world\n, abcdefg\tadsdsfdf\n8u2394723947\t$%$%#$%#$%#^#%^ @@ -60,7 +60,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/passthru.tmp"); +unlink(__DIR__."/passthru.tmp"); ?> --EXPECT-- *** Test basic functionality of fpassthru() function *** diff --git a/ext/standard/tests/file/fpassthru_variation.phpt b/ext/standard/tests/file/fpassthru_variation.phpt index 080549f03b..fb8c56f585 100644 --- a/ext/standard/tests/file/fpassthru_variation.phpt +++ b/ext/standard/tests/file/fpassthru_variation.phpt @@ -12,7 +12,7 @@ echo "*** Testing fpassthru() function with files ***\n\n"; echo "--- Testing with different offsets ---\n"; -$file_name = dirname(__FILE__)."/passthru_variation.tmp"; +$file_name = __DIR__."/passthru_variation.tmp"; $file_write = fopen($file_name, "w"); fwrite($file_write, "1234567890abcdefghijklmnopqrstuvwxyz"); fclose($file_write); diff --git a/ext/standard/tests/file/fputcsv.phpt b/ext/standard/tests/file/fputcsv.phpt index 63c41509bd..2c93096bf9 100644 --- a/ext/standard/tests/file/fputcsv.phpt +++ b/ext/standard/tests/file/fputcsv.phpt @@ -26,7 +26,7 @@ $list = array ( 19 => '"\\""",aaa', ); -$file = dirname(__FILE__) . 'fgetcsv.csv'; +$file = __DIR__ . 'fgetcsv.csv'; @unlink($file); $fp = fopen($file, "w"); diff --git a/ext/standard/tests/file/fputcsv_002.phpt b/ext/standard/tests/file/fputcsv_002.phpt index 24105718d2..db565d5223 100644 --- a/ext/standard/tests/file/fputcsv_002.phpt +++ b/ext/standard/tests/file/fputcsv_002.phpt @@ -3,7 +3,7 @@ fputcsv(): Checking data after calling the function --FILE-- <?php -$file = dirname(__FILE__) .'/fgetcsv-test.csv'; +$file = __DIR__ .'/fgetcsv-test.csv'; $data = array(1, 2, 'foo', 'haha', array(4, 5, 6), 1.3, null); @@ -16,7 +16,7 @@ var_dump($data); ?> --CLEAN-- <?php -$file = dirname(__FILE__) .'/fgetcsv-test.csv'; +$file = __DIR__ .'/fgetcsv-test.csv'; unlink($file); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fputcsv_variation1.phpt b/ext/standard/tests/file/fputcsv_variation1.phpt index 41e6f02998..b66fdcb269 100644 --- a/ext/standard/tests/file/fputcsv_variation1.phpt +++ b/ext/standard/tests/file/fputcsv_variation1.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation1.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation10.phpt b/ext/standard/tests/file/fputcsv_variation10.phpt index 085d72d0a0..23503ee1fa 100644 --- a/ext/standard/tests/file/fputcsv_variation10.phpt +++ b/ext/standard/tests/file/fputcsv_variation10.phpt @@ -22,7 +22,7 @@ $fields = array( array('water_fruit\n'), array("") ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation10.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation11.phpt b/ext/standard/tests/file/fputcsv_variation11.phpt index 07ae930fbd..9c394b54e6 100644 --- a/ext/standard/tests/file/fputcsv_variation11.phpt +++ b/ext/standard/tests/file/fputcsv_variation11.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation11.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation12.phpt b/ext/standard/tests/file/fputcsv_variation12.phpt index dbf4fe9625..cf1ba8126f 100644 --- a/ext/standard/tests/file/fputcsv_variation12.phpt +++ b/ext/standard/tests/file/fputcsv_variation12.phpt @@ -28,7 +28,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation12.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation13.phpt b/ext/standard/tests/file/fputcsv_variation13.phpt index 04b321020c..119398e788 100644 --- a/ext/standard/tests/file/fputcsv_variation13.phpt +++ b/ext/standard/tests/file/fputcsv_variation13.phpt @@ -28,7 +28,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation13.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation14.phpt b/ext/standard/tests/file/fputcsv_variation14.phpt index f7c885dd31..b4454906f5 100644 --- a/ext/standard/tests/file/fputcsv_variation14.phpt +++ b/ext/standard/tests/file/fputcsv_variation14.phpt @@ -28,7 +28,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation14.tmp"; $file_modes = array ("r", "rb", "rt"); diff --git a/ext/standard/tests/file/fputcsv_variation15.phpt b/ext/standard/tests/file/fputcsv_variation15.phpt index dc4a9e2dbd..e7f4c3df5d 100644 --- a/ext/standard/tests/file/fputcsv_variation15.phpt +++ b/ext/standard/tests/file/fputcsv_variation15.phpt @@ -28,7 +28,7 @@ $list = array ( 19 => '"/""",aaa', ); -$file = dirname(__FILE__) . 'fgetcsv.csv'; +$file = __DIR__ . 'fgetcsv.csv'; @unlink($file); $fp = fopen($file, "w"); diff --git a/ext/standard/tests/file/fputcsv_variation2.phpt b/ext/standard/tests/file/fputcsv_variation2.phpt index a486f57367..deb2e82565 100644 --- a/ext/standard/tests/file/fputcsv_variation2.phpt +++ b/ext/standard/tests/file/fputcsv_variation2.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation2.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation3.phpt b/ext/standard/tests/file/fputcsv_variation3.phpt index 0169f715ef..05f29bfc4c 100644 --- a/ext/standard/tests/file/fputcsv_variation3.phpt +++ b/ext/standard/tests/file/fputcsv_variation3.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation3.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation4.phpt b/ext/standard/tests/file/fputcsv_variation4.phpt index 3d24d8502b..0a1a1cb5d7 100644 --- a/ext/standard/tests/file/fputcsv_variation4.phpt +++ b/ext/standard/tests/file/fputcsv_variation4.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation4.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation5.phpt b/ext/standard/tests/file/fputcsv_variation5.phpt index d97cd12582..1a3a37679e 100644 --- a/ext/standard/tests/file/fputcsv_variation5.phpt +++ b/ext/standard/tests/file/fputcsv_variation5.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation5.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation6.phpt b/ext/standard/tests/file/fputcsv_variation6.phpt index ac1d0ce19a..2812f53a0a 100644 --- a/ext/standard/tests/file/fputcsv_variation6.phpt +++ b/ext/standard/tests/file/fputcsv_variation6.phpt @@ -30,7 +30,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation6.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation7.phpt b/ext/standard/tests/file/fputcsv_variation7.phpt index ecd8a6bd54..51100b4e5d 100644 --- a/ext/standard/tests/file/fputcsv_variation7.phpt +++ b/ext/standard/tests/file/fputcsv_variation7.phpt @@ -30,7 +30,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation7.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation8.phpt b/ext/standard/tests/file/fputcsv_variation8.phpt index e234f736f6..15f5de8e84 100644 --- a/ext/standard/tests/file/fputcsv_variation8.phpt +++ b/ext/standard/tests/file/fputcsv_variation8.phpt @@ -30,7 +30,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation8.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation9.phpt b/ext/standard/tests/file/fputcsv_variation9.phpt index ba14c54ba1..db5694b1bf 100644 --- a/ext/standard/tests/file/fputcsv_variation9.phpt +++ b/ext/standard/tests/file/fputcsv_variation9.phpt @@ -28,7 +28,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation9.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fread_basic.phpt b/ext/standard/tests/file/fread_basic.phpt index 5f009f5514..80175ef37f 100644 --- a/ext/standard/tests/file/fread_basic.phpt +++ b/ext/standard/tests/file/fread_basic.phpt @@ -39,8 +39,8 @@ $file_content_types = array("numeric","text","text_with_new_line","alphanumeric" foreach($file_content_types as $file_content_type) { echo "\n-- Testing fread) with file having data of type ". $file_content_type ." --\n"; /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_basic"); - $filename = dirname(__FILE__)."/fread_basic1.tmp"; // this is name of the file created by create_files() + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_basic"); + $filename = __DIR__."/fread_basic1.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fread() on it */ for($inner_loop_counter = 0; diff --git a/ext/standard/tests/file/fread_variation1.phpt b/ext/standard/tests/file/fread_variation1.phpt index 143f3bd123..df9c6da8f5 100644 --- a/ext/standard/tests/file/fread_variation1.phpt +++ b/ext/standard/tests/file/fread_variation1.phpt @@ -63,10 +63,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_variation"); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_variation"); } - $filename = dirname(__FILE__)."/fread_variation1.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/fread_variation1.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fread_variation2.phpt b/ext/standard/tests/file/fread_variation2.phpt index a0c9320854..a3c8efb0b0 100644 --- a/ext/standard/tests/file/fread_variation2.phpt +++ b/ext/standard/tests/file/fread_variation2.phpt @@ -62,10 +62,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_variation", 2); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_variation", 2); } - $filename = dirname(__FILE__)."/fread_variation2.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/fread_variation2.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fread_variation3-win32-mb.phpt b/ext/standard/tests/file/fread_variation3-win32-mb.phpt index a25feef5e7..cbc1b6d60b 100644 --- a/ext/standard/tests/file/fread_variation3-win32-mb.phpt +++ b/ext/standard/tests/file/fread_variation3-win32-mb.phpt @@ -65,10 +65,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™fread_variation", 3); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™fread_variation", 3); } - $filename = dirname(__FILE__)."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™fread_variation3.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™fread_variation3.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fread_variation3-win32.phpt b/ext/standard/tests/file/fread_variation3-win32.phpt index 44d6ebd697..d09917207e 100644 --- a/ext/standard/tests/file/fread_variation3-win32.phpt +++ b/ext/standard/tests/file/fread_variation3-win32.phpt @@ -65,10 +65,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_variation", 3); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_variation", 3); } - $filename = dirname(__FILE__)."/fread_variation3.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/fread_variation3.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fread_variation3.phpt b/ext/standard/tests/file/fread_variation3.phpt index cd03ec2197..b0b374a4c6 100644 --- a/ext/standard/tests/file/fread_variation3.phpt +++ b/ext/standard/tests/file/fread_variation3.phpt @@ -65,10 +65,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_variation", 3); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_variation", 3); } - $filename = dirname(__FILE__)."/fread_variation3.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/fread_variation3.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fread_variation4-win32.phpt b/ext/standard/tests/file/fread_variation4-win32.phpt index 6de3bc571f..94328ac542 100644 --- a/ext/standard/tests/file/fread_variation4-win32.phpt +++ b/ext/standard/tests/file/fread_variation4-win32.phpt @@ -65,10 +65,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_variation", 4); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_variation", 4); } - $filename = dirname(__FILE__)."/fread_variation4.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/fread_variation4.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fread_variation4.phpt b/ext/standard/tests/file/fread_variation4.phpt index a77fc56517..538c441f1f 100644 --- a/ext/standard/tests/file/fread_variation4.phpt +++ b/ext/standard/tests/file/fread_variation4.phpt @@ -65,10 +65,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_variation", 4); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_variation", 4); } - $filename = dirname(__FILE__)."/fread_variation4.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/fread_variation4.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fscanf.phpt b/ext/standard/tests/file/fscanf.phpt index 6d3d0a5b96..7a5a70070e 100644 --- a/ext/standard/tests/file/fscanf.phpt +++ b/ext/standard/tests/file/fscanf.phpt @@ -3,7 +3,7 @@ fscanf() tests --FILE-- <?php -$filename = dirname(__FILE__)."/fscanf.dat"; +$filename = __DIR__."/fscanf.dat"; var_dump(fscanf()); var_dump(fscanf(array())); @@ -60,7 +60,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$filename = dirname(__FILE__)."/fscanf.dat"; +$filename = __DIR__."/fscanf.dat"; unlink($filename); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fscanf_error.phpt b/ext/standard/tests/file/fscanf_error.phpt index db2a881d6c..ea6a91e33d 100644 --- a/ext/standard/tests/file/fscanf_error.phpt +++ b/ext/standard/tests/file/fscanf_error.phpt @@ -8,7 +8,7 @@ Test fscanf() function: error conditions */ echo "*** Testing fscanf() for error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_error.tmp"; $file_handle = fopen($filename, 'w'); @@ -56,7 +56,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_error.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation1.phpt b/ext/standard/tests/file/fscanf_variation1.phpt index d9ccf22192..6463a2700e 100644 --- a/ext/standard/tests/file/fscanf_variation1.phpt +++ b/ext/standard/tests/file/fscanf_variation1.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - return type without third argument /* test fscanf() for its return type */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing fscanf(): for its return type without third argument ***\n"; @@ -34,7 +34,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation1.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation10.phpt b/ext/standard/tests/file/fscanf_variation10.phpt index da3afc3e12..158c6579d9 100644 --- a/ext/standard/tests/file/fscanf_variation10.phpt +++ b/ext/standard/tests/file/fscanf_variation10.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - float formats with resource /* Test fscanf() to scan resource type using different float format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different float format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -74,7 +74,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation10.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation11.phpt b/ext/standard/tests/file/fscanf_variation11.phpt index c6f16ca7fb..97dfa810a2 100644 --- a/ext/standard/tests/file/fscanf_variation11.phpt +++ b/ext/standard/tests/file/fscanf_variation11.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - float formats with arrays /* Test fscanf() to scan arrays using different float format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different float format types with arrays ***\n"; @@ -75,7 +75,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation11.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation12.phpt b/ext/standard/tests/file/fscanf_variation12.phpt index 4848a7e030..a76e5b92a4 100644 --- a/ext/standard/tests/file/fscanf_variation12.phpt +++ b/ext/standard/tests/file/fscanf_variation12.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - float formats with strings /* Test fscanf() to scan strings using different float format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different float format types with strings ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation12.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation13.phpt b/ext/standard/tests/file/fscanf_variation13.phpt index b0d79bc3a8..8f14e97e32 100644 --- a/ext/standard/tests/file/fscanf_variation13.phpt +++ b/ext/standard/tests/file/fscanf_variation13.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - float formats with boolean /* Test fscanf() to scan boolean data using different float format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different float format types with boolean data ***\n"; @@ -62,7 +62,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation13.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation14.phpt b/ext/standard/tests/file/fscanf_variation14.phpt index 7d28d509d1..47caaa3568 100644 --- a/ext/standard/tests/file/fscanf_variation14.phpt +++ b/ext/standard/tests/file/fscanf_variation14.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - string formats with strings /* Test fscanf() to scan different strings using different string format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different string format types with different string ***\n"; @@ -104,7 +104,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation14.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation15.phpt b/ext/standard/tests/file/fscanf_variation15.phpt index 4ca91ac1fc..f16b697896 100644 --- a/ext/standard/tests/file/fscanf_variation15.phpt +++ b/ext/standard/tests/file/fscanf_variation15.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - string formats with float values /* Test fscanf() to scan float values using different string format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different string format types with float values ***\n"; @@ -78,7 +78,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation15.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation16.phpt b/ext/standard/tests/file/fscanf_variation16.phpt index a6a7ba7557..a9fd0cf84d 100644 --- a/ext/standard/tests/file/fscanf_variation16.phpt +++ b/ext/standard/tests/file/fscanf_variation16.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - string formats with resource /* Test fscanf() to scan resource type using different string format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different string format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -73,7 +73,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation16.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation17.phpt b/ext/standard/tests/file/fscanf_variation17.phpt index 3b6051c4e6..4e976c7cb4 100644 --- a/ext/standard/tests/file/fscanf_variation17.phpt +++ b/ext/standard/tests/file/fscanf_variation17.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - string formats with arrays /* Test fscanf() to scan arrays using different string format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different string format types with arrays ***\n"; @@ -74,7 +74,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation17.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation18.phpt b/ext/standard/tests/file/fscanf_variation18.phpt index 6f9fa8099c..3887170b96 100644 --- a/ext/standard/tests/file/fscanf_variation18.phpt +++ b/ext/standard/tests/file/fscanf_variation18.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - string formats with integer values /* Test fscanf() to scan integer values using different string format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different string format types with integer values ***\n"; @@ -82,7 +82,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation18.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation19.phpt b/ext/standard/tests/file/fscanf_variation19.phpt index db4573961a..5558c7786a 100644 --- a/ext/standard/tests/file/fscanf_variation19.phpt +++ b/ext/standard/tests/file/fscanf_variation19.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - string formats with boolean /* Test fscanf() to scan boolean data using different string format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different string format types with boolean data ***\n"; @@ -66,7 +66,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation19.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation2.phpt b/ext/standard/tests/file/fscanf_variation2.phpt index 19b60ab8e2..7ef77a6754 100644 --- a/ext/standard/tests/file/fscanf_variation2.phpt +++ b/ext/standard/tests/file/fscanf_variation2.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - integer formats with integer values /* Test fscanf() to scan different integer values using different interger format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different integer format types with different integer values ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation2.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation20.phpt b/ext/standard/tests/file/fscanf_variation20.phpt index 928cb34d8b..2db263b79f 100644 --- a/ext/standard/tests/file/fscanf_variation20.phpt +++ b/ext/standard/tests/file/fscanf_variation20.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with integer values /* Test fscanf() to scan different integer values using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with different integer values ***\n"; @@ -80,7 +80,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation20.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation21.phpt b/ext/standard/tests/file/fscanf_variation21.phpt index 0e714a2e7a..1275064d6a 100644 --- a/ext/standard/tests/file/fscanf_variation21.phpt +++ b/ext/standard/tests/file/fscanf_variation21.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with float values /* Test fscanf() to scan float values using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with float values ***\n"; @@ -78,7 +78,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation21.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation22.phpt b/ext/standard/tests/file/fscanf_variation22.phpt index 2aecf79bca..adb848a908 100644 --- a/ext/standard/tests/file/fscanf_variation22.phpt +++ b/ext/standard/tests/file/fscanf_variation22.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with resource /* Test fscanf() to scan resource type using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -73,7 +73,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation22.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation23.phpt b/ext/standard/tests/file/fscanf_variation23.phpt index b5702106b6..c1b9ca6580 100644 --- a/ext/standard/tests/file/fscanf_variation23.phpt +++ b/ext/standard/tests/file/fscanf_variation23.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with arrays /* Test fscanf() to scan arrays using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with arrays ***\n"; @@ -74,7 +74,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation23.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation24.phpt b/ext/standard/tests/file/fscanf_variation24.phpt index decbd03306..eb7053587c 100644 --- a/ext/standard/tests/file/fscanf_variation24.phpt +++ b/ext/standard/tests/file/fscanf_variation24.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with strings /* Test fscanf() to scan strings using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with strings ***\n"; @@ -80,7 +80,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation24.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation25.phpt b/ext/standard/tests/file/fscanf_variation25.phpt index 03fb953fe8..41d9bdc009 100644 --- a/ext/standard/tests/file/fscanf_variation25.phpt +++ b/ext/standard/tests/file/fscanf_variation25.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with boolean /* Test fscanf() to scan boolean data using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with boolean data ***\n"; @@ -66,7 +66,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation25.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation26.phpt b/ext/standard/tests/file/fscanf_variation26.phpt index faaed9b2ea..d777e2ce8d 100644 --- a/ext/standard/tests/file/fscanf_variation26.phpt +++ b/ext/standard/tests/file/fscanf_variation26.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with chars /* Test fscanf() to scan different chars using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with chars ***\n"; @@ -61,7 +61,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation26.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation27.phpt b/ext/standard/tests/file/fscanf_variation27.phpt index e4db0b7105..1d81190e9b 100644 --- a/ext/standard/tests/file/fscanf_variation27.phpt +++ b/ext/standard/tests/file/fscanf_variation27.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - octal formats with integer values /* Test fscanf() to scan different integer values using different octal format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different octal format types with different integer values ***\n"; @@ -81,7 +81,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation27.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation28.phpt b/ext/standard/tests/file/fscanf_variation28.phpt index c96377b027..4a791259bc 100644 --- a/ext/standard/tests/file/fscanf_variation28.phpt +++ b/ext/standard/tests/file/fscanf_variation28.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - octal formats with float values /* Test fscanf() to scan float values using different octal format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different octal format types with float values ***\n"; @@ -79,7 +79,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation28.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation29.phpt b/ext/standard/tests/file/fscanf_variation29.phpt index def96aca51..1db4973290 100644 --- a/ext/standard/tests/file/fscanf_variation29.phpt +++ b/ext/standard/tests/file/fscanf_variation29.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - octal formats with resource /* Test fscanf() to scan resource type using different octal format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different octal format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -74,7 +74,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation29.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation3.phpt b/ext/standard/tests/file/fscanf_variation3.phpt index 68d50e97a4..225fb6a0de 100644 --- a/ext/standard/tests/file/fscanf_variation3.phpt +++ b/ext/standard/tests/file/fscanf_variation3.phpt @@ -16,7 +16,7 @@ if (PHP_INT_SIZE != 4) { /* Test fscanf() to scan float values using different integer format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different integer format types with float values ***\n"; @@ -80,7 +80,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation3.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation30.phpt b/ext/standard/tests/file/fscanf_variation30.phpt index 0d0639344f..c01f5aa2e6 100644 --- a/ext/standard/tests/file/fscanf_variation30.phpt +++ b/ext/standard/tests/file/fscanf_variation30.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - octal formats with arrays /* Test fscanf() to scan arrays using different octal format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different octal format types with arrays ***\n"; @@ -75,7 +75,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation30.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation31.phpt b/ext/standard/tests/file/fscanf_variation31.phpt index 335bbcac52..2702fbc535 100644 --- a/ext/standard/tests/file/fscanf_variation31.phpt +++ b/ext/standard/tests/file/fscanf_variation31.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - octal formats with strings /* Test fscanf() to scan strings using different octal format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different octal format types with strings ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation31.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation32.phpt b/ext/standard/tests/file/fscanf_variation32.phpt index b9fb3a286f..36f3f56881 100644 --- a/ext/standard/tests/file/fscanf_variation32.phpt +++ b/ext/standard/tests/file/fscanf_variation32.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - octal formats with boolean /* Test fscanf() to scan boolean data using different octal format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different octal format types with boolean data ***\n"; @@ -67,7 +67,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation32.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation33.phpt b/ext/standard/tests/file/fscanf_variation33.phpt index 75379361e6..a444462a09 100644 --- a/ext/standard/tests/file/fscanf_variation33.phpt +++ b/ext/standard/tests/file/fscanf_variation33.phpt @@ -16,7 +16,7 @@ if (PHP_INT_SIZE != 4) { /* Test fscanf() to scan different integer values using different hexa format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different hexa format types with different integer values ***\n"; @@ -87,7 +87,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation33.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation34.phpt b/ext/standard/tests/file/fscanf_variation34.phpt index 1d5ae68202..a2d1ffdf01 100644 --- a/ext/standard/tests/file/fscanf_variation34.phpt +++ b/ext/standard/tests/file/fscanf_variation34.phpt @@ -16,7 +16,7 @@ if (PHP_INT_SIZE != 4) { /* Test fscanf() to scan float values using different hexa format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different hexa format types with float values ***\n"; @@ -84,7 +84,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation34.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation35.phpt b/ext/standard/tests/file/fscanf_variation35.phpt index 2910e030ff..445280c2fd 100644 --- a/ext/standard/tests/file/fscanf_variation35.phpt +++ b/ext/standard/tests/file/fscanf_variation35.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - hexa formats with resource /* Test fscanf() to scan resource type using different hexa format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different hexa format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -69,7 +69,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation35.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation36.phpt b/ext/standard/tests/file/fscanf_variation36.phpt index 7f52bf5acd..9eb617077d 100644 --- a/ext/standard/tests/file/fscanf_variation36.phpt +++ b/ext/standard/tests/file/fscanf_variation36.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - hexa formats with arrays /* Test fscanf() to scan arrays using different hexa format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different hexa format types with arrays ***\n"; @@ -70,7 +70,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation36.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation37.phpt b/ext/standard/tests/file/fscanf_variation37.phpt index 47481b6dd1..9acdfa489c 100644 --- a/ext/standard/tests/file/fscanf_variation37.phpt +++ b/ext/standard/tests/file/fscanf_variation37.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - hexa formats with strings /* Test fscanf() to scan strings using different hexa format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different hexa format types with strings ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation37.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation38.phpt b/ext/standard/tests/file/fscanf_variation38.phpt index 410fe768c2..eabe5a05b4 100644 --- a/ext/standard/tests/file/fscanf_variation38.phpt +++ b/ext/standard/tests/file/fscanf_variation38.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - hexa formats with boolean /* Test fscanf() to scan boolean data using different hexa format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different hexa format types with boolean data ***\n"; @@ -62,7 +62,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation38.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation39.phpt b/ext/standard/tests/file/fscanf_variation39.phpt index b2eda4ab73..011a714e1c 100644 --- a/ext/standard/tests/file/fscanf_variation39.phpt +++ b/ext/standard/tests/file/fscanf_variation39.phpt @@ -16,7 +16,7 @@ if (PHP_INT_SIZE != 4) { /* Test fscanf() to scan different integer values using different unsigned int format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different unsigned int format types with different integer values ***\n"; @@ -82,7 +82,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation39.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation4.phpt b/ext/standard/tests/file/fscanf_variation4.phpt index 20656d9f56..b802a90da3 100644 --- a/ext/standard/tests/file/fscanf_variation4.phpt +++ b/ext/standard/tests/file/fscanf_variation4.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - integer formats with resource /* Test fscanf() to scan resource type using different integer format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different integer format types with resource ***\n"; @@ -24,7 +24,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -70,7 +70,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation4.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation40.phpt b/ext/standard/tests/file/fscanf_variation40.phpt index 53245e6519..c65aaac9c7 100644 --- a/ext/standard/tests/file/fscanf_variation40.phpt +++ b/ext/standard/tests/file/fscanf_variation40.phpt @@ -16,7 +16,7 @@ if (PHP_INT_SIZE != 4) { /* Test fscanf() to scan float values using different unsigned format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different unsigned format types with float values ***\n"; @@ -80,7 +80,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation40.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation41.phpt b/ext/standard/tests/file/fscanf_variation41.phpt index 62e8de46d7..487954097f 100644 --- a/ext/standard/tests/file/fscanf_variation41.phpt +++ b/ext/standard/tests/file/fscanf_variation41.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - unsigned formats with resource /* Test fscanf() to scan resource type using different unsigned format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different unsigned format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -69,7 +69,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation41.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation42.phpt b/ext/standard/tests/file/fscanf_variation42.phpt index 6f993ae56a..45cf3696b5 100644 --- a/ext/standard/tests/file/fscanf_variation42.phpt +++ b/ext/standard/tests/file/fscanf_variation42.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - unsigned formats with arrays /* Test fscanf() to scan arrays using different unsigned format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different unsigned format types with arrays ***\n"; @@ -70,7 +70,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation42.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation43.phpt b/ext/standard/tests/file/fscanf_variation43.phpt index 4d4197d70f..bc19326e62 100644 --- a/ext/standard/tests/file/fscanf_variation43.phpt +++ b/ext/standard/tests/file/fscanf_variation43.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - unsigned formats with strings /* Test fscanf() to scan strings using different unsigned format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different unsigned format types with strings ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation43.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation44.phpt b/ext/standard/tests/file/fscanf_variation44.phpt index 37ee0274d4..6c61ba9507 100644 --- a/ext/standard/tests/file/fscanf_variation44.phpt +++ b/ext/standard/tests/file/fscanf_variation44.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - unsigned formats with boolean /* Test fscanf() to scan boolean data using different unsigned format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different unsigned format types with boolean data ***\n"; @@ -62,7 +62,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation44.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation45.phpt b/ext/standard/tests/file/fscanf_variation45.phpt index faf4820160..87192cbb7c 100644 --- a/ext/standard/tests/file/fscanf_variation45.phpt +++ b/ext/standard/tests/file/fscanf_variation45.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - scientific formats with integer value /* Test fscanf() to scan different integer values using different scientific format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different scientific format types with different integer values ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation45.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation46.phpt b/ext/standard/tests/file/fscanf_variation46.phpt index 4206e37730..690918bdf1 100644 --- a/ext/standard/tests/file/fscanf_variation46.phpt +++ b/ext/standard/tests/file/fscanf_variation46.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - scientific formats with float values /* Test fscanf() to scan float values using different scientific format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different scientific format types with float values ***\n"; @@ -74,7 +74,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation46.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation47.phpt b/ext/standard/tests/file/fscanf_variation47.phpt index 362f7cbe73..6217b32b61 100644 --- a/ext/standard/tests/file/fscanf_variation47.phpt +++ b/ext/standard/tests/file/fscanf_variation47.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - scientific formats with resource /* Test fscanf() to scan resource type using different scientific format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different scientific format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -69,7 +69,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation47.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation48.phpt b/ext/standard/tests/file/fscanf_variation48.phpt index b2412fa9b8..355d5cf187 100644 --- a/ext/standard/tests/file/fscanf_variation48.phpt +++ b/ext/standard/tests/file/fscanf_variation48.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - scientific formats with arrays /* Test fscanf() to scan arrays using different scientific format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different scientific format types with arrays ***\n"; @@ -70,7 +70,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation48.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation49.phpt b/ext/standard/tests/file/fscanf_variation49.phpt index ba5b77a7b4..5355db9a5a 100644 --- a/ext/standard/tests/file/fscanf_variation49.phpt +++ b/ext/standard/tests/file/fscanf_variation49.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - scientific formats with strings /* Test fscanf() to scan strings using different scientific format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different scientific format types with strings ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation49.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation5.phpt b/ext/standard/tests/file/fscanf_variation5.phpt index 44f59a0a23..714a54b912 100644 --- a/ext/standard/tests/file/fscanf_variation5.phpt +++ b/ext/standard/tests/file/fscanf_variation5.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - integer formats with arrays /* Test fscanf() to scan arrays using different integer format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different integer format types with arrays ***\n"; @@ -70,7 +70,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation5.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation50.phpt b/ext/standard/tests/file/fscanf_variation50.phpt index 9c659d8a2d..4853ba10ca 100644 --- a/ext/standard/tests/file/fscanf_variation50.phpt +++ b/ext/standard/tests/file/fscanf_variation50.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - scientific formats with boolean /* Test fscanf() to scan boolean data using different scientific format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different scientific format types with boolean data ***\n"; @@ -62,7 +62,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation50.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation51.phpt b/ext/standard/tests/file/fscanf_variation51.phpt index 93fd4d545c..d03ba68896 100644 --- a/ext/standard/tests/file/fscanf_variation51.phpt +++ b/ext/standard/tests/file/fscanf_variation51.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - file opened in write only mode /* Test fscanf() to scan a file for read when file is opened inwrite only mode */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): to read from a file opened in write only mode ***\n"; @@ -59,7 +59,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation51.tmp"; if(file_exists($filename)) { unlink($filename); diff --git a/ext/standard/tests/file/fscanf_variation52.phpt b/ext/standard/tests/file/fscanf_variation52.phpt index 92e9cf27d5..522eef0493 100644 --- a/ext/standard/tests/file/fscanf_variation52.phpt +++ b/ext/standard/tests/file/fscanf_variation52.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - empty file /* Test fscanf() to scan an empty file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): to read an empty file ***\n"; @@ -57,7 +57,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation52.tmp"; if(file_exists($filename)) { unlink($filename); diff --git a/ext/standard/tests/file/fscanf_variation53.phpt b/ext/standard/tests/file/fscanf_variation53.phpt index 874385f6b3..5935a8a3cf 100644 --- a/ext/standard/tests/file/fscanf_variation53.phpt +++ b/ext/standard/tests/file/fscanf_variation53.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - file pointer pointing to EOF /* Test fscanf() to read a file when file pointer is pointing to EOF */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): to read a file when file pointer is pointing to EOF ***\n"; @@ -72,7 +72,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation53.tmp"; if(file_exists($filename)) { unlink($filename); diff --git a/ext/standard/tests/file/fscanf_variation54.phpt b/ext/standard/tests/file/fscanf_variation54.phpt index 2d50f32cf0..9833fa2872 100644 --- a/ext/standard/tests/file/fscanf_variation54.phpt +++ b/ext/standard/tests/file/fscanf_variation54.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - objects /* Test fscanf() to scan a file to read objects */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): to read objects from a file ***\n"; @@ -60,7 +60,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation54.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation55.phpt b/ext/standard/tests/file/fscanf_variation55.phpt index 829eba46fa..359359d07f 100644 --- a/ext/standard/tests/file/fscanf_variation55.phpt +++ b/ext/standard/tests/file/fscanf_variation55.phpt @@ -19,7 +19,7 @@ if (PHP_INT_SIZE != 4) { tracking the file pointer movement along with reading */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): tracking file pointer along with reading data from file ***\n"; @@ -90,7 +90,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation55.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation6.phpt b/ext/standard/tests/file/fscanf_variation6.phpt index 71992c327c..f2038cd1c8 100644 --- a/ext/standard/tests/file/fscanf_variation6.phpt +++ b/ext/standard/tests/file/fscanf_variation6.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - integer formats with strings /* Test fscanf() to scan strings using different integer format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different integer format types with strings ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation6.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation7.phpt b/ext/standard/tests/file/fscanf_variation7.phpt index 8f0c5aff97..5be2436607 100644 --- a/ext/standard/tests/file/fscanf_variation7.phpt +++ b/ext/standard/tests/file/fscanf_variation7.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - integer formats with boolean /* Test fscanf() to scan boolean data using different integer format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different integer format types with boolean data ***\n"; @@ -62,7 +62,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation7.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation8.phpt b/ext/standard/tests/file/fscanf_variation8.phpt index adce2e2482..cd7dd35fd9 100644 --- a/ext/standard/tests/file/fscanf_variation8.phpt +++ b/ext/standard/tests/file/fscanf_variation8.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - float formats with float values /* Test fscanf() to scan different float values using different format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different float format types with different float values ***\n"; @@ -94,7 +94,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation8.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation9.phpt b/ext/standard/tests/file/fscanf_variation9.phpt index d1218c8a55..40470db064 100644 --- a/ext/standard/tests/file/fscanf_variation9.phpt +++ b/ext/standard/tests/file/fscanf_variation9.phpt @@ -16,7 +16,7 @@ if (PHP_INT_SIZE != 4) { /* Test fscanf() to scan integer values using different float format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different float format types with integer values ***\n"; @@ -83,7 +83,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation9.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fseek_dir_basic.phpt b/ext/standard/tests/file/fseek_dir_basic.phpt index cde0bf2579..e2f9f5b84c 100644 --- a/ext/standard/tests/file/fseek_dir_basic.phpt +++ b/ext/standard/tests/file/fseek_dir_basic.phpt @@ -4,9 +4,9 @@ Testing fseek() on a directory stream <?php // include the file.inc for Function: function create_files() -require(dirname(__FILE__) . '/file.inc'); +require(__DIR__ . '/file.inc'); -$path = dirname(__FILE__) . '/fseek_dir_basic'; +$path = __DIR__ . '/fseek_dir_basic'; mkdir($path); create_files($path, 3); diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt index 41ce37ccf7..9b2fa584f6 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt @@ -24,7 +24,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $whence_set = array(SEEK_SET,SEEK_CUR,SEEK_END); $whence_string = array("SEEK_SET", "SEEK_CUR", "SEEK_END"); -$filename = dirname(__FILE__)."/fseek_ftell_rewind_basic1.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_basic1.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ echo "\n-- File having data of type ". $file_content_type ." --\n"; @@ -32,7 +32,7 @@ foreach($file_content_types as $file_content_type){ foreach($file_modes as $file_mode) { echo "-- File opened in mode ".$file_mode." --\n"; - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_basic" + create_files ( __DIR__, 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_basic" ,1,"bytes",".tmp"); //create a file with 512 bytes size $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt index 4b88ee0720..2df98b4a8a 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt @@ -31,7 +31,7 @@ $file_content_types = array("text_with_new_line","alphanumeric"); $whence_set = array(SEEK_SET,SEEK_CUR,SEEK_END); $whence_string = array("SEEK_SET", "SEEK_CUR", "SEEK_END"); -$filename = dirname(__FILE__)."/fseek_ftell_rewind_basic2ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_basic2ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"; // this is name of the file created by create_files() foreach($file_content_types as $file_content_type){ echo "\n-- File having data of type ". $file_content_type ." --\n"; diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt index 278f640a6c..2674fb7697 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt @@ -31,7 +31,7 @@ $file_content_types = array("text_with_new_line","alphanumeric"); $whence_set = array(SEEK_SET,SEEK_CUR,SEEK_END); $whence_string = array("SEEK_SET", "SEEK_CUR", "SEEK_END"); -$filename = dirname(__FILE__)."/fseek_ftell_rewind_basic2.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_basic2.tmp"; // this is name of the file created by create_files() foreach($file_content_types as $file_content_type){ echo "\n-- File having data of type ". $file_content_type ." --\n"; diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt index 79bbe5b50f..5b1ca5fea5 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt @@ -31,7 +31,7 @@ $file_content_types = array("text_with_new_line","alphanumeric"); $whence_set = array(SEEK_SET,SEEK_CUR,SEEK_END); $whence_string = array("SEEK_SET", "SEEK_CUR", "SEEK_END"); -$filename = dirname(__FILE__)."/fseek_ftell_rewind_basic2.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_basic2.tmp"; // this is name of the file created by create_files() foreach($file_content_types as $file_content_type){ echo "\n-- File having data of type ". $file_content_type ." --\n"; diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation1.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation1.phpt index 80228bbbec..4eee279fd1 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation1.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation1.phpt @@ -26,7 +26,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 513); // different offsets, including negative and beyond size -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation1.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation1.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ @@ -35,7 +35,7 @@ foreach($file_content_types as $file_content_type){ foreach($file_modes as $file_mode) { echo "-- File opened in mode ".$file_mode." --\n"; - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation" + create_files ( __DIR__, 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation" ,1,"bytes",".tmp"); //create a file with 512 bytes size $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt index 54df01e743..cf962e4676 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt @@ -32,7 +32,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 513); // different offsets, including negative and beyond size -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation2.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation2.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt index bb3f40c220..5d8caf173f 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt @@ -32,7 +32,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 513); // different offsets, including negative and beyond size -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation2.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation2.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation3.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation3.phpt index d6c5951e83..e46f7bc085 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation3.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation3.phpt @@ -28,7 +28,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 512, 600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation3.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation3.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ echo "*** Testing fseek() with whence = SEEK_SET ***\n"; @@ -37,7 +37,7 @@ foreach($file_content_types as $file_content_type){ foreach($file_modes as $file_mode) { echo "-- File opened in mode ".$file_mode." --\n"; - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation", + create_files ( __DIR__, 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation", 3, "bytes", ".tmp"); //create a file with 512 bytes size $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt index dbf579f516..bba1f9bb0c 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt @@ -31,7 +31,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 512, 600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation4.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation4.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt index 946b23e65e..a56d50fab8 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt @@ -31,7 +31,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 512, 600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation4.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation4.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation5.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation5.phpt index 864e7eda49..24a8ba6a46 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation5.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation5.phpt @@ -27,7 +27,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 512, 600);// different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation5.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation5.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ @@ -35,7 +35,7 @@ foreach($file_content_types as $file_content_type){ foreach($file_modes as $file_mode) { echo "-- File opened in mode ".$file_mode." --\n"; - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation" + create_files ( __DIR__, 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation" ,5,"bytes",".tmp"); //create a file with 512 bytes size $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt index 83c6e4dcd6..a4365f0621 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt @@ -32,7 +32,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1,0,1,512,600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation6.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation6.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt index 16aeb39dba..7187738db8 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt @@ -32,7 +32,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1,0,1,512,600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation6.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation6.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation7.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation7.phpt index 3869e35166..449fe44b0d 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation7.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation7.phpt @@ -28,14 +28,14 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1,0,1,512,600);// different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation7.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation7.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ echo "\n-- File having data of type ". $file_content_type ." --\n"; foreach($file_modes as $file_mode) { echo "-- File opened in mode ".$file_mode." --\n"; - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation" + create_files ( __DIR__, 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation" ,7,"bytes",".tmp"); //create a file with 512 bytes size $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt index d54c46f32a..a0a90a4d89 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt @@ -32,7 +32,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1,0,1,512,600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation8.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation8.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt index 28b52da206..82d4359bd3 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt @@ -32,7 +32,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1,0,1,512,600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation8.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation8.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fstat.phpt b/ext/standard/tests/file/fstat.phpt index 94ba9c5abf..415124046e 100644 --- a/ext/standard/tests/file/fstat.phpt +++ b/ext/standard/tests/file/fstat.phpt @@ -3,7 +3,7 @@ fstat() tests --FILE-- <?php -$filename = dirname(__FILE__)."/fstat.dat"; +$filename = __DIR__."/fstat.dat"; $fp = fopen($filename, "w"); var_dump(fstat($fp)); diff --git a/ext/standard/tests/file/ftruncate.phpt b/ext/standard/tests/file/ftruncate.phpt Binary files differindex 67b070c836..3779cf3378 100644 --- a/ext/standard/tests/file/ftruncate.phpt +++ b/ext/standard/tests/file/ftruncate.phpt diff --git a/ext/standard/tests/file/ftruncate_bug76422.phpt b/ext/standard/tests/file/ftruncate_bug76422.phpt index b149f02c64..4f434d324a 100644 --- a/ext/standard/tests/file/ftruncate_bug76422.phpt +++ b/ext/standard/tests/file/ftruncate_bug76422.phpt @@ -9,7 +9,7 @@ if (PHP_INT_SIZE < 8) { --FILE-- <?php -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test76422"; +$fn = __DIR__ . DIRECTORY_SEPARATOR . "test76422"; $file_handle = fopen($fn,'cb'); @@ -29,7 +29,7 @@ var_dump(filesize($fn) >= $truncate_offset); ?> --CLEAN-- <?php -$fn = dirname(__FILE__) . "/test76422"; +$fn = __DIR__ . "/test76422"; unlink($fn); ?> --EXPECT-- diff --git a/ext/standard/tests/file/ftruncate_bug76803.phpt b/ext/standard/tests/file/ftruncate_bug76803.phpt index fe261e8861..df7136f1ca 100644 --- a/ext/standard/tests/file/ftruncate_bug76803.phpt +++ b/ext/standard/tests/file/ftruncate_bug76803.phpt @@ -3,7 +3,7 @@ Bug #76803 ftruncate changes file pointer --FILE-- <?php -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test76803"; +$fn = __DIR__ . DIRECTORY_SEPARATOR . "test76803"; $f = fopen($fn, "w"); fwrite($f, "Hello"); @@ -29,7 +29,7 @@ fclose($f); ?> --CLEAN-- <?php -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test76803"; +$fn = __DIR__ . DIRECTORY_SEPARATOR . "test76803"; unlink($fn); ?> --EXPECT-- diff --git a/ext/standard/tests/file/ftruncate_bug77081.phpt b/ext/standard/tests/file/ftruncate_bug77081.phpt index 7a9aa691fb..b834080227 100644 --- a/ext/standard/tests/file/ftruncate_bug77081.phpt +++ b/ext/standard/tests/file/ftruncate_bug77081.phpt @@ -3,7 +3,7 @@ Bug #77081 ftruncate() changes seek pointer in c mode --FILE-- <?php -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test77081"; +$filename = __DIR__ . DIRECTORY_SEPARATOR . "test77081"; file_put_contents($filename, 'foo'); $stream = fopen($filename, 'c'); @@ -16,7 +16,7 @@ var_dump(file_get_contents($filename)); ?> --CLEAN-- <?php -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test77081"; +$fn = __DIR__ . DIRECTORY_SEPARATOR . "test77081"; unlink($fn); ?> --EXPECT-- diff --git a/ext/standard/tests/file/ftruncate_error.phpt b/ext/standard/tests/file/ftruncate_error.phpt index 3cb6db27f8..61ba1fc509 100644 --- a/ext/standard/tests/file/ftruncate_error.phpt +++ b/ext/standard/tests/file/ftruncate_error.phpt @@ -9,7 +9,7 @@ Test ftruncate() function : error conditions echo "*** Testing ftruncate() : error conditions ***\n"; -$filename = dirname(__FILE__)."/ftruncate_error.tmp"; +$filename = __DIR__."/ftruncate_error.tmp"; $file_handle = fopen($filename, "w" ); fwrite($file_handle, "Testing ftruncate error conditions \n"); fflush($file_handle); @@ -67,7 +67,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$filename = dirname(__FILE__)."/ftruncate_error.tmp"; +$filename = __DIR__."/ftruncate_error.tmp"; unlink( $filename ); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/ftruncate_variation1-win32-mb.phpt b/ext/standard/tests/file/ftruncate_variation1-win32-mb.phpt index abfb8e6888..0cd33d6512 100644 --- a/ext/standard/tests/file/ftruncate_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/ftruncate_variation1-win32-mb.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation1ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™1.tmp"; + $filename = __DIR__."/ftruncate_variation1ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™1.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation1ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation1ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation1-win32.phpt b/ext/standard/tests/file/ftruncate_variation1-win32.phpt index bc512aa5c8..2ce57bff86 100644 --- a/ext/standard/tests/file/ftruncate_variation1-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation1-win32.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation1.tmp"; + $filename = __DIR__."/ftruncate_variation1.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation"); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation"); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation1.phpt b/ext/standard/tests/file/ftruncate_variation1.phpt index 426746de8b..b92d2be7e0 100644 --- a/ext/standard/tests/file/ftruncate_variation1.phpt +++ b/ext/standard/tests/file/ftruncate_variation1.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation1.tmp"; + $filename = __DIR__."/ftruncate_variation1.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation"); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation"); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation2-win32.phpt b/ext/standard/tests/file/ftruncate_variation2-win32.phpt index de7b088320..ac485497fb 100644 --- a/ext/standard/tests/file/ftruncate_variation2-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation2-win32.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation2.tmp"; + $filename = __DIR__."/ftruncate_variation2.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 2); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 2); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation2.phpt b/ext/standard/tests/file/ftruncate_variation2.phpt index ac5a2316cd..f08614d182 100644 --- a/ext/standard/tests/file/ftruncate_variation2.phpt +++ b/ext/standard/tests/file/ftruncate_variation2.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation2.tmp"; + $filename = __DIR__."/ftruncate_variation2.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 2); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 2); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation3-win32.phpt b/ext/standard/tests/file/ftruncate_variation3-win32.phpt index b275d5f462..e89372bb1f 100644 --- a/ext/standard/tests/file/ftruncate_variation3-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation3-win32.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation3.tmp"; + $filename = __DIR__."/ftruncate_variation3.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 3); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 3); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation3.phpt b/ext/standard/tests/file/ftruncate_variation3.phpt index 70ea90d18a..91511fd10a 100644 --- a/ext/standard/tests/file/ftruncate_variation3.phpt +++ b/ext/standard/tests/file/ftruncate_variation3.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation3.tmp"; + $filename = __DIR__."/ftruncate_variation3.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 3); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 3); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation4-win32.phpt b/ext/standard/tests/file/ftruncate_variation4-win32.phpt index 18d5138baf..e2e92269e7 100644 --- a/ext/standard/tests/file/ftruncate_variation4-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation4-win32.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation4.tmp"; + $filename = __DIR__."/ftruncate_variation4.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 4); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 4); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation4.phpt b/ext/standard/tests/file/ftruncate_variation4.phpt index 077b46fd05..3d06d1eb8e 100644 --- a/ext/standard/tests/file/ftruncate_variation4.phpt +++ b/ext/standard/tests/file/ftruncate_variation4.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation4.tmp"; + $filename = __DIR__."/ftruncate_variation4.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 4); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 4); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation5-win32.phpt b/ext/standard/tests/file/ftruncate_variation5-win32.phpt index 9bec15dca3..e796129658 100644 --- a/ext/standard/tests/file/ftruncate_variation5-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation5-win32.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation5.tmp"; + $filename = __DIR__."/ftruncate_variation5.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 5); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 5); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation5.phpt b/ext/standard/tests/file/ftruncate_variation5.phpt index 7df84c9b17..a072d1a7e3 100644 --- a/ext/standard/tests/file/ftruncate_variation5.phpt +++ b/ext/standard/tests/file/ftruncate_variation5.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation5.tmp"; + $filename = __DIR__."/ftruncate_variation5.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 5); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 5); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation6-win32.phpt b/ext/standard/tests/file/ftruncate_variation6-win32.phpt index 6686c80944..710a6ed731 100644 --- a/ext/standard/tests/file/ftruncate_variation6-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation6-win32.phpt @@ -35,13 +35,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation6.tmp"; + $filename = __DIR__."/ftruncate_variation6.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 6); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 6); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation6.phpt b/ext/standard/tests/file/ftruncate_variation6.phpt index a8bce476e0..5e492763ab 100644 --- a/ext/standard/tests/file/ftruncate_variation6.phpt +++ b/ext/standard/tests/file/ftruncate_variation6.phpt @@ -35,13 +35,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation6.tmp"; + $filename = __DIR__."/ftruncate_variation6.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 6); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 6); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation7-win32.phpt b/ext/standard/tests/file/ftruncate_variation7-win32.phpt index cdb77673b7..1d367669cd 100644 --- a/ext/standard/tests/file/ftruncate_variation7-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation7-win32.phpt @@ -34,13 +34,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation7.tmp"; + $filename = __DIR__."/ftruncate_variation7.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 7); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 7); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation7.phpt b/ext/standard/tests/file/ftruncate_variation7.phpt index 38f70cb227..5e8b431bfa 100644 --- a/ext/standard/tests/file/ftruncate_variation7.phpt +++ b/ext/standard/tests/file/ftruncate_variation7.phpt @@ -34,13 +34,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation7.tmp"; + $filename = __DIR__."/ftruncate_variation7.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 7); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 7); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/fwrite.phpt b/ext/standard/tests/file/fwrite.phpt index 443710b99d..0ea130da1e 100644 --- a/ext/standard/tests/file/fwrite.phpt +++ b/ext/standard/tests/file/fwrite.phpt @@ -3,7 +3,7 @@ fwrite() tests --FILE-- <?php -$filename = dirname(__FILE__)."/fwrite.dat"; +$filename = __DIR__."/fwrite.dat"; $fp = fopen($filename, "w"); var_dump(fwrite($fp)); diff --git a/ext/standard/tests/file/fwrite_basic-win32-mb.phpt b/ext/standard/tests/file/fwrite_basic-win32-mb.phpt index fa20f3c870..8dde247c43 100644 --- a/ext/standard/tests/file/fwrite_basic-win32-mb.phpt +++ b/ext/standard/tests/file/fwrite_basic-win32-mb.phpt @@ -29,7 +29,7 @@ $file_content_types = array("numeric","text","text_with_new_line","alphanumeric" foreach($file_content_types as $file_content_type) { echo "\n-- Testing fwrite() with file having data of type ". $file_content_type ." --\n"; - $filename = dirname(__FILE__)."/fwrite_basic-win32ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"; // this is name of the file + $filename = __DIR__."/fwrite_basic-win32ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"; // this is name of the file for($inner_loop_counter = 0; $inner_loop_counter < count($file_modes); diff --git a/ext/standard/tests/file/fwrite_basic-win32.phpt b/ext/standard/tests/file/fwrite_basic-win32.phpt index c922159327..de7754ddad 100644 --- a/ext/standard/tests/file/fwrite_basic-win32.phpt +++ b/ext/standard/tests/file/fwrite_basic-win32.phpt @@ -29,7 +29,7 @@ $file_content_types = array("numeric","text","text_with_new_line","alphanumeric" foreach($file_content_types as $file_content_type) { echo "\n-- Testing fwrite() with file having data of type ". $file_content_type ." --\n"; - $filename = dirname(__FILE__)."/fwrite_basic-win32.tmp"; // this is name of the file + $filename = __DIR__."/fwrite_basic-win32.tmp"; // this is name of the file for($inner_loop_counter = 0; $inner_loop_counter < count($file_modes); diff --git a/ext/standard/tests/file/fwrite_basic.phpt b/ext/standard/tests/file/fwrite_basic.phpt index e41d08c424..07af967a58 100644 --- a/ext/standard/tests/file/fwrite_basic.phpt +++ b/ext/standard/tests/file/fwrite_basic.phpt @@ -29,7 +29,7 @@ $file_content_types = array("numeric","text","text_with_new_line","alphanumeric" foreach($file_content_types as $file_content_type) { echo "\n-- Testing fwrite() with file having data of type ". $file_content_type ." --\n"; - $filename = dirname(__FILE__)."/fwrite_basic.tmp"; // this is name of the file + $filename = __DIR__."/fwrite_basic.tmp"; // this is name of the file for($inner_loop_counter = 0; $inner_loop_counter < count($file_modes); diff --git a/ext/standard/tests/file/fwrite_error.phpt b/ext/standard/tests/file/fwrite_error.phpt index f4f691be35..a54550a6c8 100644 --- a/ext/standard/tests/file/fwrite_error.phpt +++ b/ext/standard/tests/file/fwrite_error.phpt @@ -15,7 +15,7 @@ include ("file.inc"); echo "*** Testing fwrite() : error conditions ***\n"; -$filename = dirname(__FILE__)."/fwrite_error.tmp"; +$filename = __DIR__."/fwrite_error.tmp"; echo "-- Testing fwrite() with less than expected number of arguments --\n"; // zero argument @@ -66,7 +66,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$filename = dirname(__FILE__)."/fwrite_error.tmp"; +$filename = __DIR__."/fwrite_error.tmp"; unlink( $filename ); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fwrite_variation1-win32-mb.phpt b/ext/standard/tests/file/fwrite_variation1-win32-mb.phpt index f368513d10..a472dfb2a8 100644 --- a/ext/standard/tests/file/fwrite_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/fwrite_variation1-win32-mb.phpt @@ -39,8 +39,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create the temp file with content of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation1ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™1.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation1ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"); + $filename = __DIR__."/fwrite_variation1ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™1.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation1ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation1-win32.phpt b/ext/standard/tests/file/fwrite_variation1-win32.phpt index 28559af0c9..ec79b4bd6f 100644 --- a/ext/standard/tests/file/fwrite_variation1-win32.phpt +++ b/ext/standard/tests/file/fwrite_variation1-win32.phpt @@ -39,8 +39,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create the temp file with content of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation1.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation"); + $filename = __DIR__."/fwrite_variation1.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation"); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation1.phpt b/ext/standard/tests/file/fwrite_variation1.phpt index 5e2c0472c7..52f41b5509 100644 --- a/ext/standard/tests/file/fwrite_variation1.phpt +++ b/ext/standard/tests/file/fwrite_variation1.phpt @@ -38,8 +38,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create the temp file with content of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation1.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation"); + $filename = __DIR__."/fwrite_variation1.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation"); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation2-win32.phpt b/ext/standard/tests/file/fwrite_variation2-win32.phpt index f2d67c19fc..aa04e777dc 100644 --- a/ext/standard/tests/file/fwrite_variation2-win32.phpt +++ b/ext/standard/tests/file/fwrite_variation2-win32.phpt @@ -39,8 +39,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create temp file and fill the data of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation2.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 2); + $filename = __DIR__."/fwrite_variation2.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 2); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation2.phpt b/ext/standard/tests/file/fwrite_variation2.phpt index 82061a019c..639231e0f6 100644 --- a/ext/standard/tests/file/fwrite_variation2.phpt +++ b/ext/standard/tests/file/fwrite_variation2.phpt @@ -39,8 +39,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create temp file and fill the data of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation2.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 2); + $filename = __DIR__."/fwrite_variation2.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 2); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation3-win32.phpt b/ext/standard/tests/file/fwrite_variation3-win32.phpt index 3edd3d6a5a..89fb44088d 100644 --- a/ext/standard/tests/file/fwrite_variation3-win32.phpt +++ b/ext/standard/tests/file/fwrite_variation3-win32.phpt @@ -39,8 +39,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create temp file and fill it content of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation3.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 3); + $filename = __DIR__."/fwrite_variation3.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 3); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation3.phpt b/ext/standard/tests/file/fwrite_variation3.phpt index 9d1c16af2b..509b21eb03 100644 --- a/ext/standard/tests/file/fwrite_variation3.phpt +++ b/ext/standard/tests/file/fwrite_variation3.phpt @@ -39,8 +39,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create temp file and fill it content of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation3.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 3); + $filename = __DIR__."/fwrite_variation3.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 3); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation4-win32.phpt b/ext/standard/tests/file/fwrite_variation4-win32.phpt index bf50c4f9c7..094b11776b 100644 --- a/ext/standard/tests/file/fwrite_variation4-win32.phpt +++ b/ext/standard/tests/file/fwrite_variation4-win32.phpt @@ -38,7 +38,7 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { echo "-- Opening file in $file_mode --\n"; - $filename = dirname(__FILE__)."/fwrite_variation4.tmp"; // this is name of the file + $filename = __DIR__."/fwrite_variation4.tmp"; // this is name of the file $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation4.phpt b/ext/standard/tests/file/fwrite_variation4.phpt index 65268afdd4..bbf5602a20 100644 --- a/ext/standard/tests/file/fwrite_variation4.phpt +++ b/ext/standard/tests/file/fwrite_variation4.phpt @@ -38,7 +38,7 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { echo "-- Opening file in $file_mode --\n"; - $filename = dirname(__FILE__)."/fwrite_variation4.tmp"; // this is name of the file + $filename = __DIR__."/fwrite_variation4.tmp"; // this is name of the file $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/glob_basic.phpt b/ext/standard/tests/file/glob_basic.phpt index fc269c442f..b130afc95f 100644 --- a/ext/standard/tests/file/glob_basic.phpt +++ b/ext/standard/tests/file/glob_basic.phpt @@ -8,7 +8,7 @@ Test glob() function: basic functions echo "*** Testing glob() : basic functions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dirname used here $dirname = "$file_path/glob_basic"; @@ -41,7 +41,7 @@ function sort_var_dump($results) { ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/glob_basic/wonder12345"); unlink("$file_path/glob_basic/wonder.txt"); unlink("$file_path/glob_basic/file.text"); diff --git a/ext/standard/tests/file/glob_variation-win32-mb.phpt b/ext/standard/tests/file/glob_variation-win32-mb.phpt index cba2e2b343..fd068b01ad 100644 --- a/ext/standard/tests/file/glob_variation-win32-mb.phpt +++ b/ext/standard/tests/file/glob_variation-win32-mb.phpt @@ -14,7 +14,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing glob() : usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dir created //mkdir("$file_path/glob_variation"); @@ -81,7 +81,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/glob_variationç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/wonder1/wonder2"); rmdir("$file_path/glob_variationç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/wonder1/"); rmdir("$file_path/glob_variationç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/"); diff --git a/ext/standard/tests/file/glob_variation-win32.phpt b/ext/standard/tests/file/glob_variation-win32.phpt index 5027ac03e6..9a1528bb1f 100644 --- a/ext/standard/tests/file/glob_variation-win32.phpt +++ b/ext/standard/tests/file/glob_variation-win32.phpt @@ -14,7 +14,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing glob() : usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dir created mkdir("$file_path/glob_variation"); @@ -80,7 +80,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/glob_variation/wonder1/wonder2"); rmdir("$file_path/glob_variation/wonder1/"); rmdir("$file_path/glob_variation/"); diff --git a/ext/standard/tests/file/glob_variation.phpt b/ext/standard/tests/file/glob_variation.phpt index 9d3b879379..056cf62bec 100644 --- a/ext/standard/tests/file/glob_variation.phpt +++ b/ext/standard/tests/file/glob_variation.phpt @@ -17,7 +17,7 @@ if (!defined('GLOB_BRACE')) { echo "*** Testing glob() : usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dir created mkdir("$file_path/glob_variation"); @@ -83,7 +83,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/glob_variation/wonder1/wonder2"); rmdir("$file_path/glob_variation/wonder1/"); rmdir("$file_path/glob_variation/"); diff --git a/ext/standard/tests/file/glob_variation2.phpt b/ext/standard/tests/file/glob_variation2.phpt index f95fd17e7a..297db00dba 100644 --- a/ext/standard/tests/file/glob_variation2.phpt +++ b/ext/standard/tests/file/glob_variation2.phpt @@ -6,7 +6,7 @@ Test glob() function with relative path Description: Find pathnames matching a pattern */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dirname used here $dir_name = 'glob_test'; @@ -32,7 +32,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/glob_test/file.text"); rmdir("$file_path/glob_test/"); ?> diff --git a/ext/standard/tests/file/glob_variation3.phpt b/ext/standard/tests/file/glob_variation3.phpt index c50f8a81b8..5db242825e 100644 --- a/ext/standard/tests/file/glob_variation3.phpt +++ b/ext/standard/tests/file/glob_variation3.phpt @@ -2,7 +2,7 @@ Test glob() function: ensure no platform difference --FILE-- <?php -$path = dirname(__FILE__); +$path = __DIR__; ini_set('open_basedir', NULL); diff --git a/ext/standard/tests/file/glob_variation4.phpt b/ext/standard/tests/file/glob_variation4.phpt index 00d8f648aa..6544c96944 100644 --- a/ext/standard/tests/file/glob_variation4.phpt +++ b/ext/standard/tests/file/glob_variation4.phpt @@ -2,7 +2,7 @@ Test glob() function: ensure no platform difference, variation 2 --FILE-- <?php -$path = dirname(__FILE__); +$path = __DIR__; ini_set('open_basedir', $path); diff --git a/ext/standard/tests/file/glob_variation5.phpt b/ext/standard/tests/file/glob_variation5.phpt index 10db40099b..800305aabd 100644 --- a/ext/standard/tests/file/glob_variation5.phpt +++ b/ext/standard/tests/file/glob_variation5.phpt @@ -4,7 +4,7 @@ Test glob() function: ensure no platform difference, variation 3 <?php if( substr(PHP_OS, 0, 3) == "WIN" ) {die('skip not valid on Windows');} ?> --FILE-- <?php -$path = dirname(__FILE__); +$path = __DIR__; ini_set('open_basedir', '/tmp'); diff --git a/ext/standard/tests/file/glob_variation6.phpt b/ext/standard/tests/file/glob_variation6.phpt index 9cd9c2b353..e0eaeb8c6e 100644 --- a/ext/standard/tests/file/glob_variation6.phpt +++ b/ext/standard/tests/file/glob_variation6.phpt @@ -4,7 +4,7 @@ Test glob() function: ensure no platform difference, variation 4 <?php if( substr(PHP_OS, 0, 3) != "WIN" ) {die('skip only valid on Windows');} ?> --FILE-- <?php -$path = dirname(__FILE__); +$path = __DIR__; ini_set('open_basedir', 'c:\\windows'); diff --git a/ext/standard/tests/file/is_dir_basic.phpt b/ext/standard/tests/file/is_dir_basic.phpt index 7582a502a7..ceaa34df9b 100644 --- a/ext/standard/tests/file/is_dir_basic.phpt +++ b/ext/standard/tests/file/is_dir_basic.phpt @@ -8,7 +8,7 @@ Test is_dir() function: basic functionality */ echo "*** Testing is_dir(): basic functionality ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( is_dir($file_path) ); clearstatcache(); var_dump( is_dir(".") ); @@ -26,7 +26,7 @@ echo "*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/is_dir_basic"; rmdir($dir_name); ?> diff --git a/ext/standard/tests/file/is_dir_variation1.phpt b/ext/standard/tests/file/is_dir_variation1.phpt index 96bafacfda..90084f32e9 100644 --- a/ext/standard/tests/file/is_dir_variation1.phpt +++ b/ext/standard/tests/file/is_dir_variation1.phpt @@ -9,7 +9,7 @@ Test is_dir() function: usage variations - dir/subdir /* Testing is_dir() with base and sub dirs */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "-- Testing is_dir() with an empty dir --\n"; $dirname = $file_path."/is_dir_variation1"; @@ -27,7 +27,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/is_dir_variation1"; rmdir($dir_name."/is_dir_variation1_sub"); rmdir($dir_name); diff --git a/ext/standard/tests/file/is_dir_variation2.phpt b/ext/standard/tests/file/is_dir_variation2.phpt index 76b8e8bc0c..2a2f14d753 100644 --- a/ext/standard/tests/file/is_dir_variation2.phpt +++ b/ext/standard/tests/file/is_dir_variation2.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Testing is_dir() with dir, soft & hard link to dir, and with file, soft & hard link to file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing is_dir() with dir and links to dir ***\n"; echo "-- With dir --\n"; @@ -55,7 +55,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; if(file_exists($file_path."/is_dir_variation2_symlink")) { unlink($file_path."/is_dir_variation2_symlink"); } diff --git a/ext/standard/tests/file/is_dir_variation3.phpt b/ext/standard/tests/file/is_dir_variation3.phpt index c1664165eb..86c40da0eb 100644 --- a/ext/standard/tests/file/is_dir_variation3.phpt +++ b/ext/standard/tests/file/is_dir_variation3.phpt @@ -9,7 +9,7 @@ Test is_dir() function: usage variations - invalid arguments /* Passing invalid arguments to is_dir() */ -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); echo "*** Testing is_dir() with Invalid arguments: expected bool(false) ***\n"; $dirnames = array( diff --git a/ext/standard/tests/file/is_dir_variation4.phpt b/ext/standard/tests/file/is_dir_variation4.phpt index 5c0be485c5..543533f8ed 100644 --- a/ext/standard/tests/file/is_dir_variation4.phpt +++ b/ext/standard/tests/file/is_dir_variation4.phpt @@ -9,7 +9,7 @@ Test is_dir() function: usage variations - diff. path notations /* Passing dir names with different notations, using slashes, wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing is_dir() with different notations of dir names ***"; $dir_name = "/is_dir_variation4"; @@ -46,7 +46,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/is_dir_variation4"; rmdir($dir_name); ?> diff --git a/ext/standard/tests/file/is_executable_basic-win32-mb.phpt b/ext/standard/tests/file/is_executable_basic-win32-mb.phpt index e681ad6324..69f5f2dc7d 100644 --- a/ext/standard/tests/file/is_executable_basic-win32-mb.phpt +++ b/ext/standard/tests/file/is_executable_basic-win32-mb.phpt @@ -11,12 +11,12 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* Prototype: bool is_executable ( string $filename ); Description: Tells whether the filename is executable */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_executable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™is_executable.tmp"; +$filename = __DIR__."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™is_executable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_executable_basic-win32.phpt b/ext/standard/tests/file/is_executable_basic-win32.phpt index 7096285ef1..80059d8218 100644 --- a/ext/standard/tests/file/is_executable_basic-win32.phpt +++ b/ext/standard/tests/file/is_executable_basic-win32.phpt @@ -11,12 +11,12 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* Prototype: bool is_executable ( string $filename ); Description: Tells whether the filename is executable */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_executable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/is_executable.tmp"; +$filename = __DIR__."/is_executable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_executable_basic.phpt b/ext/standard/tests/file/is_executable_basic.phpt index 2e6d60593e..a86b9e4761 100644 --- a/ext/standard/tests/file/is_executable_basic.phpt +++ b/ext/standard/tests/file/is_executable_basic.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -23,12 +23,12 @@ unlink($filename); */ // include common file test functions -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_executable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/is_executable.tmp"; +$filename = __DIR__."/is_executable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_executable_error.phpt b/ext/standard/tests/file/is_executable_error.phpt index 4fb3dbaf5f..99c218b514 100644 --- a/ext/standard/tests/file/is_executable_error.phpt +++ b/ext/standard/tests/file/is_executable_error.phpt @@ -12,7 +12,7 @@ var_dump( is_executable() ); // args < expected no of arguments var_dump( is_executable(1, 2) ); // args > expected no. of arguments echo "\n*** Testing is_exceutable() on non-existent directory ***\n"; -var_dump( is_executable(dirname(__FILE__)."/is_executable") ); +var_dump( is_executable(__DIR__."/is_executable") ); echo "Done\n"; --EXPECTF-- diff --git a/ext/standard/tests/file/is_executable_variation1.phpt b/ext/standard/tests/file/is_executable_variation1.phpt index 1cd0a8d209..1e8d8f5faf 100644 --- a/ext/standard/tests/file/is_executable_variation1.phpt +++ b/ext/standard/tests/file/is_executable_variation1.phpt @@ -14,10 +14,10 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test is_executable() with file having different filepath notation */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_executable(): usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/is_executable_variation1"); // create a new temporary file @@ -60,8 +60,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/is_executable_variation1/bar.tmp"); -rmdir(dirname(__FILE__)."/is_executable_variation1/"); +unlink(__DIR__."/is_executable_variation1/bar.tmp"); +rmdir(__DIR__."/is_executable_variation1/"); ?> --EXPECTF-- *** Testing is_executable(): usage variations *** diff --git a/ext/standard/tests/file/is_executable_variation2.phpt b/ext/standard/tests/file/is_executable_variation2.phpt index 36399e189e..72957d147a 100644 --- a/ext/standard/tests/file/is_executable_variation2.phpt +++ b/ext/standard/tests/file/is_executable_variation2.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -24,10 +24,10 @@ unlink($filename); /* test is_executable() with file/dir having different permissions */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_executable(): usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/is_executable_variation2"); echo "\n*** Testing is_executable() on directory without execute permission ***\n"; @@ -37,16 +37,16 @@ chmod("$file_path/is_executable_variation2", 0777); // chmod to enable deletion echo "\n*** Testing miscelleneous input for is_executable() function ***\n"; $name_prefix = "is_executable_variation2"; -create_files(dirname(__FILE__), 1, "numeric", 0755, 1, "w", $name_prefix, 1); -create_files(dirname(__FILE__), 1, "text", 0755, 1, "w", $name_prefix, 2); -create_files(dirname(__FILE__), 1, "empty", 0755, 1, "w", $name_prefix, 3); -create_files(dirname(__FILE__), 1, "numeric", 0755, 1, "w", $name_prefix, 4); -create_files(dirname(__FILE__), 1, "text", 0222, 1, "w", $name_prefix, 5); -create_files(dirname(__FILE__), 1, "numeric", 0711, 1, "w", $name_prefix, 6); -create_files(dirname(__FILE__), 1, "text", 0714, 1, "w", $name_prefix, 7); -create_files(dirname(__FILE__), 1, "numeric", 0744, 1, "w", $name_prefix, 8); -create_files(dirname(__FILE__), 1, "text", 0421, 1, "w", $name_prefix, 9); -create_files(dirname(__FILE__), 1, "text", 0712, 1, "w", $name_prefix, 10); +create_files(__DIR__, 1, "numeric", 0755, 1, "w", $name_prefix, 1); +create_files(__DIR__, 1, "text", 0755, 1, "w", $name_prefix, 2); +create_files(__DIR__, 1, "empty", 0755, 1, "w", $name_prefix, 3); +create_files(__DIR__, 1, "numeric", 0755, 1, "w", $name_prefix, 4); +create_files(__DIR__, 1, "text", 0222, 1, "w", $name_prefix, 5); +create_files(__DIR__, 1, "numeric", 0711, 1, "w", $name_prefix, 6); +create_files(__DIR__, 1, "text", 0714, 1, "w", $name_prefix, 7); +create_files(__DIR__, 1, "numeric", 0744, 1, "w", $name_prefix, 8); +create_files(__DIR__, 1, "text", 0421, 1, "w", $name_prefix, 9); +create_files(__DIR__, 1, "text", 0712, 1, "w", $name_prefix, 10); $files = array ( "$file_path/is_executable_variation21.tmp", @@ -78,7 +78,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/is_executable_variation2/"); +rmdir(__DIR__."/is_executable_variation2/"); ?> --EXPECT-- *** Testing is_executable(): usage variations *** diff --git a/ext/standard/tests/file/is_executable_variation3.phpt b/ext/standard/tests/file/is_executable_variation3.phpt index a804f66eb2..5051504be9 100644 --- a/ext/standard/tests/file/is_executable_variation3.phpt +++ b/ext/standard/tests/file/is_executable_variation3.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/is_executable_root_check.tmp"; +$filename = __DIR__."/is_executable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { diff --git a/ext/standard/tests/file/is_file_basic.phpt b/ext/standard/tests/file/is_file_basic.phpt index 7b8e778a7f..d5d46b5fda 100644 --- a/ext/standard/tests/file/is_file_basic.phpt +++ b/ext/standard/tests/file/is_file_basic.phpt @@ -13,9 +13,9 @@ echo "*** Testing is_file(): basic functionality ***\n"; var_dump( is_file(__FILE__) ); /* Checking with (current) dir */ -var_dump( is_file(dirname(__FILE__)) ); +var_dump( is_file(__DIR__) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name = $file_path."/is_file_basic.tmp"; /* With non-existing file */ var_dump( is_file($file_name) ); @@ -31,7 +31,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name = $file_path."/is_file_basic.tmp"; unlink($file_name); ?> diff --git a/ext/standard/tests/file/is_file_variation1.phpt b/ext/standard/tests/file/is_file_variation1.phpt index 148b89a674..c8a26ea7c7 100644 --- a/ext/standard/tests/file/is_file_variation1.phpt +++ b/ext/standard/tests/file/is_file_variation1.phpt @@ -10,7 +10,7 @@ Test is_file() function: usage variations - diff. files /* Testing is_file() with file containing data, truncating its size and the file created by touch() */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "-- Testing is_file() with file containing data --\n"; $filename = $file_path."/is_file_variation1.tmp"; diff --git a/ext/standard/tests/file/is_file_variation2.phpt b/ext/standard/tests/file/is_file_variation2.phpt index de5c52b05c..7803410ac2 100644 --- a/ext/standard/tests/file/is_file_variation2.phpt +++ b/ext/standard/tests/file/is_file_variation2.phpt @@ -14,7 +14,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Creating soft and hard links to a file and applying is_file() on links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; fclose( fopen($file_path."/is_file_variation2.tmp", "w") ); echo "*** Testing is_file() with links ***\n"; @@ -32,7 +32,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/is_file_variation2_symlink.tmp"); unlink($file_path."/is_file_variation2_link.tmp"); unlink($file_path."/is_file_variation2.tmp"); diff --git a/ext/standard/tests/file/is_file_variation3.phpt b/ext/standard/tests/file/is_file_variation3.phpt index ec70371417..bee1a6d6cf 100644 --- a/ext/standard/tests/file/is_file_variation3.phpt +++ b/ext/standard/tests/file/is_file_variation3.phpt @@ -9,7 +9,7 @@ Test is_file() function: usage variations - invalid filenames /* Testing is_file() with invalid arguments -int, float, bool, NULL, resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen($file_path."/is_file_variation3.tmp", "w"); echo "*** Testing Invalid file types ***\n"; @@ -39,7 +39,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/is_file_variation3.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/is_file_variation4.phpt b/ext/standard/tests/file/is_file_variation4.phpt index 505331d2c9..39a640e7eb 100644 --- a/ext/standard/tests/file/is_file_variation4.phpt +++ b/ext/standard/tests/file/is_file_variation4.phpt @@ -9,7 +9,7 @@ Test is_file() function: usage variations - diff. path notations (Bug #42027) /* Passing file names with different notations, using slashes, wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing is_file() with different notations of file names ***\n"; $dir_name = $file_path."/is_file_variation4"; @@ -47,7 +47,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/is_file_variation4"; unlink($dir_name."/is_file_variation4.tmp"); rmdir($dir_name); diff --git a/ext/standard/tests/file/is_readable_basic-win32-mb.phpt b/ext/standard/tests/file/is_readable_basic-win32-mb.phpt index d10342b5e3..150510b884 100644 --- a/ext/standard/tests/file/is_readable_basic-win32-mb.phpt +++ b/ext/standard/tests/file/is_readable_basic-win32-mb.phpt @@ -13,12 +13,12 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { */ // include common file test functions -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_readable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™is_readable.tmp"; +$filename = __DIR__."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™is_readable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_readable_basic-win32.phpt b/ext/standard/tests/file/is_readable_basic-win32.phpt index d4e0538d79..1432141c91 100644 --- a/ext/standard/tests/file/is_readable_basic-win32.phpt +++ b/ext/standard/tests/file/is_readable_basic-win32.phpt @@ -13,12 +13,12 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { */ // include common file test functions -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_readable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/is_readable.tmp"; +$filename = __DIR__."/is_readable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_readable_basic.phpt b/ext/standard/tests/file/is_readable_basic.phpt index 2bca150744..ce5312862f 100644 --- a/ext/standard/tests/file/is_readable_basic.phpt +++ b/ext/standard/tests/file/is_readable_basic.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -23,12 +23,12 @@ unlink($filename); */ // include common file test functions -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_readable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/is_readable.tmp"; +$filename = __DIR__."/is_readable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_readable_error.phpt b/ext/standard/tests/file/is_readable_error.phpt index 9a734cd14d..ad6c2b8c62 100644 --- a/ext/standard/tests/file/is_readable_error.phpt +++ b/ext/standard/tests/file/is_readable_error.phpt @@ -11,7 +11,7 @@ var_dump( is_readable() ); // args < expected var_dump( is_readable(1, 2) ); // args > expected echo "\n*** Testing is_readable() on non-existent file ***\n"; -var_dump( is_readable(dirname(__FILE__)."/is_readable.tmp") ); +var_dump( is_readable(__DIR__."/is_readable.tmp") ); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/is_readable_variation1.phpt b/ext/standard/tests/file/is_readable_variation1.phpt index 0ba2324f9a..66dc2b81f5 100644 --- a/ext/standard/tests/file/is_readable_variation1.phpt +++ b/ext/standard/tests/file/is_readable_variation1.phpt @@ -4,7 +4,7 @@ Test is_readable() function: usage variations - diff. file notations <?php if (substr(PHP_OS, 0, 3) != 'WIN') { // Skip if being run by root (files are always readable, writeable and executable) - $filename = dirname(__FILE__)."/is_readable_root_check.tmp"; + $filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -22,10 +22,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test is_readable() with file having different filepath notation */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_readable(): usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/is_readable_variation1"); // create a new temporary file @@ -69,8 +69,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/is_readable_variation1/bar.tmp"); -rmdir(dirname(__FILE__)."/is_readable_variation1/"); +unlink(__DIR__."/is_readable_variation1/bar.tmp"); +rmdir(__DIR__."/is_readable_variation1/"); ?> --EXPECTF-- *** Testing is_readable(): usage variations *** diff --git a/ext/standard/tests/file/is_readable_variation2.phpt b/ext/standard/tests/file/is_readable_variation2.phpt index ac54735b19..896ef2e618 100644 --- a/ext/standard/tests/file/is_readable_variation2.phpt +++ b/ext/standard/tests/file/is_readable_variation2.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -23,10 +23,10 @@ unlink($filename); /* test is_executable() with file/dir having different permissions */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_readable(): usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/is_readable_variation2"); echo "\n*** Testing is_readable() on directory without read permission ***\n"; @@ -36,16 +36,16 @@ chmod("$file_path/is_readable_variation2", 0777); // chmod to enable deletion o echo "\n*** Testing miscelleneous input for is_readable() function ***\n"; $name_prefix = "is_readable_variation2"; -create_files(dirname(__FILE__), 1, "numeric", 0755, 1, "w", $name_prefix, 1); -create_files(dirname(__FILE__), 1, "text", 0755, 1, "w", $name_prefix, 2); -create_files(dirname(__FILE__), 1, "empty", 0755, 1, "w", $name_prefix, 3); -create_files(dirname(__FILE__), 1, "numeric", 0555, 1, "w", $name_prefix, 4); -create_files(dirname(__FILE__), 1, "text", 0222, 1, "w", $name_prefix, 5); -create_files(dirname(__FILE__), 1, "numeric", 0711, 1, "w", $name_prefix, 6); -create_files(dirname(__FILE__), 1, "text", 0411, 1, "w", $name_prefix, 7); -create_files(dirname(__FILE__), 1, "numeric", 0444, 1, "w", $name_prefix, 8); -create_files(dirname(__FILE__), 1, "text", 0421, 1, "w", $name_prefix, 9); -create_files(dirname(__FILE__), 1, "text", 0422, 1, "w", $name_prefix, 10); +create_files(__DIR__, 1, "numeric", 0755, 1, "w", $name_prefix, 1); +create_files(__DIR__, 1, "text", 0755, 1, "w", $name_prefix, 2); +create_files(__DIR__, 1, "empty", 0755, 1, "w", $name_prefix, 3); +create_files(__DIR__, 1, "numeric", 0555, 1, "w", $name_prefix, 4); +create_files(__DIR__, 1, "text", 0222, 1, "w", $name_prefix, 5); +create_files(__DIR__, 1, "numeric", 0711, 1, "w", $name_prefix, 6); +create_files(__DIR__, 1, "text", 0411, 1, "w", $name_prefix, 7); +create_files(__DIR__, 1, "numeric", 0444, 1, "w", $name_prefix, 8); +create_files(__DIR__, 1, "text", 0421, 1, "w", $name_prefix, 9); +create_files(__DIR__, 1, "text", 0422, 1, "w", $name_prefix, 10); $files = array ( "$file_path/is_readable_variation21.tmp", @@ -77,7 +77,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/is_readable_variation2/"); +rmdir(__DIR__."/is_readable_variation2/"); ?> --EXPECT-- *** Testing is_readable(): usage variations *** diff --git a/ext/standard/tests/file/is_readable_variation3.phpt b/ext/standard/tests/file/is_readable_variation3.phpt index 74fc7af574..5aec51b780 100644 --- a/ext/standard/tests/file/is_readable_variation3.phpt +++ b/ext/standard/tests/file/is_readable_variation3.phpt @@ -5,7 +5,7 @@ Test is_readable() function: usage variations - invalid file names if (substr(PHP_OS, 0, 3) != 'WIN') { // Skip if being run by root (files are always readable, writeable and executable) - $filename = dirname(__FILE__)."/is_readable_root_check.tmp"; + $filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { diff --git a/ext/standard/tests/file/is_writable_basic.phpt b/ext/standard/tests/file/is_writable_basic.phpt index 6c447f4256..da2b2eb925 100644 --- a/ext/standard/tests/file/is_writable_basic.phpt +++ b/ext/standard/tests/file/is_writable_basic.phpt @@ -3,7 +3,7 @@ Test is_writable() and its alias is_writeable() function: basic functionality --SKIPIF-- <?php // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -22,12 +22,12 @@ unlink($filename); */ // include common file test functions -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_writable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/is_writable.tmp"; +$filename = __DIR__."/is_writable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_writable_error.phpt b/ext/standard/tests/file/is_writable_error.phpt index e3755bc748..a9633f2284 100644 --- a/ext/standard/tests/file/is_writable_error.phpt +++ b/ext/standard/tests/file/is_writable_error.phpt @@ -17,8 +17,8 @@ var_dump( is_writable(1, 2) ); // args > expected var_dump( is_writeable(1, 2) ); echo "\n*** Testing is_writable() on non-existent file ***\n"; -var_dump( is_writable(dirname(__FILE__)."/is_writable") ); -var_dump( is_writeable(dirname(__FILE__)."/is_writable") ); +var_dump( is_writable(__DIR__."/is_writable") ); +var_dump( is_writeable(__DIR__."/is_writable") ); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/is_writable_variation1.phpt b/ext/standard/tests/file/is_writable_variation1.phpt index f5cdf6a8a0..31187b66d0 100644 --- a/ext/standard/tests/file/is_writable_variation1.phpt +++ b/ext/standard/tests/file/is_writable_variation1.phpt @@ -5,7 +5,7 @@ Test is_writable() and its alias is_writeable() function: usage variations - dif if (substr(PHP_OS, 0, 3) != 'WIN') { // Skip if being run by root (files are always readable, writeable and executable) - $filename = dirname(__FILE__)."/is_writable_root_check.tmp"; + $filename = __DIR__."/is_writable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -24,10 +24,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { is_writeable() is an alias of is_writable() */ /* test is_writable() & is_writeable() with file having different filepath notation */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_writable(): usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/is_writable_variation1"); // create a new temporary file @@ -72,8 +72,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/is_writable_variation1/bar.tmp"); -rmdir(dirname(__FILE__)."/is_writable_variation1/"); +unlink(__DIR__."/is_writable_variation1/bar.tmp"); +rmdir(__DIR__."/is_writable_variation1/"); ?> --EXPECTF-- *** Testing is_writable(): usage variations *** diff --git a/ext/standard/tests/file/is_writable_variation2.phpt b/ext/standard/tests/file/is_writable_variation2.phpt index efe35a0335..a8cafb25bd 100644 --- a/ext/standard/tests/file/is_writable_variation2.phpt +++ b/ext/standard/tests/file/is_writable_variation2.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. only on LINUX'); } // Skip if being run by root -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -26,10 +26,10 @@ unlink ($filename); /* test is_executable() with file/dir having different permissions */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_writable(): usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/is_writable_variation2"); echo "\n*** Testing is_writable() on directory without write permission ***\n"; @@ -40,16 +40,16 @@ chmod("$file_path/is_writable_variation2", 0777); // chmod to enable deletion o echo "\n*** Testing miscelleneous input for is_writable() function ***\n"; $name_prefix = "is_writable_variation2"; -create_files(dirname(__FILE__), 1, "numeric", 0755, 1, "w", $name_prefix, 1); -create_files(dirname(__FILE__), 1, "text", 0755, 1, "w", $name_prefix, 2); -create_files(dirname(__FILE__), 1, "empty", 0755, 1, "w", $name_prefix, 3); -create_files(dirname(__FILE__), 1, "numeric", 0555, 1, "w", $name_prefix, 4); -create_files(dirname(__FILE__), 1, "text", 0222, 1, "w", $name_prefix, 5); -create_files(dirname(__FILE__), 1, "numeric", 0711, 1, "w", $name_prefix, 6); -create_files(dirname(__FILE__), 1, "text", 0114, 1, "w", $name_prefix, 7); -create_files(dirname(__FILE__), 1, "numeric", 0244, 1, "w", $name_prefix, 8); -create_files(dirname(__FILE__), 1, "text", 0421, 1, "w", $name_prefix, 9); -create_files(dirname(__FILE__), 1, "text", 0422, 1, "w", $name_prefix, 10); +create_files(__DIR__, 1, "numeric", 0755, 1, "w", $name_prefix, 1); +create_files(__DIR__, 1, "text", 0755, 1, "w", $name_prefix, 2); +create_files(__DIR__, 1, "empty", 0755, 1, "w", $name_prefix, 3); +create_files(__DIR__, 1, "numeric", 0555, 1, "w", $name_prefix, 4); +create_files(__DIR__, 1, "text", 0222, 1, "w", $name_prefix, 5); +create_files(__DIR__, 1, "numeric", 0711, 1, "w", $name_prefix, 6); +create_files(__DIR__, 1, "text", 0114, 1, "w", $name_prefix, 7); +create_files(__DIR__, 1, "numeric", 0244, 1, "w", $name_prefix, 8); +create_files(__DIR__, 1, "text", 0421, 1, "w", $name_prefix, 9); +create_files(__DIR__, 1, "text", 0422, 1, "w", $name_prefix, 10); $misc_files = array ( "$file_path/is_writable_variation21.tmp", @@ -83,7 +83,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/is_writable_variation2/"); +rmdir(__DIR__."/is_writable_variation2/"); ?> --EXPECT-- *** Testing is_writable(): usage variations *** diff --git a/ext/standard/tests/file/is_writable_variation3.phpt b/ext/standard/tests/file/is_writable_variation3.phpt index 3cc7a4da9d..f682bd3292 100644 --- a/ext/standard/tests/file/is_writable_variation3.phpt +++ b/ext/standard/tests/file/is_writable_variation3.phpt @@ -4,7 +4,7 @@ Test is_writable() and its alias is_writeable() function: usage variations - inv <?php if (substr(PHP_OS, 0, 3) != 'WIN') { // Skip if being run by root (files are always readable, writeable and executable) - $filename = dirname(__FILE__)."/is_writable_root_check.tmp"; + $filename = __DIR__."/is_writable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { diff --git a/ext/standard/tests/file/lchgrp_basic.phpt b/ext/standard/tests/file/lchgrp_basic.phpt index c844471240..fa97ce86ef 100644 --- a/ext/standard/tests/file/lchgrp_basic.phpt +++ b/ext/standard/tests/file/lchgrp_basic.phpt @@ -7,8 +7,8 @@ if (!function_exists("posix_getgid")) die("skip no posix_getgid()"); ?> --FILE-- <?php -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchgrp.txt'; -$symlink = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'symlink.txt'; +$filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchgrp.txt'; +$symlink = __DIR__ . DIRECTORY_SEPARATOR . 'symlink.txt'; $gid = posix_getgid(); @@ -22,8 +22,8 @@ var_dump( filegroup( $symlink ) === $gid ); --CLEAN-- <?php -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchgrp.txt'; -$symlink = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'symlink.txt'; +$filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchgrp.txt'; +$symlink = __DIR__ . DIRECTORY_SEPARATOR . 'symlink.txt'; unlink($filename); unlink($symlink); diff --git a/ext/standard/tests/file/lchown_basic.phpt b/ext/standard/tests/file/lchown_basic.phpt index 329f4b94df..e38bbda1be 100644 --- a/ext/standard/tests/file/lchown_basic.phpt +++ b/ext/standard/tests/file/lchown_basic.phpt @@ -14,8 +14,8 @@ if (!function_exists("posix_getuid")) die("skip no posix_getuid()"); */ echo "*** Testing lchown() : basic functionality ***\n"; -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchown_basic.txt'; -$symlink = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchown_basic_symlink.txt'; +$filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchown_basic.txt'; +$symlink = __DIR__ . DIRECTORY_SEPARATOR . 'lchown_basic_symlink.txt'; $uid = posix_getuid(); @@ -29,8 +29,8 @@ var_dump( fileowner( $symlink ) === $uid ); --CLEAN-- <?php -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchown_basic.txt'; -$symlink = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchown_basic_symlink.txt'; +$filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchown_basic.txt'; +$symlink = __DIR__ . DIRECTORY_SEPARATOR . 'lchown_basic_symlink.txt'; unlink($filename); unlink($symlink); diff --git a/ext/standard/tests/file/lchown_error.phpt b/ext/standard/tests/file/lchown_error.phpt index f4b4f5089e..dc574bf421 100644 --- a/ext/standard/tests/file/lchown_error.phpt +++ b/ext/standard/tests/file/lchown_error.phpt @@ -5,7 +5,7 @@ Test lchown() function : error functionality if (substr(PHP_OS, 0, 3) == 'WIN') die('skip no windows support'); if (!function_exists("posix_getuid")) die("skip no posix_getuid()"); // Skip if being run by root -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -25,7 +25,7 @@ unlink($filename); echo "*** Testing lchown() : error functionality ***\n"; // Set up -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchown.txt'; +$filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchown.txt'; touch( $filename ); $uid = posix_getuid(); @@ -51,7 +51,7 @@ var_dump( lchown( $filename, -5 ) ); --CLEAN-- <?php -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchown.txt'; +$filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchown.txt'; unlink($filename); ?> diff --git a/ext/standard/tests/file/lstat_stat_basic.phpt b/ext/standard/tests/file/lstat_stat_basic.phpt index ec11e2f839..24788e3a8a 100644 --- a/ext/standard/tests/file/lstat_stat_basic.phpt +++ b/ext/standard/tests/file/lstat_stat_basic.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require("$file_path/file.inc"); echo "*** Testing lstat() & stat() : basic functionality ***\n"; @@ -80,7 +80,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_basic_link.tmp"); unlink("$file_path/lstat_stat_basic/lstat_stat_basic.tmp"); rmdir("$file_path/lstat_stat_basic"); diff --git a/ext/standard/tests/file/lstat_stat_error.phpt b/ext/standard/tests/file/lstat_stat_error.phpt index 8f290a32e3..543e296ec2 100644 --- a/ext/standard/tests/file/lstat_stat_error.phpt +++ b/ext/standard/tests/file/lstat_stat_error.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { */ echo "*** Testing lstat() for error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( lstat() ); // args < expected var_dump( lstat(__FILE__, 2) ); // args > expected var_dump( lstat("$file_path/temp.tmp") ); // non existing file @@ -27,7 +27,7 @@ var_dump( lstat($arr) ); // array argument echo "\n*** Testing stat() for error conditions ***\n"; var_dump( stat() ); // args < expected var_dump( stat(__FILE__, 2) ); // file, args > expected -var_dump( stat(dirname(__FILE__), 2) ); //dir, args > expected +var_dump( stat(__DIR__, 2) ); //dir, args > expected var_dump( stat("$file_path/temp.tmp") ); // non existing file var_dump( stat("$file_path/temp/") ); // non existing dir diff --git a/ext/standard/tests/file/lstat_stat_variation1.phpt b/ext/standard/tests/file/lstat_stat_variation1.phpt index 68f526b5d0..e7aa778ade 100644 --- a/ext/standard/tests/file/lstat_stat_variation1.phpt +++ b/ext/standard/tests/file/lstat_stat_variation1.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of rename() on stats of file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; /* create temp file */ @@ -26,7 +26,7 @@ fclose($fp); // renaming a file and check stat echo "*** Testing stat() for files after being renamed ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $old_filename = "$file_path/lstat_stat_variation1.tmp"; $new_filename = "$file_path/lstat_stat_variation1a.tmp"; $old_stat = stat($old_filename); @@ -47,7 +47,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation1a.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation10.phpt b/ext/standard/tests/file/lstat_stat_variation10.phpt index 3a7c692881..16ff75c26d 100644 --- a/ext/standard/tests/file/lstat_stat_variation10.phpt +++ b/ext/standard/tests/file/lstat_stat_variation10.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of is_dir() on stats of a dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -45,7 +45,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/lstat_stat_variation10"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation11.phpt b/ext/standard/tests/file/lstat_stat_variation11.phpt index 975b1be55c..9a394ae7e9 100644 --- a/ext/standard/tests/file/lstat_stat_variation11.phpt +++ b/ext/standard/tests/file/lstat_stat_variation11.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; /* test the effects of is_file() on stats of a file */ @@ -46,7 +46,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation11.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation12.phpt b/ext/standard/tests/file/lstat_stat_variation12.phpt index 8ad7893286..eada799cdf 100644 --- a/ext/standard/tests/file/lstat_stat_variation12.phpt +++ b/ext/standard/tests/file/lstat_stat_variation12.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of is_link() on stats of link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -51,7 +51,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation12_link.tmp"); unlink("$file_path/lstat_stat_variation12.tmp"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation13.phpt b/ext/standard/tests/file/lstat_stat_variation13.phpt index 476c091ca1..22694240f5 100644 --- a/ext/standard/tests/file/lstat_stat_variation13.phpt +++ b/ext/standard/tests/file/lstat_stat_variation13.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* use stat on file created using "w" and "r" mode of fopen */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -45,7 +45,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation13.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation14.phpt b/ext/standard/tests/file/lstat_stat_variation14.phpt index 6ddd7497e4..f340d57f37 100644 --- a/ext/standard/tests/file/lstat_stat_variation14.phpt +++ b/ext/standard/tests/file/lstat_stat_variation14.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of is_link() on stats of hard link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -47,7 +47,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation14_hard.tmp"); unlink("$file_path/lstat_stat_variation14.tmp"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation15.phpt b/ext/standard/tests/file/lstat_stat_variation15.phpt index 903531db08..8278b8dba9 100644 --- a/ext/standard/tests/file/lstat_stat_variation15.phpt +++ b/ext/standard/tests/file/lstat_stat_variation15.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects on stats by changing permissions of link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -49,7 +49,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation15_link.tmp"); unlink("$file_path/lstat_stat_variation15.tmp"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation16.phpt b/ext/standard/tests/file/lstat_stat_variation16.phpt index 056cec1c7d..652f5c29c7 100644 --- a/ext/standard/tests/file/lstat_stat_variation16.phpt +++ b/ext/standard/tests/file/lstat_stat_variation16.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects on stats with changing permissions of file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; $filename = "$file_path/lstat_stat_variation16.tmp"; @@ -44,7 +44,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation16.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation17.phpt b/ext/standard/tests/file/lstat_stat_variation17.phpt index 51349f6a93..208cc0b388 100644 --- a/ext/standard/tests/file/lstat_stat_variation17.phpt +++ b/ext/standard/tests/file/lstat_stat_variation17.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects on stats by changing permissions of a dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; // checking stat() on directory @@ -43,7 +43,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/lstat_stat_variation17"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation18.phpt b/ext/standard/tests/file/lstat_stat_variation18.phpt index 91a3ddcb6b..7b83d15547 100644 --- a/ext/standard/tests/file/lstat_stat_variation18.phpt +++ b/ext/standard/tests/file/lstat_stat_variation18.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test for stats of dir/file when their names are stored in objects */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -53,7 +53,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation18.tmp"); rmdir("$file_path/lstat_stat_variation18"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation19.phpt b/ext/standard/tests/file/lstat_stat_variation19.phpt index f3d1c303e6..8a2126737f 100644 --- a/ext/standard/tests/file/lstat_stat_variation19.phpt +++ b/ext/standard/tests/file/lstat_stat_variation19.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test for stats of dir/file when their names are stored in an array */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -54,7 +54,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation19.tmp"); rmdir("$file_path/lstat_stat_variation19"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation2.phpt b/ext/standard/tests/file/lstat_stat_variation2.phpt index 52b817e5d0..61a9e196cc 100644 --- a/ext/standard/tests/file/lstat_stat_variation2.phpt +++ b/ext/standard/tests/file/lstat_stat_variation2.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of rename() on stats of dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require("file.inc"); /* create temp directory */ @@ -48,7 +48,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/lstat_stat_variation1a"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation20.phpt b/ext/standard/tests/file/lstat_stat_variation20.phpt index 26382fda53..8567c4e7c2 100644 --- a/ext/standard/tests/file/lstat_stat_variation20.phpt +++ b/ext/standard/tests/file/lstat_stat_variation20.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test for stats of link when their names are stored in object and array */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; $fp = fopen("$file_path/lstat_stat_variation20.tmp", "w"); // temp file @@ -56,7 +56,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation20_link.tmp"); unlink("$file_path/lstat_stat_variation20.tmp"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation21.phpt b/ext/standard/tests/file/lstat_stat_variation21.phpt index d339a988a8..23ed53e566 100644 --- a/ext/standard/tests/file/lstat_stat_variation21.phpt +++ b/ext/standard/tests/file/lstat_stat_variation21.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of truncate() on stats of a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -51,7 +51,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation21.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation3.phpt b/ext/standard/tests/file/lstat_stat_variation3.phpt index 43f8bf6187..962f1df5b2 100644 --- a/ext/standard/tests/file/lstat_stat_variation3.phpt +++ b/ext/standard/tests/file/lstat_stat_variation3.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of rename() on stats of link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; /* create temp file & link */ @@ -49,7 +49,7 @@ var_dump( compare_stats($old_stat, $new_stat, $keys_to_compare) ); ===Done=== --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation3.tmp"); unlink("$file_path/lstat_stat_variation_link3a.tmp"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation4.phpt b/ext/standard/tests/file/lstat_stat_variation4.phpt index 5046f70086..fe8b61e5ca 100644 --- a/ext/standard/tests/file/lstat_stat_variation4.phpt +++ b/ext/standard/tests/file/lstat_stat_variation4.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of touch() on stats of file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -51,7 +51,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation4.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation5.phpt b/ext/standard/tests/file/lstat_stat_variation5.phpt index 33aee9f31a..34401dc55d 100644 --- a/ext/standard/tests/file/lstat_stat_variation5.phpt +++ b/ext/standard/tests/file/lstat_stat_variation5.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of touch() on stats of dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -52,7 +52,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/lstat_stat_variation5"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation6.phpt b/ext/standard/tests/file/lstat_stat_variation6.phpt index 239a82927f..b4dc684eb1 100644 --- a/ext/standard/tests/file/lstat_stat_variation6.phpt +++ b/ext/standard/tests/file/lstat_stat_variation6.phpt @@ -26,7 +26,7 @@ foreach( $mount_output as $out ) { /* test the effects of touch() on stats of link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -64,7 +64,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation6.tmp"); unlink("$file_path/lstat_stat_variation_link6.tmp"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation7.phpt b/ext/standard/tests/file/lstat_stat_variation7.phpt index f849e8254a..b74dff63f7 100644 --- a/ext/standard/tests/file/lstat_stat_variation7.phpt +++ b/ext/standard/tests/file/lstat_stat_variation7.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; /* test the effects on stats with writing data into a file */ @@ -44,7 +44,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation7.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation8.phpt b/ext/standard/tests/file/lstat_stat_variation8.phpt index cbd5c1a45d..db7f87f7f7 100644 --- a/ext/standard/tests/file/lstat_stat_variation8.phpt +++ b/ext/standard/tests/file/lstat_stat_variation8.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; /* test the effects on stats with creating file/subdir in a dir @@ -48,7 +48,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation8/lstat_stat_variation8a.tmp"); rmdir("$file_path/lstat_stat_variation8/lstat_stat_variation8_subdir/"); rmdir("$file_path/lstat_stat_variation8"); diff --git a/ext/standard/tests/file/lstat_stat_variation9.phpt b/ext/standard/tests/file/lstat_stat_variation9.phpt index 84b051304d..a73b126174 100644 --- a/ext/standard/tests/file/lstat_stat_variation9.phpt +++ b/ext/standard/tests/file/lstat_stat_variation9.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; /* test the effects on stats by deleting file/subdir from a dir @@ -54,7 +54,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/lstat_stat_variation9"; rmdir($dirname); ?> diff --git a/ext/standard/tests/file/mkdir-001.phpt b/ext/standard/tests/file/mkdir-001.phpt index bad32c37ab..947b6679cd 100644 --- a/ext/standard/tests/file/mkdir-001.phpt +++ b/ext/standard/tests/file/mkdir-001.phpt @@ -13,10 +13,10 @@ var_dump(mkdir("./mkdir-001/subdir")); var_dump(rmdir("./mkdir-001/subdir")); var_dump(rmdir("./mkdir-001")); -var_dump(mkdir(dirname(__FILE__)."/mkdir-001")); -var_dump(mkdir(dirname(__FILE__)."/mkdir-001/subdir")); -var_dump(rmdir(dirname(__FILE__)."/mkdir-001/subdir")); -var_dump(rmdir(dirname(__FILE__)."/mkdir-001")); +var_dump(mkdir(__DIR__."/mkdir-001")); +var_dump(mkdir(__DIR__."/mkdir-001/subdir")); +var_dump(rmdir(__DIR__."/mkdir-001/subdir")); +var_dump(rmdir(__DIR__."/mkdir-001")); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/mkdir-002.phpt b/ext/standard/tests/file/mkdir-002.phpt index 92c05e941d..2cc849f462 100644 --- a/ext/standard/tests/file/mkdir-002.phpt +++ b/ext/standard/tests/file/mkdir-002.phpt @@ -21,12 +21,12 @@ var_dump(`ls -l ./mkdir-002`); var_dump(rmdir("./mkdir-002/subdir")); var_dump(rmdir("./mkdir-002")); -var_dump(mkdir(dirname(__FILE__)."/mkdir-002", 0777)); -var_dump(mkdir(dirname(__FILE__)."/mkdir-002/subdir", 0777)); -$dirname = dirname(__FILE__)."/mkdir-002"; +var_dump(mkdir(__DIR__."/mkdir-002", 0777)); +var_dump(mkdir(__DIR__."/mkdir-002/subdir", 0777)); +$dirname = __DIR__."/mkdir-002"; var_dump(`ls -l $dirname`); -var_dump(rmdir(dirname(__FILE__)."/mkdir-002/subdir")); -var_dump(rmdir(dirname(__FILE__)."/mkdir-002")); +var_dump(rmdir(__DIR__."/mkdir-002/subdir")); +var_dump(rmdir(__DIR__."/mkdir-002")); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/mkdir-003.phpt b/ext/standard/tests/file/mkdir-003.phpt index b3141c5970..4d10169259 100644 --- a/ext/standard/tests/file/mkdir-003.phpt +++ b/ext/standard/tests/file/mkdir-003.phpt @@ -11,9 +11,9 @@ var_dump(mkdir("./mkdir-003/subdir", 0777, true)); var_dump(rmdir("./mkdir-003/subdir")); var_dump(rmdir("./mkdir-003")); -var_dump(mkdir(dirname(__FILE__)."/mkdir-003/subdir", 0777, true)); -var_dump(rmdir(dirname(__FILE__)."/mkdir-003/subdir")); -var_dump(rmdir(dirname(__FILE__)."/mkdir-003")); +var_dump(mkdir(__DIR__."/mkdir-003/subdir", 0777, true)); +var_dump(rmdir(__DIR__."/mkdir-003/subdir")); +var_dump(rmdir(__DIR__."/mkdir-003")); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/mkdir-006.phpt b/ext/standard/tests/file/mkdir-006.phpt index 9fcb92802e..1974faa0b6 100644 --- a/ext/standard/tests/file/mkdir-006.phpt +++ b/ext/standard/tests/file/mkdir-006.phpt @@ -2,7 +2,7 @@ recursive mkdir() with unclean paths --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); $dirpath = "./tmp/foo//bar/logs"; mkdir($dirpath, 0777, true); diff --git a/ext/standard/tests/file/mkdir_rmdir_variation-win32-mb.phpt b/ext/standard/tests/file/mkdir_rmdir_variation-win32-mb.phpt index 785644d8b0..20535a0536 100644 --- a/ext/standard/tests/file/mkdir_rmdir_variation-win32-mb.phpt +++ b/ext/standard/tests/file/mkdir_rmdir_variation-win32-mb.phpt @@ -16,7 +16,7 @@ echo "*** Testing mkdir() and rmdir() for different permissions ***\n"; $context = stream_context_create(); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $counter = 1; for($mode = 0000; $mode <= 0777; $mode++) { @@ -49,9 +49,9 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/mkdirç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/test/"); -rmdir(dirname(__FILE__)."/mkdirç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/test1/"); -rmdir(dirname(__FILE__)."/mkdirç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/"); +rmdir(__DIR__."/mkdirç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/test/"); +rmdir(__DIR__."/mkdirç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/test1/"); +rmdir(__DIR__."/mkdirç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/"); ?> --EXPECTF-- *** Testing mkdir() and rmdir() for different permissions *** diff --git a/ext/standard/tests/file/mkdir_rmdir_variation-win32.phpt b/ext/standard/tests/file/mkdir_rmdir_variation-win32.phpt index f9d41d5a1b..3391472f99 100644 --- a/ext/standard/tests/file/mkdir_rmdir_variation-win32.phpt +++ b/ext/standard/tests/file/mkdir_rmdir_variation-win32.phpt @@ -16,7 +16,7 @@ echo "*** Testing mkdir() and rmdir() for different permissions ***\n"; $context = stream_context_create(); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $counter = 1; for($mode = 0000; $mode <= 0777; $mode++) { @@ -49,9 +49,9 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/mkdir/test/"); -rmdir(dirname(__FILE__)."/mkdir/test1/"); -rmdir(dirname(__FILE__)."/mkdir/"); +rmdir(__DIR__."/mkdir/test/"); +rmdir(__DIR__."/mkdir/test1/"); +rmdir(__DIR__."/mkdir/"); ?> --EXPECTF-- *** Testing mkdir() and rmdir() for different permissions *** diff --git a/ext/standard/tests/file/mkdir_rmdir_variation1.phpt b/ext/standard/tests/file/mkdir_rmdir_variation1.phpt index 7a1a5c7583..21ad5619e1 100644 --- a/ext/standard/tests/file/mkdir_rmdir_variation1.phpt +++ b/ext/standard/tests/file/mkdir_rmdir_variation1.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. only on LINUX'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -26,7 +26,7 @@ echo "*** Testing mkdir() and rmdir() for different permissions ***\n"; $context = stream_context_create(); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $counter = 1; for($mode = 0000; $mode <= 0777; $mode++) { diff --git a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt index 24dfc96ac9..b6a7395337 100644 --- a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt +++ b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. only on LINUX'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -24,7 +24,7 @@ unlink($filename); $context = stream_context_create(); -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "\n*** Testing mkdir() and rmdir() by giving stream context as fourth argument ***\n"; var_dump( mkdir("$file_path/mkdir_variation2/test/", 0777, true, $context) ); @@ -49,8 +49,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/mkdir_variation2/test/"); -rmdir(dirname(__FILE__)."/mkdir_variation2/"); +rmdir(__DIR__."/mkdir_variation2/test/"); +rmdir(__DIR__."/mkdir_variation2/"); ?> --EXPECTF-- *** Testing mkdir() and rmdir() by giving stream context as fourth argument *** diff --git a/ext/standard/tests/file/parse_ini_file.phpt b/ext/standard/tests/file/parse_ini_file.phpt index d66f179acc..eed17c0093 100644 --- a/ext/standard/tests/file/parse_ini_file.phpt +++ b/ext/standard/tests/file/parse_ini_file.phpt @@ -7,7 +7,7 @@ Test parse_ini_file() function and returns the settings in it in an associative array. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $parse_string = <<<EOD ; Comment starts with semi-colon(;) @@ -215,7 +215,7 @@ echo "*** Done **\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/parse.ini"); +unlink(__DIR__."/parse.ini"); ?> --EXPECT-- *** Test parse_ini_file() function: with various keys and values given in parse.ini file *** diff --git a/ext/standard/tests/file/parse_ini_file_variation6-win32-mb.phpt b/ext/standard/tests/file/parse_ini_file_variation6-win32-mb.phpt index edfc0e82bb..df98a632b4 100644 --- a/ext/standard/tests/file/parse_ini_file_variation6-win32-mb.phpt +++ b/ext/standard/tests/file/parse_ini_file_variation6-win32-mb.phpt @@ -18,13 +18,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing parse_ini_file() : variation ***\n"; $mainDir = "parseIniFileVarç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.dir"; $subDir = "parseIniFileVarç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™Sub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/parse_ini_file_variation6-win32.phpt b/ext/standard/tests/file/parse_ini_file_variation6-win32.phpt index 77cb693cad..2ef1d88fcc 100644 --- a/ext/standard/tests/file/parse_ini_file_variation6-win32.phpt +++ b/ext/standard/tests/file/parse_ini_file_variation6-win32.phpt @@ -18,13 +18,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing parse_ini_file() : variation ***\n"; $mainDir = "parseIniFileVar6.dir"; $subDir = "parseIniFileVar6Sub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/parse_ini_file_variation6.phpt b/ext/standard/tests/file/parse_ini_file_variation6.phpt index d6f97b9008..7c6d8ab4cb 100644 --- a/ext/standard/tests/file/parse_ini_file_variation6.phpt +++ b/ext/standard/tests/file/parse_ini_file_variation6.phpt @@ -13,13 +13,13 @@ Dave Kelsey <d_kelsey@uk.ibm.com> echo "*** Testing parse_ini_file() : variation ***\n"; $mainDir = "parseIniFileVar6.dir"; $subDir = "parseIniFileVar6Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $allDirs = array( // absolute paths diff --git a/ext/standard/tests/file/pathinfo_basic.phpt b/ext/standard/tests/file/pathinfo_basic.phpt index 48d01dd66c..f44379847e 100644 --- a/ext/standard/tests/file/pathinfo_basic.phpt +++ b/ext/standard/tests/file/pathinfo_basic.phpt @@ -8,7 +8,7 @@ Test pathinfo() function: basic functionality echo "*** Testing basic functions of pathinfo() ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $paths = array ( /* Testing basic file notation */ diff --git a/ext/standard/tests/file/popen_pclose_basic-win32-mb.phpt b/ext/standard/tests/file/popen_pclose_basic-win32-mb.phpt index de5510bb81..2d9b2b92dc 100644 --- a/ext/standard/tests/file/popen_pclose_basic-win32-mb.phpt +++ b/ext/standard/tests/file/popen_pclose_basic-win32-mb.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) != 'WIN' ) echo "*** Testing popen(): reading from the pipe ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "Sample String ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"; $file_handle = popen(" echo $string", "r"); diff --git a/ext/standard/tests/file/popen_pclose_basic-win32.phpt b/ext/standard/tests/file/popen_pclose_basic-win32.phpt index 829a095ab1..dfb00fbeb2 100644 --- a/ext/standard/tests/file/popen_pclose_basic-win32.phpt +++ b/ext/standard/tests/file/popen_pclose_basic-win32.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) != 'WIN' ) echo "*** Testing popen(): reading from the pipe ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "Sample String"; $file_handle = popen(" echo $string", "r"); diff --git a/ext/standard/tests/file/popen_pclose_basic.phpt b/ext/standard/tests/file/popen_pclose_basic.phpt index c53db26db0..4e17c29cde 100644 --- a/ext/standard/tests/file/popen_pclose_basic.phpt +++ b/ext/standard/tests/file/popen_pclose_basic.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) == 'WIN' ) * Description: Closes process file pointer. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing popen() and pclose() with different processes ***\n"; @@ -64,7 +64,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirpath = $file_path."/popen_basic"; unlink($dirpath."/popen_basic.tmp"); unlink($dirpath."/popen_basic1.tmp"); diff --git a/ext/standard/tests/file/popen_pclose_error-sunos.phpt b/ext/standard/tests/file/popen_pclose_error-sunos.phpt index 8f87540395..ee015750b4 100644 --- a/ext/standard/tests/file/popen_pclose_error-sunos.phpt +++ b/ext/standard/tests/file/popen_pclose_error-sunos.phpt @@ -14,7 +14,7 @@ if( substr(PHP_OS, 0, 3) != 'Sun') * Prototype: int pclose ( resource handle ); * Description: Closes process file pointer. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing for error conditions ***\n"; var_dump( popen() ); // Zero Arguments var_dump( popen("abc.txt") ); // Single Argument @@ -28,7 +28,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/popen.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/popen_pclose_error.phpt b/ext/standard/tests/file/popen_pclose_error.phpt index 93ed5d946e..b0e86be65c 100644 --- a/ext/standard/tests/file/popen_pclose_error.phpt +++ b/ext/standard/tests/file/popen_pclose_error.phpt @@ -14,7 +14,7 @@ if (strtoupper( substr(PHP_OS, 0, 3) ) == 'SUN') * Prototype: int pclose ( resource handle ); * Description: Closes process file pointer. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing for error conditions ***\n"; var_dump( popen() ); // Zero Arguments var_dump( popen("abc.txt") ); // Single Argument @@ -28,7 +28,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/popen.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/readfile_basic-win32.phpt b/ext/standard/tests/file/readfile_basic-win32.phpt index 05e18a2099..06e0813d57 100644 --- a/ext/standard/tests/file/readfile_basic-win32.phpt +++ b/ext/standard/tests/file/readfile_basic-win32.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Outputs a file */ // common file used -require(dirname(__FILE__) . '/file.inc'); +require(__DIR__ . '/file.inc'); echo "*** Testing readfile() : basic functionality ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_prefix = "readfile_basic"; // temp files created with this prefix // the content that is filled into the temp files as created diff --git a/ext/standard/tests/file/readfile_basic.phpt b/ext/standard/tests/file/readfile_basic.phpt index e67fd58545..1c05f494a6 100644 --- a/ext/standard/tests/file/readfile_basic.phpt +++ b/ext/standard/tests/file/readfile_basic.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Outputs a file */ // common file used -require(dirname(__FILE__) . '/file.inc'); +require(__DIR__ . '/file.inc'); echo "*** Testing readfile() : basic functionality ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_prefix = "readfile_basic"; // temp files created with this prefix // the content that is filled into the temp files as created diff --git a/ext/standard/tests/file/readfile_error.phpt b/ext/standard/tests/file/readfile_error.phpt index fcaa7f3946..0dc1f7b82f 100644 --- a/ext/standard/tests/file/readfile_error.phpt +++ b/ext/standard/tests/file/readfile_error.phpt @@ -22,7 +22,7 @@ var_dump( readfile(__FILE__, false, '') ); // empty string as $context var_dump( readfile(__FILE__, true, false) ); // boolean false as $context echo "\n-- Testing readfile() with non-existent file --\n"; -$non_existent_file = dirname(__FILE__)."/non_existent_file.tmp"; +$non_existent_file = __DIR__."/non_existent_file.tmp"; var_dump( readfile($non_existent_file) ); echo "Done\n"; diff --git a/ext/standard/tests/file/readfile_variation1.phpt b/ext/standard/tests/file/readfile_variation1.phpt index 6bfe7ddd83..6348bb3dfe 100644 --- a/ext/standard/tests/file/readfile_variation1.phpt +++ b/ext/standard/tests/file/readfile_variation1.phpt @@ -10,7 +10,7 @@ Test readfile() function: usage variation - stream_context // include file.inc require("file.inc"); -$file_path = dirname(__FILE__); +$file_path = __DIR__; /* Variation 1 : Check working of third argument of readfile() */ @@ -32,7 +32,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/readfile_variation1.tmp"); +unlink(__DIR__."/readfile_variation1.tmp"); ?> --EXPECT-- *** Testing readfile(): checking third argument *** diff --git a/ext/standard/tests/file/readfile_variation2.phpt b/ext/standard/tests/file/readfile_variation2.phpt index 2fe1475501..029890404e 100644 --- a/ext/standard/tests/file/readfile_variation2.phpt +++ b/ext/standard/tests/file/readfile_variation2.phpt @@ -21,7 +21,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { // include file.inc require("file.inc"); -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp file used here $filename = "$file_path/readfile_variation2.tmp"; @@ -61,7 +61,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/readfile_variation2.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/readfile_variation3.phpt b/ext/standard/tests/file/readfile_variation3.phpt index a22b2b4044..b2571d3ac5 100644 --- a/ext/standard/tests/file/readfile_variation3.phpt +++ b/ext/standard/tests/file/readfile_variation3.phpt @@ -10,7 +10,7 @@ Test readfile() function: usage variation - include path // include file.inc require("file.inc"); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/readfile_variation3"; echo "*** Testing readfile(): checking second argument, include path ***\n"; @@ -40,8 +40,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/readfile_variation3/readfile_variation3.tmp"); -rmdir(dirname(__FILE__)."/readfile_variation3"); +unlink(__DIR__."/readfile_variation3/readfile_variation3.tmp"); +rmdir(__DIR__."/readfile_variation3"); ?> --EXPECT-- *** Testing readfile(): checking second argument, include path *** diff --git a/ext/standard/tests/file/readfile_variation7.phpt b/ext/standard/tests/file/readfile_variation7.phpt index b41721ae4f..601453573e 100644 --- a/ext/standard/tests/file/readfile_variation7.phpt +++ b/ext/standard/tests/file/readfile_variation7.phpt @@ -21,7 +21,7 @@ mkdir($thisTestDir); chdir($thisTestDir); $filename = "readFileVar7.tmp"; -$scriptLocFile = dirname(__FILE__)."/".$filename; +$scriptLocFile = __DIR__."/".$filename; $newpath = create_include_path(); set_include_path($newpath); diff --git a/ext/standard/tests/file/readfile_variation8-win32-mb.phpt b/ext/standard/tests/file/readfile_variation8-win32-mb.phpt index 76774b8260..4ca719266f 100644 --- a/ext/standard/tests/file/readfile_variation8-win32-mb.phpt +++ b/ext/standard/tests/file/readfile_variation8-win32-mb.phpt @@ -18,7 +18,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing readfile() : variation ***\n"; $mainDir = "readfileVarç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™8"; $subDir = "readfileVarç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™8Sub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); @@ -33,7 +33,7 @@ fclose($h); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/readfile_variation8-win32.phpt b/ext/standard/tests/file/readfile_variation8-win32.phpt index 0750c910a1..c914786407 100644 --- a/ext/standard/tests/file/readfile_variation8-win32.phpt +++ b/ext/standard/tests/file/readfile_variation8-win32.phpt @@ -18,7 +18,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing readfile() : variation ***\n"; $mainDir = "readfileVar8"; $subDir = "readfileVar8Sub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); @@ -33,7 +33,7 @@ fclose($h); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/readfile_variation9.phpt b/ext/standard/tests/file/readfile_variation9.phpt index 5f5804a81d..1d536e61f1 100644 --- a/ext/standard/tests/file/readfile_variation9.phpt +++ b/ext/standard/tests/file/readfile_variation9.phpt @@ -13,7 +13,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> echo "*** Testing readfile() : variation ***\n"; $mainDir = "readfileVar8"; $subDir = "readfileVar8Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); @@ -28,7 +28,7 @@ fclose($h); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $allDirs = array( // absolute paths diff --git a/ext/standard/tests/file/readlink_realpath_basic1.phpt b/ext/standard/tests/file/readlink_realpath_basic1.phpt index 6efe7f2d49..fa2056d076 100644 --- a/ext/standard/tests/file/readlink_realpath_basic1.phpt +++ b/ext/standard/tests/file/readlink_realpath_basic1.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { */ /* creating directories, symbolic links and files */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/readlink_realpath_basic1/home/test/", 0777, true); $file_handle1 = fopen("$file_path/readlink_realpath_basic1/home/test/readlink_realpath_basic1.tmp", "w"); @@ -60,7 +60,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/readlink_realpath_basic1"; +$name_prefix = __DIR__."/readlink_realpath_basic1"; unlink("$name_prefix/home/test/readlink_realpath_basic1.tmp"); unlink("$name_prefix/home/readlink_realpath_basic1.tmp"); unlink("$name_prefix/readlink_realpath_basic1.tmp"); diff --git a/ext/standard/tests/file/readlink_realpath_basic2.phpt b/ext/standard/tests/file/readlink_realpath_basic2.phpt index 91955cd4f5..104fba859d 100644 --- a/ext/standard/tests/file/readlink_realpath_basic2.phpt +++ b/ext/standard/tests/file/readlink_realpath_basic2.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { */ /* creating directories, symbolic links and files */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/readlink_realpath_basic2/home/test/", 0777, true); $file_handle1 = fopen("$file_path/readlink_realpath_basic2/home/test/readlink_realpath_basic2.tmp", "w"); @@ -52,7 +52,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/readlink_realpath_basic2"; +$name_prefix = __DIR__."/readlink_realpath_basic2"; unlink("$name_prefix/home/test/readlink_realpath_basic2.tmp"); unlink("$name_prefix/home/readlink_realpath_basic2.tmp"); unlink("$name_prefix/readlink_realpath_basic2.tmp"); diff --git a/ext/standard/tests/file/readlink_realpath_error.phpt b/ext/standard/tests/file/readlink_realpath_error.phpt index dc042bfff5..e2afb8bb36 100644 --- a/ext/standard/tests/file/readlink_realpath_error.phpt +++ b/ext/standard/tests/file/readlink_realpath_error.phpt @@ -20,20 +20,20 @@ var_dump( readlink() ); // args < expected var_dump( readlink(__FILE__, 2) ); // args > expected echo "\n*** Testing readlink() on a non-existent link ***\n"; -var_dump( readlink(dirname(__FILE__)."/readlink_error.tmp") ); +var_dump( readlink(__DIR__."/readlink_error.tmp") ); echo "\n*** Testing readlink() on existing file ***\n"; var_dump( readlink(__FILE__) ); echo "\n*** Testing readlink() on existing directory ***\n"; -var_dump( readlink(dirname(__FILE__)) ); +var_dump( readlink(__DIR__) ); echo "*** Testing realpath(): error conditions ***\n"; var_dump( realpath() ); // args < expected var_dump( realpath(1, 2) ); // args > expected echo "\n*** Testing realpath() on a non-existent file ***\n"; -var_dump( realpath(dirname(__FILE__)."/realpath_error.tmp") ); +var_dump( realpath(__DIR__."/realpath_error.tmp") ); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/readlink_realpath_variation1.phpt b/ext/standard/tests/file/readlink_realpath_variation1.phpt index ab1d955778..797badd914 100644 --- a/ext/standard/tests/file/readlink_realpath_variation1.phpt +++ b/ext/standard/tests/file/readlink_realpath_variation1.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { */ echo "*** Testing readlink() and realpath() : usage variations ***\n"; -$name_prefix = dirname(__FILE__); +$name_prefix = __DIR__; $filename = "$name_prefix/readlink_realpath_variation1/home/tests/link/readlink_realpath_variation1.tmp"; mkdir("$name_prefix/readlink_realpath_variation1/home/tests/link/", 0777, true); @@ -65,7 +65,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/readlink_realpath_variation1"; +$name_prefix = __DIR__."/readlink_realpath_variation1"; unlink("$name_prefix/home/tests/link/readlink_realpath_variation1.tmp"); rmdir("$name_prefix/home/tests/link/"); rmdir("$name_prefix/home/tests/"); diff --git a/ext/standard/tests/file/readlink_realpath_variation2.phpt b/ext/standard/tests/file/readlink_realpath_variation2.phpt index c7add6b037..82deabecb6 100644 --- a/ext/standard/tests/file/readlink_realpath_variation2.phpt +++ b/ext/standard/tests/file/readlink_realpath_variation2.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { */ echo "*** Testing readlink() and realpath() : usage variations ***\n"; -$name_prefix = dirname(__FILE__); +$name_prefix = __DIR__; // create temp dir mkdir("$name_prefix/readlink_realpath_variation2/home/tests/link/", 0777, true); // create the file @@ -60,7 +60,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/readlink_realpath_variation2"; +$name_prefix = __DIR__."/readlink_realpath_variation2"; unlink("$name_prefix/home/tests/link/readlink_realpath_variation2.tmp"); rmdir("$name_prefix/home/tests/link/"); rmdir("$name_prefix/home/tests/"); diff --git a/ext/standard/tests/file/readlink_variation1.phpt b/ext/standard/tests/file/readlink_variation1.phpt index c350a94c77..5ca25e8b2e 100644 --- a/ext/standard/tests/file/readlink_variation1.phpt +++ b/ext/standard/tests/file/readlink_variation1.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Testing readlink() with invalid arguments -int, float, bool, NULL, resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen($file_path."/readlink_variation2.tmp", "w"); echo "*** Testing Invalid file types ***\n"; @@ -44,7 +44,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/readlink_variation2.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/realpath_basic-win32-mb.phpt b/ext/standard/tests/file/realpath_basic-win32-mb.phpt index dbfdfc41d6..e56d213631 100644 --- a/ext/standard/tests/file/realpath_basic-win32-mb.phpt +++ b/ext/standard/tests/file/realpath_basic-win32-mb.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "\n*** Testing basic functions of realpath() with files ***\n"; /* creating directories and files */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic/home/test/", 0777, true); $file_handle1 = fopen("$file_path/realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic/home/test/realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic.tmp", "w"); @@ -53,7 +53,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic"; +$name_prefix = __DIR__."/realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic"; unlink("$name_prefix/home/test/realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic.tmp"); unlink("$name_prefix/home/realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic.tmp"); unlink("$name_prefix/realpath_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™basic.tmp"); diff --git a/ext/standard/tests/file/realpath_basic-win32.phpt b/ext/standard/tests/file/realpath_basic-win32.phpt index a768ca9540..e8020d199e 100644 --- a/ext/standard/tests/file/realpath_basic-win32.phpt +++ b/ext/standard/tests/file/realpath_basic-win32.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "\n*** Testing basic functions of realpath() with files ***\n"; /* creating directories and files */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/realpath_basic/home/test/", 0777, true); $file_handle1 = fopen("$file_path/realpath_basic/home/test/realpath_basic.tmp", "w"); @@ -53,7 +53,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/realpath_basic"; +$name_prefix = __DIR__."/realpath_basic"; unlink("$name_prefix/home/test/realpath_basic.tmp"); unlink("$name_prefix/home/realpath_basic.tmp"); unlink("$name_prefix/realpath_basic.tmp"); diff --git a/ext/standard/tests/file/realpath_basic3.phpt b/ext/standard/tests/file/realpath_basic3.phpt index ce9385591d..0feccfc150 100644 --- a/ext/standard/tests/file/realpath_basic3.phpt +++ b/ext/standard/tests/file/realpath_basic3.phpt @@ -9,7 +9,7 @@ Test realpath() with relative paths echo "\n*** Testing basic functions of realpath() with files ***\n"; /* creating directories and files */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/realpath_basic/home/test/", 0777, true); $file_handle1 = fopen("$file_path/realpath_basic/home/test/realpath_basic.tmp", "w"); @@ -50,7 +50,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/realpath_basic"; +$name_prefix = __DIR__."/realpath_basic"; unlink("$name_prefix/home/test/realpath_basic.tmp"); unlink("$name_prefix/home/realpath_basic.tmp"); unlink("$name_prefix/realpath_basic.tmp"); diff --git a/ext/standard/tests/file/realpath_basic4.phpt b/ext/standard/tests/file/realpath_basic4.phpt index d782b6d618..9001e23553 100644 --- a/ext/standard/tests/file/realpath_basic4.phpt +++ b/ext/standard/tests/file/realpath_basic4.phpt @@ -8,7 +8,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { ?> --FILE-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; @mkdir("$file_path/realpath_basic/home/test", 0777, true); @symlink("$file_path/realpath_basic/home", "$file_path/realpath_basic/link1"); @symlink("$file_path/realpath_basic/link1", "$file_path/realpath_basic/link2"); @@ -17,7 +17,7 @@ echo "2. " . realpath("$file_path/realpath_basic/link2/test") . "\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/realpath_basic/link2"); unlink("$file_path/realpath_basic/link1"); rmdir("$file_path/realpath_basic/home/test"); diff --git a/ext/standard/tests/file/realpath_variation-win32-mb.phpt b/ext/standard/tests/file/realpath_variation-win32-mb.phpt index 25ea530894..f0b79a0fd3 100644 --- a/ext/standard/tests/file/realpath_variation-win32-mb.phpt +++ b/ext/standard/tests/file/realpath_variation-win32-mb.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Returns canonicalized absolute pathname */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing realpath(): usage variations ***\n"; -$name_prefix = dirname(__FILE__); +$name_prefix = __DIR__; $filename = "$name_prefix/realpath_variation_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/home/tests/realpath_variation_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"; mkdir("$name_prefix/realpath_variation_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/home/tests/", 0777, true); @@ -69,7 +69,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/realpath_variation_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"; +$name_prefix = __DIR__."/realpath_variation_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"; unlink("$name_prefix/home/tests/realpath_variation_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"); rmdir("$name_prefix/home/tests/"); rmdir("$name_prefix/home/"); diff --git a/ext/standard/tests/file/realpath_variation-win32.phpt b/ext/standard/tests/file/realpath_variation-win32.phpt index 8049d4c69a..a685beb20b 100644 --- a/ext/standard/tests/file/realpath_variation-win32.phpt +++ b/ext/standard/tests/file/realpath_variation-win32.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Returns canonicalized absolute pathname */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing realpath(): usage variations ***\n"; -$name_prefix = dirname(__FILE__); +$name_prefix = __DIR__; $filename = "$name_prefix/realpath_variation/home/tests/realpath_variation.tmp"; mkdir("$name_prefix/realpath_variation/home/tests/", 0777, true); @@ -69,7 +69,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/realpath_variation"; +$name_prefix = __DIR__."/realpath_variation"; unlink("$name_prefix/home/tests/realpath_variation.tmp"); rmdir("$name_prefix/home/tests/"); rmdir("$name_prefix/home/"); diff --git a/ext/standard/tests/file/rename_basic.phpt b/ext/standard/tests/file/rename_basic.phpt index 238333e776..49de9ac042 100644 --- a/ext/standard/tests/file/rename_basic.phpt +++ b/ext/standard/tests/file/rename_basic.phpt @@ -7,7 +7,7 @@ Test rename() function: basic functionality */ echo "*** Testing rename() on non-existing file ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; $src_name = "$file_path/rename_basic.tmp"; @@ -34,7 +34,7 @@ var_dump( compare_stats($old_stat, $new_stat, $keys_to_compare) ); ===Done=== --CLEAN-- <?php -unlink(dirname(__FILE__)."/rename_basic_new.tmp"); +unlink(__DIR__."/rename_basic_new.tmp"); ?> --EXPECT-- *** Testing rename() on non-existing file *** diff --git a/ext/standard/tests/file/rename_variation-win32.phpt b/ext/standard/tests/file/rename_variation-win32.phpt index 9aed95a189..9b194c689c 100644 --- a/ext/standard/tests/file/rename_variation-win32.phpt +++ b/ext/standard/tests/file/rename_variation-win32.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Renames a file or directory */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; /* create directory */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/rename_variation"); /* rename files across directories */ @@ -56,7 +56,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation_link.tmp"); unlink($file_path."/rename_variation.tmp"); rmdir($file_path."/rename_variation_dir"); diff --git a/ext/standard/tests/file/rename_variation.phpt b/ext/standard/tests/file/rename_variation.phpt index 2f25d193f5..c347a223fc 100644 --- a/ext/standard/tests/file/rename_variation.phpt +++ b/ext/standard/tests/file/rename_variation.phpt @@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { <?php /* creating directory */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/rename_variation"); /* rename files across directories */ diff --git a/ext/standard/tests/file/rename_variation1-win32.phpt b/ext/standard/tests/file/rename_variation1-win32.phpt index 764ba1cac4..c07aa3f6c1 100644 --- a/ext/standard/tests/file/rename_variation1-win32.phpt +++ b/ext/standard/tests/file/rename_variation1-win32.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Renames a file or directory */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; /* creating directory */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // rename dirs across directories echo "\n*** Testing rename() : renaming directory across directories ***\n"; @@ -58,7 +58,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation_link.tmp"); unlink($file_path."/rename_variation.tmp"); rmdir($file_path."/rename_variation_dir"); diff --git a/ext/standard/tests/file/rename_variation1.phpt b/ext/standard/tests/file/rename_variation1.phpt index 2998189bf2..46a10b24ea 100644 --- a/ext/standard/tests/file/rename_variation1.phpt +++ b/ext/standard/tests/file/rename_variation1.phpt @@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { <?php /* creating directory */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // rename dirs across directories echo "\n*** Testing rename() : renaming directory across directories ***\n"; @@ -51,7 +51,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir($file_path."/rename_variation1_dir"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/rename_variation11-win32.phpt b/ext/standard/tests/file/rename_variation11-win32.phpt index bf93ecd450..fbf358f79b 100644 --- a/ext/standard/tests/file/rename_variation11-win32.phpt +++ b/ext/standard/tests/file/rename_variation11-win32.phpt @@ -18,7 +18,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing rename() with absolute and relative paths ***\n"; $mainDir = "renameVar11"; $subDir = "renameVar11Sub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); @@ -27,7 +27,7 @@ $fromFile = "renameMe.tmp"; $toFile = "IwasRenamed.tmp"; $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); diff --git a/ext/standard/tests/file/rename_variation12-win32.phpt b/ext/standard/tests/file/rename_variation12-win32.phpt index 0457976ea1..2c5b4a0ea8 100644 --- a/ext/standard/tests/file/rename_variation12-win32.phpt +++ b/ext/standard/tests/file/rename_variation12-win32.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') die('skip.. for Windows'); echo "*** Testing rename() with absolute and relative paths ***\n"; $mainDir = "renameVar11"; $subDir = "renameVar11Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); @@ -28,7 +28,7 @@ $fromFile = "renameMe.tmp"; $toFile = "IwasRenamed.tmp"; $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $allDirs = array( // absolute paths diff --git a/ext/standard/tests/file/rename_variation12.phpt b/ext/standard/tests/file/rename_variation12.phpt index a423496fbc..e2193a4fb9 100644 --- a/ext/standard/tests/file/rename_variation12.phpt +++ b/ext/standard/tests/file/rename_variation12.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') die('skip.. not for Windows'); echo "*** Testing rename() with absolute and relative paths ***\n"; $mainDir = "renameVar11"; $subDir = "renameVar11Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); @@ -28,7 +28,7 @@ $fromFile = "renameMe.tmp"; $toFile = "IwasRenamed.tmp"; $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $allDirs = array( // absolute paths diff --git a/ext/standard/tests/file/rename_variation13-win32.phpt b/ext/standard/tests/file/rename_variation13-win32.phpt Binary files differindex 6319d4ad61..d8db734e38 100644 --- a/ext/standard/tests/file/rename_variation13-win32.phpt +++ b/ext/standard/tests/file/rename_variation13-win32.phpt diff --git a/ext/standard/tests/file/rename_variation13.phpt b/ext/standard/tests/file/rename_variation13.phpt index 2686150f23..1cadd8a438 100644 --- a/ext/standard/tests/file/rename_variation13.phpt +++ b/ext/standard/tests/file/rename_variation13.phpt @@ -16,7 +16,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") */ echo "*** Testing rename() with obscure files ***\n"; -$file_path = dirname(__FILE__)."/renameVar13"; +$file_path = __DIR__."/renameVar13"; $aFile = $file_path.'/afile.tmp'; mkdir($file_path); diff --git a/ext/standard/tests/file/rename_variation2-win32.phpt b/ext/standard/tests/file/rename_variation2-win32.phpt index cc01b928e5..86b5f71837 100644 --- a/ext/standard/tests/file/rename_variation2-win32.phpt +++ b/ext/standard/tests/file/rename_variation2-win32.phpt @@ -12,9 +12,9 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Renames a file or directory */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/rename_variation2_dir"); /* Renaming a file and directory to numeric name */ @@ -44,7 +44,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation2_link.tmp"); unlink($file_path."/rename_variation2.tmp"); rmdir($file_path."/rename_variation2_dir"); diff --git a/ext/standard/tests/file/rename_variation2.phpt b/ext/standard/tests/file/rename_variation2.phpt index d80a939b33..9a3ccf4da2 100644 --- a/ext/standard/tests/file/rename_variation2.phpt +++ b/ext/standard/tests/file/rename_variation2.phpt @@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dest_dir = "$file_path/rename_variation2_dir"; // create the $dest_dir @@ -48,7 +48,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation2.tmp"); rmdir($file_path."/rename_variation2_dir"); ?> diff --git a/ext/standard/tests/file/rename_variation3-win32.phpt b/ext/standard/tests/file/rename_variation3-win32.phpt index 9f282a4661..b14b814295 100644 --- a/ext/standard/tests/file/rename_variation3-win32.phpt +++ b/ext/standard/tests/file/rename_variation3-win32.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Renames a file or directory */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; /* creating directory */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/rename_variation3_dir"; mkdir($dirname); @@ -54,7 +54,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation3_link.tmp"); unlink($file_path."/rename_variation3.tmp"); rmdir($file_path."/rename_variation3_dir"); diff --git a/ext/standard/tests/file/rename_variation3.phpt b/ext/standard/tests/file/rename_variation3.phpt index d76cdd09ef..173845e2e7 100644 --- a/ext/standard/tests/file/rename_variation3.phpt +++ b/ext/standard/tests/file/rename_variation3.phpt @@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dest_dir = "$file_path/rename_variation3_dir"; // create the $dest_dir @@ -43,7 +43,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation3_hard_link1.tmp"); rmdir($file_path."/rename_variation3_dir"); ?> diff --git a/ext/standard/tests/file/rename_variation4.phpt b/ext/standard/tests/file/rename_variation4.phpt index b6cab73d60..710539617e 100644 --- a/ext/standard/tests/file/rename_variation4.phpt +++ b/ext/standard/tests/file/rename_variation4.phpt @@ -9,9 +9,9 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; /* Renaming a file, link and directory to numeric name */ echo "\n*** Testing rename() by renaming a file, link and directory to numeric name ***\n"; @@ -37,7 +37,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir($file_path."/12345"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/rename_variation5.phpt b/ext/standard/tests/file/rename_variation5.phpt index 8ea2499eed..04a4e23c7c 100644 --- a/ext/standard/tests/file/rename_variation5.phpt +++ b/ext/standard/tests/file/rename_variation5.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test rename() by trying to rename an existing file/dir/link to the same name and one another */ // create a dir -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/rename_variation5_dir"; mkdir($dirname); //create a file @@ -53,7 +53,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation5_link.tmp"); unlink($file_path."/rename_variation5.tmp"); rmdir($file_path."/rename_variation5_dir"); diff --git a/ext/standard/tests/file/rename_variation7-win32.phpt b/ext/standard/tests/file/rename_variation7-win32.phpt index 845728627b..fb7c805cbf 100644 --- a/ext/standard/tests/file/rename_variation7-win32.phpt +++ b/ext/standard/tests/file/rename_variation7-win32.phpt @@ -11,7 +11,7 @@ if (!function_exists("symlink")) die("skip symlinks are not supported"); $tmp_link = __FILE__.".tmp.link"; $tmp_link2 = __FILE__.".tmp.link2"; -if (symlink(dirname(__FILE__)."/there_is_no_such_file", $tmp_link)) { +if (symlink(__DIR__."/there_is_no_such_file", $tmp_link)) { rename($tmp_link, $tmp_link2); } diff --git a/ext/standard/tests/file/rename_variation7.phpt b/ext/standard/tests/file/rename_variation7.phpt index dc5ce429b6..6ae52bc685 100644 --- a/ext/standard/tests/file/rename_variation7.phpt +++ b/ext/standard/tests/file/rename_variation7.phpt @@ -11,7 +11,7 @@ if (!function_exists("symlink")) die("skip symlinks are not supported"); $tmp_link = __FILE__.".tmp.link"; $tmp_link2 = __FILE__.".tmp.link2"; -symlink(dirname(__FILE__)."/there_is_no_such_file", $tmp_link); +symlink(__DIR__."/there_is_no_such_file", $tmp_link); rename($tmp_link, $tmp_link2); clearstatcache(); diff --git a/ext/standard/tests/file/rename_variation8-win32.phpt b/ext/standard/tests/file/rename_variation8-win32.phpt index 5fbe126305..df0fd55bb7 100644 --- a/ext/standard/tests/file/rename_variation8-win32.phpt +++ b/ext/standard/tests/file/rename_variation8-win32.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') die('skip.. for Windows'); */ echo "\n*** Testing rename() on non-existing file ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // try renaming a non existing file $src_name = $file_path."/non_existent_file.tmp"; @@ -45,7 +45,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/rename_basic_dir1"); +rmdir(__DIR__."/rename_basic_dir1"); ?> --EXPECTF-- *** Testing rename() on non-existing file *** diff --git a/ext/standard/tests/file/rename_variation8.phpt b/ext/standard/tests/file/rename_variation8.phpt index 58235aa626..660925b61f 100644 --- a/ext/standard/tests/file/rename_variation8.phpt +++ b/ext/standard/tests/file/rename_variation8.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') die('skip.. not for Windows'); */ echo "\n*** Testing rename() on non-existing file ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // try renaming a non existing file $src_name = $file_path."/non_existent_file.tmp"; @@ -45,8 +45,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/rename_basic_new2.tmp"); -rmdir(dirname(__FILE__)."/rename_basic_dir1"); +unlink(__DIR__."/rename_basic_new2.tmp"); +rmdir(__DIR__."/rename_basic_dir1"); ?> --EXPECTF-- *** Testing rename() on non-existing file *** diff --git a/ext/standard/tests/file/rename_variation9.phpt b/ext/standard/tests/file/rename_variation9.phpt index 42897761b2..c90345be4e 100644 --- a/ext/standard/tests/file/rename_variation9.phpt +++ b/ext/standard/tests/file/rename_variation9.phpt @@ -7,7 +7,7 @@ Test rename() function: basic functionality */ echo "\n*** Testing rename() by giving stream context as third argument ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $context = stream_context_create(); @@ -38,8 +38,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/rename_variation9_new.tmp"); -rmdir(dirname(__FILE__)."/rename_variation_dir9_new"); +unlink(__DIR__."/rename_variation9_new.tmp"); +rmdir(__DIR__."/rename_variation_dir9_new"); ?> --EXPECT-- *** Testing rename() by giving stream context as third argument *** diff --git a/ext/standard/tests/file/stat_basic-win32-mb.phpt b/ext/standard/tests/file/stat_basic-win32-mb.phpt index 8ab15518b8..504e0f45ea 100644 --- a/ext/standard/tests/file/stat_basic-win32-mb.phpt +++ b/ext/standard/tests/file/stat_basic-win32-mb.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require("$file_path/file.inc"); echo "*** Testing stat() : basic functionality ***\n"; @@ -64,7 +64,7 @@ echo "\n---Done---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_basic_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/stat_basic_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"); rmdir("$file_path/stat_basic_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"); ?> diff --git a/ext/standard/tests/file/stat_basic-win32.phpt b/ext/standard/tests/file/stat_basic-win32.phpt index 14dbed311a..348ac2d380 100644 --- a/ext/standard/tests/file/stat_basic-win32.phpt +++ b/ext/standard/tests/file/stat_basic-win32.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require("$file_path/file.inc"); echo "*** Testing stat() : basic functionality ***\n"; @@ -64,7 +64,7 @@ echo "\n---Done---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_basic/stat_basic.tmp"); rmdir("$file_path/stat_basic"); ?> diff --git a/ext/standard/tests/file/stat_error-win32.phpt b/ext/standard/tests/file/stat_error-win32.phpt index 20bffc79df..735a17cb26 100644 --- a/ext/standard/tests/file/stat_error-win32.phpt +++ b/ext/standard/tests/file/stat_error-win32.phpt @@ -13,13 +13,13 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $arr = array(__FILE__); echo "\n*** Testing stat() for error conditions ***\n"; var_dump( stat() ); // args < expected var_dump( stat(__FILE__, 2) ); // file, args > expected -var_dump( stat(dirname(__FILE__), 2) ); //dir, args > expected +var_dump( stat(__DIR__, 2) ); //dir, args > expected var_dump( stat("$file_path/temp.tmp") ); // non existing file var_dump( stat("$file_path/temp/") ); // non existing dir diff --git a/ext/standard/tests/file/stat_variation1-win32-mb.phpt b/ext/standard/tests/file/stat_variation1-win32-mb.phpt index 36ce34dea6..1db467632b 100644 --- a/ext/standard/tests/file/stat_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/stat_variation1-win32-mb.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects of rename() on stats of dir/file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -72,7 +72,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation1a_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.tmp"); rmdir("$file_path/stat_variation1a_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"); ?> diff --git a/ext/standard/tests/file/stat_variation1-win32.phpt b/ext/standard/tests/file/stat_variation1-win32.phpt index eae08fcb28..26b1549e02 100644 --- a/ext/standard/tests/file/stat_variation1-win32.phpt +++ b/ext/standard/tests/file/stat_variation1-win32.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects of rename() on stats of dir/file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -72,7 +72,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation1a.tmp"); rmdir("$file_path/stat_variation1a"); ?> diff --git a/ext/standard/tests/file/stat_variation2-win32.phpt b/ext/standard/tests/file/stat_variation2-win32.phpt index 7877188833..2d4f44bf02 100644 --- a/ext/standard/tests/file/stat_variation2-win32.phpt +++ b/ext/standard/tests/file/stat_variation2-win32.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects of writing to a file on the stats of the file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -50,7 +50,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation2.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/stat_variation3-win32.phpt b/ext/standard/tests/file/stat_variation3-win32.phpt index 46537c6d0f..c59d0b10ec 100644 --- a/ext/standard/tests/file/stat_variation3-win32.phpt +++ b/ext/standard/tests/file/stat_variation3-win32.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects of creating & deleting of subdir/file on the stats of dir/file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -61,7 +61,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/stat_variation3"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/stat_variation4-win32.phpt b/ext/standard/tests/file/stat_variation4-win32.phpt index 5f52f8b8e5..d95eaaa2a7 100644 --- a/ext/standard/tests/file/stat_variation4-win32.phpt +++ b/ext/standard/tests/file/stat_variation4-win32.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects on the stats of dir/file for using is_dir() & is_file() on dir/file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -70,7 +70,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation4.tmp"); rmdir("$file_path/stat_variation4"); ?> diff --git a/ext/standard/tests/file/stat_variation5-win32.phpt b/ext/standard/tests/file/stat_variation5-win32.phpt index 4edca599d1..9f188bb307 100644 --- a/ext/standard/tests/file/stat_variation5-win32.phpt +++ b/ext/standard/tests/file/stat_variation5-win32.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the stats of file opened in write mode and then same in read mode */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -51,7 +51,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation5.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/stat_variation6-win32.phpt b/ext/standard/tests/file/stat_variation6-win32.phpt index 496ccac768..cf38bd3150 100644 --- a/ext/standard/tests/file/stat_variation6-win32.phpt +++ b/ext/standard/tests/file/stat_variation6-win32.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects on the stats of dir/file for changing permissions of dir/file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -69,7 +69,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation6.tmp"); rmdir("$file_path/stat_variation6"); ?> diff --git a/ext/standard/tests/file/stat_variation7-win32.phpt b/ext/standard/tests/file/stat_variation7-win32.phpt index 2c8868b82d..320db156d4 100644 --- a/ext/standard/tests/file/stat_variation7-win32.phpt +++ b/ext/standard/tests/file/stat_variation7-win32.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the stats of dir/file when their names are stored in objects */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -63,7 +63,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation7.tmp"); unlink("$file_path/stat_variation7a.tmp"); rmdir("$file_path/stat_variation7"); diff --git a/ext/standard/tests/file/stat_variation8-win32.phpt b/ext/standard/tests/file/stat_variation8-win32.phpt index 0ecd956594..7a0cf65d41 100644 --- a/ext/standard/tests/file/stat_variation8-win32.phpt +++ b/ext/standard/tests/file/stat_variation8-win32.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects of truncate() on stats of file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -62,7 +62,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation8.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/stream_copy_to_stream.phpt b/ext/standard/tests/file/stream_copy_to_stream.phpt index 1cc57b7f6d..b0c2d13846 100644 --- a/ext/standard/tests/file/stream_copy_to_stream.phpt +++ b/ext/standard/tests/file/stream_copy_to_stream.phpt @@ -4,8 +4,8 @@ stream_copy_to_stream() tests <?php define('WIN', substr(PHP_OS, 0, 3) == 'WIN'); -$initial_file = dirname(__FILE__).'/bug38086.txt'; -$new_file = dirname(__FILE__).'/bug38086_1.txt'; +$initial_file = __DIR__.'/bug38086.txt'; +$new_file = __DIR__.'/bug38086_1.txt'; $src = fopen($initial_file, 'r'); stream_filter_append($src, "string.rot13", STREAM_FILTER_READ); diff --git a/ext/standard/tests/file/stream_get_line.phpt b/ext/standard/tests/file/stream_get_line.phpt index 2c11f00eed..9421bd44c1 100644 --- a/ext/standard/tests/file/stream_get_line.phpt +++ b/ext/standard/tests/file/stream_get_line.phpt @@ -2,7 +2,7 @@ Crash inside stream_get_line(), when length=0 --FILE-- <?php -$path = dirname(__FILE__) . '/test.html'; +$path = __DIR__ . '/test.html'; file_put_contents($path, "foo<br>bar<br>foo"); $fp = fopen($path, "r"); diff --git a/ext/standard/tests/file/stream_rfc2397_003.phpt b/ext/standard/tests/file/stream_rfc2397_003.phpt index c92142d22a..291b1301c5 100644 --- a/ext/standard/tests/file/stream_rfc2397_003.phpt +++ b/ext/standard/tests/file/stream_rfc2397_003.phpt @@ -21,7 +21,7 @@ hhx4dbgYKAAA7', foreach($streams as $original => $stream) { if (is_string($original)) { - var_dump(file_get_contents(dirname(__FILE__) . '/' . $original) == file_get_contents($stream)); + var_dump(file_get_contents(__DIR__ . '/' . $original) == file_get_contents($stream)); } else { var_dump(file_get_contents($stream)); } diff --git a/ext/standard/tests/file/symlink.phpt b/ext/standard/tests/file/symlink.phpt index 228e459297..3afbfe6411 100644 --- a/ext/standard/tests/file/symlink.phpt +++ b/ext/standard/tests/file/symlink.phpt @@ -9,8 +9,8 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- <?php -$filename = dirname(__FILE__)."/symlink.dat"; -$link = dirname(__FILE__)."/symlink.link"; +$filename = __DIR__."/symlink.dat"; +$link = __DIR__."/symlink.link"; var_dump(symlink($filename, $link)); var_dump(readlink($link)); @@ -21,7 +21,7 @@ var_dump(readlink($link)); var_dump(linkinfo($link)); touch($filename); -var_dump(symlink($filename, dirname(__FILE__))); +var_dump(symlink($filename, __DIR__)); @unlink($link); var_dump(symlink($filename, $link)); diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt index 09fb35c973..89d6478d73 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt @@ -21,7 +21,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gets information about a link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dir created in present working directory $dirname = "symlink_link_linkinfo_is_link_basic1"; @@ -85,7 +85,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$dirname = dirname(__FILE__)."/symlink_link_linkinfo_is_link_basic1"; +$dirname = __DIR__."/symlink_link_linkinfo_is_link_basic1"; unlink("$dirname/symlink_link_linkinfo_is_link_basic1.tmp"); rmdir($dirname); ?> diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt index 4df4872f35..fad0987540 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt @@ -21,7 +21,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gets information about a link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing symlink(), linkinfo(), link() and is_link() : basic functionality ***\n"; @@ -66,7 +66,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$dirname = dirname(__FILE__)."/symlink_link_linkinfo_is_link_basic2"; +$dirname = __DIR__."/symlink_link_linkinfo_is_link_basic2"; rmdir($dirname); ?> --EXPECTF-- 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 7e8b5b24cf..ddee40ecdd 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 @@ -25,12 +25,12 @@ if (substr(PHP_OS, 0, 3) == 'SUN') { */ // create temp $filename and create link $linkname to it -$filename = dirname(__FILE__)."/symlink_link_linkinfo_is_link_error1.tmp"; +$filename = __DIR__."/symlink_link_linkinfo_is_link_error1.tmp"; $fp = fopen($filename, "w"); // create temp file fclose($fp); // linkname used to create soft/hard link -$linkname = dirname(__FILE__)."/symlink_link_linkinfo_is_link_link_error1.tmp"; +$linkname = __DIR__."/symlink_link_linkinfo_is_link_link_error1.tmp"; echo "*** Testing symlink() for error conditions ***\n"; //zero arguments @@ -63,8 +63,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/symlink_link_linkinfo_is_link_error1.tmp"); -@unlink(dirname(__FILE__)."/symlink_link_linkinfo_is_link_link_error1.tmp"); +unlink(__DIR__."/symlink_link_linkinfo_is_link_error1.tmp"); +@unlink(__DIR__."/symlink_link_linkinfo_is_link_link_error1.tmp"); ?> --EXPECTF-- *** Testing symlink() for error conditions *** 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 fc891fde7b..7e22741aa8 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 @@ -22,12 +22,12 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { */ // create temp $filename and create link $linkname to it -$filename = dirname(__FILE__)."/symlink_link_linkinfo_is_link_error2.tmp"; +$filename = __DIR__."/symlink_link_linkinfo_is_link_error2.tmp"; $fp = fopen($filename, "w"); // create temp file fclose($fp); // linkname used to create soft/hard link -$linkname = dirname(__FILE__)."/symlink_link_linkinfo_is_link_link_error2.tmp"; +$linkname = __DIR__."/symlink_link_linkinfo_is_link_link_error2.tmp"; echo "*** Testing link() for error conditions ***\n"; //zero arguments @@ -63,7 +63,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/symlink_link_linkinfo_is_link_error2.tmp"); +unlink(__DIR__."/symlink_link_linkinfo_is_link_error2.tmp"); ?> --EXPECTF-- *** Testing link() for error conditions *** diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt index 12e5da17e8..4daaba4aa9 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt @@ -24,7 +24,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Variation 1 : Creating links across directories where linkname is stored as an object and array member */ // creating temp directory which will contain temp file and links created -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/symlink_link_linkinfo_is_link_variation1/test/home"; mkdir($dirname, 0777, true); @@ -102,7 +102,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/symlink_link_linkinfo_is_link_variation1"; unlink("$dirname/symlink_link_linkinfo_is_link_variation1.tmp"); rmdir("$dirname/test/home"); diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt index 6ee6f12429..c88e426e6c 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt @@ -23,7 +23,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Variation 2 : Create hard link to non-existent file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // non-existing filename $non_existent_file = "$file_path/non_existent_file_variation2.tmp"; // non-existing linkname diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation3.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation3.phpt index edb2889d41..8207b698f3 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation3.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation3.phpt @@ -27,7 +27,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Check size of file and soft link link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Accessing and updating data of file through soft link ***\n"; // Creating file and inserting data into it $filename = "$file_path/symlink_link_linkinfo_is_link_variation3.tmp"; diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt index c69d2d2b04..5bcf472447 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt @@ -26,7 +26,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Update the file through hard link Check size of file and hard link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Accessing and updating data of file through hard link ***\n"; // Creating file and inserting data into it diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation5.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation5.phpt index f7d27748ee..fe6edcdd90 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation5.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation5.phpt @@ -23,7 +23,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Variation 5 : Creating link, deleting it and checking linkinfo(), is_link() on it */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing linkinfo() and is_link() on deleted link ***\n"; // link name used here @@ -58,7 +58,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/symlink_link_linkinfo_is_link_variation5"; $filename = "$dirname/symlink_link_linkinfo_is_link_variation5.tmp"; unlink($filename); diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt index ddebad4f8c..3a829580ea 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt @@ -7,7 +7,7 @@ if ( substr(PHP_OS, 0, 3) == 'WIN' ) { } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/symlink_link_linkinfo_is_link6_check_root.tmp"; +$filename = __DIR__."/symlink_link_linkinfo_is_link6_check_root.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -33,7 +33,7 @@ unlink($filename); */ /* Variation 6 : Change permission of directory and try creating links inside that directory */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Creating links in a directory without permission to allow the operation ***\n"; // temp file used @@ -67,7 +67,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/symlink_link_linkinfo_is_link_variation6"; $filename = "$dirname/symlink_link_linkinfo_is_link_variation6.tmp"; if(file_exists($filename)) { diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt index df63dcfc5d..ee49aaa5c9 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt @@ -24,7 +24,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Variation 7 : Create soft/hard link to itself */ // temp file used -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir = "$file_path/symlink_link_linkinfo_is_link_variation7"; $filename = "$dir/symlink_link_linkinfo_is_link_variation7.tmp"; // link name used @@ -65,7 +65,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir = "$file_path/symlink_link_linkinfo_is_link_variation7"; $filename = "$dir/symlink_link_linkinfo_is_link_variation7.tmp"; unlink($filename); diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt index 27b8f58ef8..883ea59884 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt @@ -26,7 +26,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* creating link to a file in different dir with the same name as the file */ echo "\n*** Create hard link in different directory with same filename ***\n"; // temp file used -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/symlink_link_linkinfo_is_link_variation8.tmp"; // temp link name used $dirname = "$file_path/symlink_link_linkinfo_is_link1_variation8"; diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt index 8a771b27b9..04daa591b0 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt @@ -25,7 +25,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Check linkinfo() value with lstat['dev'] */ // temp file used -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = $file_path."/symlink_link_linkinfo_is_link_variation9"; mkdir($dirname); $filename = "$dirname/symlink_link_linkinfo_is_link_variation9.tmp"; @@ -91,7 +91,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = $file_path."/symlink_link_linkinfo_is_link_variation9"; $filename = "$dirname/symlink_link_linkinfo_is_link_variation9.tmp"; unlink($filename); diff --git a/ext/standard/tests/file/tempnam_variation1-win32-mb.phpt b/ext/standard/tests/file/tempnam_variation1-win32-mb.phpt index 3e659c092c..99450dce02 100644 --- a/ext/standard/tests/file/tempnam_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/tempnam_variation1-win32-mb.phpt @@ -13,7 +13,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Creating number of unique files by passing a file name as prefix */ -$file_path = dirname(__FILE__)."/tempnamVar1_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"; +$file_path = __DIR__."/tempnamVar1_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"; mkdir($file_path); echo "*** Testing tempnam() in creation of unique files ***\n"; diff --git a/ext/standard/tests/file/tempnam_variation1-win32.phpt b/ext/standard/tests/file/tempnam_variation1-win32.phpt index a571a7cd5b..5094fa4e88 100644 --- a/ext/standard/tests/file/tempnam_variation1-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation1-win32.phpt @@ -13,7 +13,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Creating number of unique files by passing a file name as prefix */ -$file_path = dirname(__FILE__)."/tempnamVar1"; +$file_path = __DIR__."/tempnamVar1"; mkdir($file_path); echo "*** Testing tempnam() in creation of unique files ***\n"; diff --git a/ext/standard/tests/file/tempnam_variation1.phpt b/ext/standard/tests/file/tempnam_variation1.phpt index dbdc396656..762b4eab73 100644 --- a/ext/standard/tests/file/tempnam_variation1.phpt +++ b/ext/standard/tests/file/tempnam_variation1.phpt @@ -13,7 +13,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Creating number of unique files by passing a file name as prefix */ -$file_path = dirname(__FILE__)."/tempnamVar1"; +$file_path = __DIR__."/tempnamVar1"; mkdir($file_path); echo "*** Testing tempnam() in creation of unique files ***\n"; diff --git a/ext/standard/tests/file/tempnam_variation2-win32.phpt b/ext/standard/tests/file/tempnam_variation2-win32.phpt index 60fe951353..a3a4d2dba9 100644 --- a/ext/standard/tests/file/tempnam_variation2-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation2-win32.phpt @@ -14,13 +14,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Creating unique files in various dirs by passing relative paths to $dir arg */ echo "*** Testing tempnam() with absolute and relative paths ***\n"; -$dir_name = dirname(__FILE__)."/tempnam_variation2"; +$dir_name = __DIR__."/tempnam_variation2"; mkdir($dir_name); $dir_path = $dir_name."/tempnam_variation2_sub"; mkdir($dir_path); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $dir_paths = array( // absolute paths diff --git a/ext/standard/tests/file/tempnam_variation2.phpt b/ext/standard/tests/file/tempnam_variation2.phpt index dd98b40e8b..17a1e6d645 100644 --- a/ext/standard/tests/file/tempnam_variation2.phpt +++ b/ext/standard/tests/file/tempnam_variation2.phpt @@ -14,13 +14,13 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Creating unique files in various dirs by passing relative paths to $dir arg */ echo "*** Testing tempnam() with absolute and relative paths ***\n"; -$dir_name = dirname(__FILE__)."/tempnam_variation2"; +$dir_name = __DIR__."/tempnam_variation2"; mkdir($dir_name); $dir_path = $dir_name."/tempnam_variation2_sub"; mkdir($dir_path); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $dir_paths = array( // absolute paths diff --git a/ext/standard/tests/file/tempnam_variation3-win32.phpt b/ext/standard/tests/file/tempnam_variation3-win32.phpt index 6d5071b5e5..c79aabfb62 100644 --- a/ext/standard/tests/file/tempnam_variation3-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation3-win32.phpt @@ -14,7 +14,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Passing invalid/non-existing args for $prefix */ echo "*** Testing tempnam() with obscure prefixes ***\n"; -$file_path = dirname(__FILE__)."/tempnamVar3"; +$file_path = __DIR__."/tempnamVar3"; if (!mkdir($file_path)) { echo "Failed, cannot create temp dir $filepath\n"; exit(1); diff --git a/ext/standard/tests/file/tempnam_variation3.phpt b/ext/standard/tests/file/tempnam_variation3.phpt index 2d95cb0a43..856667fa49 100644 --- a/ext/standard/tests/file/tempnam_variation3.phpt +++ b/ext/standard/tests/file/tempnam_variation3.phpt @@ -14,7 +14,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Passing invalid/non-existing args for $prefix */ echo "*** Testing tempnam() with obscure prefixes ***\n"; -$file_path = dirname(__FILE__)."/tempnamVar3"; +$file_path = __DIR__."/tempnamVar3"; mkdir($file_path); /* An array of prefixes */ diff --git a/ext/standard/tests/file/tempnam_variation4-0.phpt b/ext/standard/tests/file/tempnam_variation4-0.phpt index 47da53df01..4c3688a348 100644 --- a/ext/standard/tests/file/tempnam_variation4-0.phpt +++ b/ext/standard/tests/file/tempnam_variation4-0.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not valid for Windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -27,7 +27,7 @@ unlink($filename); */ echo "*** Testing tempnam() with dir of permissions from 0000 to 0350 ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/tempnam_variation4"; $prefix = "tempnamVar4."; diff --git a/ext/standard/tests/file/tempnam_variation4-1.phpt b/ext/standard/tests/file/tempnam_variation4-1.phpt index 39f1fb0053..246608a336 100644 --- a/ext/standard/tests/file/tempnam_variation4-1.phpt +++ b/ext/standard/tests/file/tempnam_variation4-1.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not valid for Windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -27,7 +27,7 @@ unlink($filename); */ echo "*** Testing tempnam() with dir of permissions from 0351 to 0777 ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/tempnam_variation4"; $prefix = "tempnamVar4."; diff --git a/ext/standard/tests/file/tempnam_variation5-win32.phpt b/ext/standard/tests/file/tempnam_variation5-win32.phpt index d2e708bc30..71bfd06619 100644 --- a/ext/standard/tests/file/tempnam_variation5-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation5-win32.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Passing an existing file as $prefix for tempnam() fn */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test tempnam() function: by passing an existing filename as prefix ***\n"; $dir_name = $file_path."/tempnam_variation6"; diff --git a/ext/standard/tests/file/tempnam_variation5.phpt b/ext/standard/tests/file/tempnam_variation5.phpt index fdfcee9bed..62a186c37c 100644 --- a/ext/standard/tests/file/tempnam_variation5.phpt +++ b/ext/standard/tests/file/tempnam_variation5.phpt @@ -13,7 +13,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Passing an existing file as $prefix for tempnam() fn */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test tempnam() function: by passing an existing filename as prefix ***\n"; $dir_name = $file_path."/tempnam_variation5"; diff --git a/ext/standard/tests/file/tempnam_variation6-win32.phpt b/ext/standard/tests/file/tempnam_variation6-win32.phpt index acaa1abf50..c7a449c590 100644 --- a/ext/standard/tests/file/tempnam_variation6-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation6-win32.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Trying to create unique files by passing previously created unique file name as prefix */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "\n*** Test tempnam(): by passing previously created filenames ***\n"; $file_name = "tempnam_variation6.tmp"; diff --git a/ext/standard/tests/file/tempnam_variation6.phpt b/ext/standard/tests/file/tempnam_variation6.phpt index 08a9fce4de..db40292e25 100644 --- a/ext/standard/tests/file/tempnam_variation6.phpt +++ b/ext/standard/tests/file/tempnam_variation6.phpt @@ -13,7 +13,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Trying to create unique files by passing previously created unique file name as prefix */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "\n*** Test tempnam(): by passing previously created filenames ***\n"; $file_name = "tempnam_variation6.tmp"; diff --git a/ext/standard/tests/file/tempnam_variation8-win32.phpt b/ext/standard/tests/file/tempnam_variation8-win32.phpt index cceda6438f..5751368f7c 100644 --- a/ext/standard/tests/file/tempnam_variation8-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation8-win32.phpt @@ -16,13 +16,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Creating unique files in various dirs by passing relative paths to $dir arg */ echo "*** Testing tempnam() with absolute and relative paths ***\n"; -$dir_name = dirname(__FILE__)."\\tempnam_variation2"; +$dir_name = __DIR__."\\tempnam_variation2"; mkdir($dir_name); $dir_path = $dir_name."/tempnam_variation2_sub"; mkdir($dir_path); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $dir_paths = array( // absolute paths diff --git a/ext/standard/tests/file/touch.phpt b/ext/standard/tests/file/touch.phpt index 42d1fad1e5..e0b06d3960 100644 --- a/ext/standard/tests/file/touch.phpt +++ b/ext/standard/tests/file/touch.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { // This doesn't work for windows, time, atime usage results in very different // output to linux. This could be a php.net bug on windows or a windows querk. -$filename = dirname(__FILE__)."/touch.dat"; +$filename = __DIR__."/touch.dat"; var_dump(touch()); var_dump(touch($filename)); diff --git a/ext/standard/tests/file/touch_basic-win32-mb.phpt b/ext/standard/tests/file/touch_basic-win32-mb.phpt index 2572688174..e10e1219d8 100644 --- a/ext/standard/tests/file/touch_basic-win32-mb.phpt +++ b/ext/standard/tests/file/touch_basic-win32-mb.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing touch() : basic functionality ***\n"; -$filename = dirname(__FILE__)."/touch_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.dat"; +$filename = __DIR__."/touch_ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™.dat"; echo "\n--- testing touch creates a file ---\n"; @unlink($filename); diff --git a/ext/standard/tests/file/touch_basic-win32.phpt b/ext/standard/tests/file/touch_basic-win32.phpt index 481d476f54..08248ac760 100644 --- a/ext/standard/tests/file/touch_basic-win32.phpt +++ b/ext/standard/tests/file/touch_basic-win32.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing touch() : basic functionality ***\n"; -$filename = dirname(__FILE__)."/touch.dat"; +$filename = __DIR__."/touch.dat"; echo "\n--- testing touch creates a file ---\n"; @unlink($filename); diff --git a/ext/standard/tests/file/touch_basic.phpt b/ext/standard/tests/file/touch_basic.phpt index a4c319aefa..ffce02e574 100644 --- a/ext/standard/tests/file/touch_basic.phpt +++ b/ext/standard/tests/file/touch_basic.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing touch() : basic functionality ***\n"; -$filename = dirname(__FILE__)."/touch_basic.dat"; +$filename = __DIR__."/touch_basic.dat"; echo "\n--- testing touch creates a file ---\n"; @unlink($filename); diff --git a/ext/standard/tests/file/touch_variation1.phpt b/ext/standard/tests/file/touch_variation1.phpt index eaf4c46b1d..01599cfcf6 100644 --- a/ext/standard/tests/file/touch_variation1.phpt +++ b/ext/standard/tests/file/touch_variation1.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- <?php -$filename = dirname(__FILE__)."/touch.dat"; +$filename = __DIR__."/touch.dat"; var_dump(touch($filename, 101)); diff --git a/ext/standard/tests/file/touch_variation2.phpt b/ext/standard/tests/file/touch_variation2.phpt index a3596adc6b..e9bcf7ef3c 100644 --- a/ext/standard/tests/file/touch_variation2.phpt +++ b/ext/standard/tests/file/touch_variation2.phpt @@ -6,7 +6,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> <?php -$filename = dirname(__FILE__)."/touch_variation2.dat"; +$filename = __DIR__."/touch_variation2.dat"; $fp=fopen($filename,"w"); fwrite ($fp,"mydata"); fclose($fp); diff --git a/ext/standard/tests/file/umask_variation1.phpt b/ext/standard/tests/file/umask_variation1.phpt index 6f5bdc4480..77eada18e5 100644 --- a/ext/standard/tests/file/umask_variation1.phpt +++ b/ext/standard/tests/file/umask_variation1.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Changes the current umask */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; /* Check umask() on file/dir */ diff --git a/ext/standard/tests/file/umask_variation2.phpt b/ext/standard/tests/file/umask_variation2.phpt index b302bea969..6eac520f1c 100644 --- a/ext/standard/tests/file/umask_variation2.phpt +++ b/ext/standard/tests/file/umask_variation2.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Changes the current umask */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; /* Check umask() on file/dir */ diff --git a/ext/standard/tests/file/unlink_basic.phpt b/ext/standard/tests/file/unlink_basic.phpt index 172ad0551a..872326bad8 100644 --- a/ext/standard/tests/file/unlink_basic.phpt +++ b/ext/standard/tests/file/unlink_basic.phpt @@ -6,7 +6,7 @@ Testing unlink() function : basic functionality Description : Deletes filename */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing unlink() on a file ***\n"; $filename = "$file_path/unlink_basic.tmp"; // temp file name used here diff --git a/ext/standard/tests/file/unlink_error-win32-mb.phpt b/ext/standard/tests/file/unlink_error-win32-mb.phpt index efd6ee8323..a208e5675b 100644 --- a/ext/standard/tests/file/unlink_error-win32-mb.phpt +++ b/ext/standard/tests/file/unlink_error-win32-mb.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description : Deletes filename */ -$file_path = dirname(__FILE__).DIRECTORY_SEPARATOR."ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"; +$file_path = __DIR__.DIRECTORY_SEPARATOR."ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"; @mkdir($file_path); @@ -48,7 +48,7 @@ var_dump( unlink($filename, false) ); // $context as boolean false echo "\n-- Testing unlink() on non-existent file --\n"; -var_dump( unlink(dirname(__FILE__)."/non_existent_file.tmp") ); +var_dump( unlink(__DIR__."/non_existent_file.tmp") ); echo "\n-- Testing unlink() on directory --\n"; // temp directory used here @@ -62,9 +62,9 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/unlink_error.tmp"); -rmdir(dirname(__FILE__)."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/unlink_error"); -rmdir(dirname(__FILE__)."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"); +unlink(__DIR__."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/unlink_error.tmp"); +rmdir(__DIR__."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™/unlink_error"); +rmdir(__DIR__."/ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"); ?> --EXPECTF-- *** Testing unlink() : error conditions *** diff --git a/ext/standard/tests/file/unlink_error-win32.phpt b/ext/standard/tests/file/unlink_error-win32.phpt index 8dde64cff0..d62c715a94 100644 --- a/ext/standard/tests/file/unlink_error-win32.phpt +++ b/ext/standard/tests/file/unlink_error-win32.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description : Deletes filename */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/unlink_error.tmp"; // temp file name used here $fp = fopen($filename, "w"); // create file @@ -46,7 +46,7 @@ var_dump( unlink($filename, false) ); // $context as boolean false echo "\n-- Testing unlink() on non-existent file --\n"; -var_dump( unlink(dirname(__FILE__)."/non_existent_file.tmp") ); +var_dump( unlink(__DIR__."/non_existent_file.tmp") ); echo "\n-- Testing unlink() on directory --\n"; // temp directory used here @@ -60,8 +60,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/unlink_error.tmp"); -rmdir(dirname(__FILE__)."/unlink_error"); +unlink(__DIR__."/unlink_error.tmp"); +rmdir(__DIR__."/unlink_error"); ?> --EXPECTF-- *** Testing unlink() : error conditions *** diff --git a/ext/standard/tests/file/unlink_error.phpt b/ext/standard/tests/file/unlink_error.phpt index f7f8f00847..61aac03dd3 100644 --- a/ext/standard/tests/file/unlink_error.phpt +++ b/ext/standard/tests/file/unlink_error.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description : Deletes filename */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/unlink_error.tmp"; // temp file name used here $fp = fopen($filename, "w"); // create file @@ -46,7 +46,7 @@ var_dump( unlink($filename, false) ); // $context as boolean false echo "\n-- Testing unlink() on non-existent file --\n"; -var_dump( unlink(dirname(__FILE__)."/non_existent_file.tmp") ); +var_dump( unlink(__DIR__."/non_existent_file.tmp") ); echo "\n-- Testing unlink() on directory --\n"; // temp directory used here @@ -60,8 +60,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/unlink_error.tmp"); -rmdir(dirname(__FILE__)."/unlink_error"); +unlink(__DIR__."/unlink_error.tmp"); +rmdir(__DIR__."/unlink_error"); ?> --EXPECTF-- *** Testing unlink() : error conditions *** diff --git a/ext/standard/tests/file/unlink_variation1-win32-mb.phpt b/ext/standard/tests/file/unlink_variation1-win32-mb.phpt index adfb10edfe..e18049fdbe 100644 --- a/ext/standard/tests/file/unlink_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/unlink_variation1-win32-mb.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { */ -$file_path = dirname(__FILE__).DIRECTORY_SEPARATOR."ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"; +$file_path = __DIR__.DIRECTORY_SEPARATOR."ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™"; @mkdir($file_path); // temp dir name used here diff --git a/ext/standard/tests/file/unlink_variation1-win32.phpt b/ext/standard/tests/file/unlink_variation1-win32.phpt index b00e546d01..7be1421f77 100644 --- a/ext/standard/tests/file/unlink_variation1-win32.phpt +++ b/ext/standard/tests/file/unlink_variation1-win32.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dir name used here $dirname = "$file_path/unlink_variation1"; diff --git a/ext/standard/tests/file/unlink_variation1.phpt b/ext/standard/tests/file/unlink_variation1.phpt index c76e236566..0ce7cdf74f 100644 --- a/ext/standard/tests/file/unlink_variation1.phpt +++ b/ext/standard/tests/file/unlink_variation1.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip only on Linux'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/unlink_root_check.tmp"; +$filename = __DIR__."/unlink_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -27,7 +27,7 @@ unlink($filename); */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dir name used here $dirname = "$file_path/unlink_variation1"; diff --git a/ext/standard/tests/file/unlink_variation2.phpt b/ext/standard/tests/file/unlink_variation2.phpt index 0044cbe303..09fa7dac74 100644 --- a/ext/standard/tests/file/unlink_variation2.phpt +++ b/ext/standard/tests/file/unlink_variation2.phpt @@ -8,7 +8,7 @@ Test unlink() function : usage variations - unlink file in use /* Try to unlink file when file handle is still in use */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing unlink() on a file which is in use ***\n"; // temp file name used here diff --git a/ext/standard/tests/file/unlink_variation3.phpt b/ext/standard/tests/file/unlink_variation3.phpt index b332ab7b27..1cab0630a6 100644 --- a/ext/standard/tests/file/unlink_variation3.phpt +++ b/ext/standard/tests/file/unlink_variation3.phpt @@ -14,7 +14,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Delete link files - soft and hard links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp file used $filename = "$file_path/unlink_variation3.tmp"; diff --git a/ext/standard/tests/file/unlink_variation4.phpt b/ext/standard/tests/file/unlink_variation4.phpt index 746cfd3249..bc88b48adf 100644 --- a/ext/standard/tests/file/unlink_variation4.phpt +++ b/ext/standard/tests/file/unlink_variation4.phpt @@ -8,7 +8,7 @@ Test unlink() function : usage variations - unlink deleted file /* Try deleting a file which is already deleted */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp file used $filename = "$file_path/unlink_variation4.tmp"; diff --git a/ext/standard/tests/file/unlink_variation5.phpt b/ext/standard/tests/file/unlink_variation5.phpt index 071b14086a..bb6fd4b884 100644 --- a/ext/standard/tests/file/unlink_variation5.phpt +++ b/ext/standard/tests/file/unlink_variation5.phpt @@ -14,7 +14,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* delete files with different file permission(0000 to 0777) */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp file used $filename = "$file_path/unlink_variation5.tmp"; diff --git a/ext/standard/tests/file/windows_links/bug76335.phpt b/ext/standard/tests/file/windows_links/bug76335.phpt index 6762dc9fb6..6ad374ab95 100644 --- a/ext/standard/tests/file/windows_links/bug76335.phpt +++ b/ext/standard/tests/file/windows_links/bug76335.phpt @@ -9,10 +9,10 @@ if(substr(PHP_OS, 0, 3) != 'WIN' ) { --FILE-- <?php -$d0 = dirname(__FILE__) . DIRECTORY_SEPARATOR . "á"; -$d1 = dirname(__FILE__) . DIRECTORY_SEPARATOR . "a"; +$d0 = __DIR__ . DIRECTORY_SEPARATOR . "á"; +$d1 = __DIR__ . DIRECTORY_SEPARATOR . "a"; -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "file"; +$fn = __DIR__ . DIRECTORY_SEPARATOR . "file"; $l0 = $d0 . DIRECTORY_SEPARATOR . "b"; $l1 = $d1 . DIRECTORY_SEPARATOR . "b"; @@ -32,10 +32,10 @@ var_dump(link($d1 . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "file", $ --CLEAN-- <?php -$d0 = dirname(__FILE__) . DIRECTORY_SEPARATOR . "á"; -$d1 = dirname(__FILE__) . DIRECTORY_SEPARATOR . "a"; +$d0 = __DIR__ . DIRECTORY_SEPARATOR . "á"; +$d1 = __DIR__ . DIRECTORY_SEPARATOR . "a"; -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "file"; +$fn = __DIR__ . DIRECTORY_SEPARATOR . "file"; $l0 = $d0 . DIRECTORY_SEPARATOR . "b"; $l1 = $d1 . DIRECTORY_SEPARATOR . "b"; diff --git a/ext/standard/tests/file/windows_mb_path/bug54028.phpt b/ext/standard/tests/file/windows_mb_path/bug54028.phpt index 7dc6d0e8b8..7b304c70f4 100644 --- a/ext/standard/tests/file/windows_mb_path/bug54028.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug54028.phpt @@ -2,7 +2,7 @@ Bug #54028 Directory::read() cannot handle non-unicode chars properly --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,9 +14,9 @@ skip_if_no_required_exts("mbstring"); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "testBug54028" . DIRECTORY_SEPARATOR; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug54028" . DIRECTORY_SEPARATOR; $dirs = array("a", "ソ", "ゾ", "şŞıİğĞ", "多国語", "王", "汚れã¦æŽ˜ã‚‹"); diff --git a/ext/standard/tests/file/windows_mb_path/bug54028_2.phpt b/ext/standard/tests/file/windows_mb_path/bug54028_2.phpt index fef7394c24..81be60e640 100644 --- a/ext/standard/tests/file/windows_mb_path/bug54028_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug54028_2.phpt @@ -2,7 +2,7 @@ Bug #54028 realpath(".") return false --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,9 +14,9 @@ skip_if_no_required_exts(); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "testBug54028" . DIRECTORY_SEPARATOR; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug54028" . DIRECTORY_SEPARATOR; $dirs = array("a", "ソ", "ゾ", "şŞıİğĞ", "多国語", "王", "汚れã¦æŽ˜ã‚‹"); diff --git a/ext/standard/tests/file/windows_mb_path/bug54977.phpt b/ext/standard/tests/file/windows_mb_path/bug54977.phpt index b1bc415f05..173aed480f 100644 --- a/ext/standard/tests/file/windows_mb_path/bug54977.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug54977.phpt @@ -2,7 +2,7 @@ Bug #54977 UTF-8 files and folder are not shown --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,9 +14,9 @@ skip_if_no_required_exts(); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "testBug54977" . DIRECTORY_SEPARATOR; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug54977" . DIRECTORY_SEPARATOR; $paths = array("多国語", "王", "汚れã¦æŽ˜ã‚‹"); diff --git a/ext/standard/tests/file/windows_mb_path/bug61315.phpt b/ext/standard/tests/file/windows_mb_path/bug61315.phpt index 6ce056a250..1e97636175 100644 --- a/ext/standard/tests/file/windows_mb_path/bug61315.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug61315.phpt @@ -2,7 +2,7 @@ Bug #61315 stat() fails with specific DBCS characters --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,9 +14,9 @@ skip_if_no_required_exts(); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "testBug61315" . DIRECTORY_SEPARATOR; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug61315" . DIRECTORY_SEPARATOR; $d0 = $prefix . "ソフト"; $d1 = $prefix . "フォルダ"; diff --git a/ext/standard/tests/file/windows_mb_path/bug64506.phpt b/ext/standard/tests/file/windows_mb_path/bug64506.phpt index 6d9367f857..44d5c6f5f7 100644 --- a/ext/standard/tests/file/windows_mb_path/bug64506.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug64506.phpt @@ -2,7 +2,7 @@ PHP can not read or write file correctly if file name have special char like Å¡ --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,9 +16,9 @@ skip_if_no_required_exts(); #vim: set encoding=UTF-8 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; -$fnw = dirname(__FILE__) . DIRECTORY_SEPARATOR . "Å¡.txt"; // UTF-8 +$fnw = __DIR__ . DIRECTORY_SEPARATOR . "Å¡.txt"; // UTF-8 $f = fopen($fnw, 'w'); if ($f) { diff --git a/ext/standard/tests/file/windows_mb_path/bug64699.phpt b/ext/standard/tests/file/windows_mb_path/bug64699.phpt index 3ad000a3b4..db488c15ed 100644 --- a/ext/standard/tests/file/windows_mb_path/bug64699.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug64699.phpt @@ -2,7 +2,7 @@ Bug #64699 is_dir() is inaccurate result on Windows with japanese locale. --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,12 +14,12 @@ skip_if_no_required_exts(); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $old_cp = get_active_cp(); set_active_cp(65001); -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "testBug64699" . DIRECTORY_SEPARATOR; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug64699" . DIRECTORY_SEPARATOR; $dirs = array("a", "ソ", "ゾ", "şŞıİğĞ", "多国語", "表"); diff --git a/ext/standard/tests/file/windows_mb_path/bug70903.phpt b/ext/standard/tests/file/windows_mb_path/bug70903.phpt index 863fd4ab2e..8d529484be 100644 --- a/ext/standard/tests/file/windows_mb_path/bug70903.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug70903.phpt @@ -2,7 +2,7 @@ Bug #70903 scandir wrongly interprets the Turkish "ı" character --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,9 +14,9 @@ skip_if_no_required_exts(); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "testBug70903" . DIRECTORY_SEPARATOR; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug70903" . DIRECTORY_SEPARATOR; $d0 = $prefix . "ı"; diff --git a/ext/standard/tests/file/windows_mb_path/bug71509.phpt b/ext/standard/tests/file/windows_mb_path/bug71509.phpt index 418c35cd25..ed094c6b7a 100644 --- a/ext/standard/tests/file/windows_mb_path/bug71509.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug71509.phpt @@ -2,7 +2,7 @@ Bug #71509 Zip problem with swedish letters in filename. --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -13,7 +13,7 @@ skip_if_no_required_exts("zip"); <?PHP // åöä -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv("ISO-8859-1", "UTF-8", "Röd_Statistics"); // cp1252 $prefix = create_data("bug71509", "$item.txt"); diff --git a/ext/standard/tests/file/windows_mb_path/bug74923.phpt b/ext/standard/tests/file/windows_mb_path/bug74923.phpt index 3660202a4c..210a49732f 100644 --- a/ext/standard/tests/file/windows_mb_path/bug74923.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug74923.phpt @@ -2,7 +2,7 @@ Bug #74923 Crash when crawling through network share --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); diff --git a/ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt b/ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt index a6bbac111e..a56fecbbe3 100644 --- a/ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt @@ -2,7 +2,7 @@ Bug #75063 Many filesystem-related functions do not work with multibyte file names, cp1251 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,10 +16,10 @@ default_charset=cp1251 /* This file is in cp1251. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $dir_basename = "òåñò"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug75063-cp1251"; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "bug75063-cp1251"; $d0 = $prefix . DIRECTORY_SEPARATOR . $dir_basename; mkdir($prefix); @@ -55,7 +55,7 @@ chdir($old_cwd); /* --CLEAN-- section were the right place, but it won't accept default_charset ATM, it seems. */ $dir_basename = "òåñò"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug75063-cp1251"; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "bug75063-cp1251"; $d0 = $prefix . DIRECTORY_SEPARATOR . $dir_basename; $obj = scandir($d0); diff --git a/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt b/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt index 6028facfaa..beaf690dea 100644 --- a/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt @@ -2,7 +2,7 @@ Bug #75063 Many filesystem-related functions do not work with multibyte file names, UTF-8 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,10 +14,10 @@ skip_if_no_required_exts(); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $dir_basename = "теÑÑ‚"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug75063-utf8"; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "bug75063-utf8"; $d0 = $prefix . DIRECTORY_SEPARATOR . $dir_basename; mkdir($prefix); @@ -56,7 +56,7 @@ chdir($old_cwd); --CLEAN-- <?php $dir_basename = "теÑÑ‚"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug75063-utf8"; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "bug75063-utf8"; $d0 = $prefix . DIRECTORY_SEPARATOR . $dir_basename; $obj = scandir($d0); diff --git a/ext/standard/tests/file/windows_mb_path/recursive_it.phpt b/ext/standard/tests/file/windows_mb_path/recursive_it.phpt index 19c08a38c2..ab4b9ec51a 100644 --- a/ext/standard/tests/file/windows_mb_path/recursive_it.phpt +++ b/ext/standard/tests/file/windows_mb_path/recursive_it.phpt @@ -2,18 +2,18 @@ RecursiveDirectoryIterator with dir path long or of edge case length --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); -if (strlen(dirname(__FILE__)) > 259) die("Unsuitable starting path length"); +if (strlen(__DIR__) > 259) die("Unsuitable starting path length"); ?> --FILE-- <?php $need_len = 1024; //$need_len = 259; -$dir = dirname(__FILE__); +$dir = __DIR__; while ($need_len - strlen($dir) > 32) { $dir .= DIRECTORY_SEPARATOR . str_repeat("a", 32); } @@ -24,7 +24,7 @@ $fl = $dir . DIRECTORY_SEPARATOR . "hello.txt"; file_put_contents($fl, ""); -$start = substr($dir, 0, strpos($dir, DIRECTORY_SEPARATOR, strlen(dirname(__FILE__))+1)); +$start = substr($dir, 0, strpos($dir, DIRECTORY_SEPARATOR, strlen(__DIR__)+1)); $iter = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $start, @@ -54,7 +54,7 @@ var_dump(file_exists($start)); do { rmdir($dir); $dir = dirname($dir); -} while (dirname(__FILE__) != $dir);*/ +} while (__DIR__ != $dir);*/ ?> ==DONE== diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt index 6517cf88c1..9390b3755f 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading big5 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ defalut_charset=big5 #vim: set encoding=big5 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "´ú¸Õ¦h¦r¸`¸ô®|"; // BIG5 string $prefix = create_data("file_big5", $item, 950); diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt index 98d4e0c89b..ad16770381 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir big5 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=big5 #vim: set encoding=big5 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "´ú¸Õ¦h¦r¸`¸ô®|"; // BIG5 string $prefix = create_data("dir_big5", $item . "5", 950); diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt index 406b925555..088c46d7b6 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write big5 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ defalut_charset=cp950 #vim: set encoding=big5 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "´ú¸Õ¦h¦r¸`¸ô®|"; // BIG5 string $prefix = create_data("file_big5", $item . "25", 950); diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt index 54710fc3c8..f738b9f5be 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading big5 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=big5 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('big5', 'utf-8', "´ú¸Õ¦h¦r¸`¸ô®|"); // BIG5 string $prefix = create_data("file_big5", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt index 4e1ef94c00..45d87d1cbe 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir big5 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=big5 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('big5', 'utf-8', "´ú¸Õ¦h¦r¸`¸ô®|"); // BIG5 string $prefix = create_data("dir_big5", $item . "5"); diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt index 3b3b8a558a..07f48eb218 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write big5 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=big5 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('big5', 'utf-8', "´ú¸Õ¦h¦r¸`¸ô®|"); // BIG5 string $prefix = create_data("file_big5", $item . "25"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt index a5dea1c9b8..d7b093281e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading UTF-8 path with cp1250 specific symbols --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1250 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "Å¡Ä‘Äćž_Å ÄČĆŽ"; // cp1250 specific chars $prefix = create_data("file_cp1250", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt index ae7eff4a13..2c629e18ac 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir UTF-8 path with cp1250 specific symbols --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1250 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "Å¡Ä‘Äćž_Å ÄČĆŽ"; // cp1250 specific chars $prefix = create_data("dir_cp1250", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt index 45531b6d6b..77a5bf6a08 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write to UTF-8 path with cp1250 specific symbols --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1250 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "Å¡Ä‘Äćž_Å ÄČĆŽ"; // cp1250 specific chars $prefix = create_data("dir_cp1250", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt index c70570b2b0..f88cb70ac6 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt @@ -2,7 +2,7 @@ Test fopen() for reading UTF-8 path with cp1250 specific symbols --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1250 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ÃrvÃztűrÅ‘ tükörfúrógép"; // cp1250 specific chars $prefix = create_data("file_cp1250", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt index a7df51695f..eca9479978 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir UTF-8 path with cp1250 specific symbols --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1250 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ÃrvÃztűrÅ‘ tükörfúrógép"; // cp1250 specific chars $prefix = create_data("dir_cp1250", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt index 75e5c55ca9..910db7b04c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt @@ -2,7 +2,7 @@ Test fopen() for write to UTF-8 path with cp1250 specific symbols --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1250 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ÃrvÃztűrÅ‘ tükörfúrógép"; // cp1250 specific chars $prefix = create_data("dir_cp1250", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt index 485ff119ef..1688d75a02 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading CP1251 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1251 #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ïðèâåò"; // cp1251 string $prefix = create_data("file_cp1251", $item, 1251); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt index db0c9a690c..049800a0aa 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir CP1251 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1251 #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ïðèâåò"; // cp1251 string $prefix = create_data("dir_cp1251", $item . "3", 1251); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt index 7dd32c5a90..7d3290d99e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write CP1251 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1251 #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ïðèâåò"; // cp1251 string $prefix = create_data("file_cp1251", $item . "7", 1251); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt index 14b5176415..27ba191d0d 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading CP1251 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1251', 'utf-8', "ïðèâåò"); // cp1251 string $prefix = create_data("file_cp1251", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt index 7b5f71b84e..a6baa4b9c1 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir CP1251 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1251', 'utf-8', "ïðèâåò"); // cp1251 string $prefix = create_data("dir_cp1251", $item . "3"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt index 84ecdbff9e..c46bc48645 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write CP1251 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1251', 'utf-8', "ïðèâåò"); // cp1251 string $prefix = create_data("file_cp1251", $item . "7"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt index 2510a2d2de..c4aa6f831c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt @@ -5,7 +5,7 @@ zend.multibyte=1 zend.script_encoding=cp1251 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ skip_if_no_required_exts("mbstring"); #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ïðèâåò"; // cp1251 string $prefix = create_data("file_cp1251", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt index 3b55e18c67..9265f8ec0b 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt @@ -5,7 +5,7 @@ zend.multibyte=1 zend.script_encoding=cp1251 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ skip_if_no_required_exts("mbstring"); #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ïðèâåò"; // cp1251 string $prefix = create_data("dir_cp1251", $item . "3"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt index 98e5852b67..71ecc73bc9 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt @@ -5,7 +5,7 @@ zend.multibyte=1 zend.script_encoding=cp1251 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ skip_if_no_required_exts("mbstring"); #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ïðèâåò7"; // cp1251 string $prefix = create_data("file_cp1251", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt index 6fe0d968f7..2ebb63a688 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt @@ -2,7 +2,7 @@ cp1252 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1252 #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "gefäß"; $prefix = create_data("file", $item, 1252); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt index ef5dc9397d..dc673c260b 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1252 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1252', 'utf-8', "tschüß"); // cp1252 string $prefix = create_data("file_cp1252", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt index 2a34746183..eff0c923e8 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1252 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1252', 'utf-8', "tschüß"); // cp1252 string $prefix = create_data("dir_cp1252", "${item}3"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt index 293824d550..d0e39c0513 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1252 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1252', 'utf-8', "tschüß"); // cp1252 string $prefix = create_data("dir_cp1252", "${item}3"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt index c5e075a944..c3b3edb7ee 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1252 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1252', 'utf-8', "Voláçao"); // cp1252 string $prefix = create_data("file2_cp1252", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt index 969a115392..2e97e78460 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1252 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1252', 'utf-8', "Voláçao"); // cp1252 string $prefix = create_data("dir2_cp1252", "${item}3"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt index 6119213289..c6a135f567 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1252 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1252', 'utf-8', "Voláçao"); // cp1252 string $prefix = create_data("dir2_cp1252", "${item}3"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt index 24beb0d31a..07cf3c8e6c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1253 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1253 #vim: set encoding=cp1253 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "äéáäñïìÞ äïêéìÞò"; $prefix = create_data("file_cp1253", $item, 1253); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt index 854910bc31..9f03a9115c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1253 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1253 #vim: set encoding=cp1253 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "äéáäñïìÞ äïêéìÞò"; $prefix = create_data("dir_cp1253", "${item}42", 1253); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt index 79892e8ae4..1ab6f658c0 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1253 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1253 #vim: set encoding=cp1253 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "äéáäñïìÞ äïêéìÞò"; $prefix = create_data("dir_cp1253", "${item}42}", 1253); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt index 950c4784d8..64ad358b5c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1253 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1253 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "διαδÏομή δοκιμής"; $prefix = create_data("file_cp1253", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt index 25aeb513ba..a178ea574a 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1253 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1253 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "διαδÏομή δοκιμής"; $prefix = create_data("dir_cp1253", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt index bd8fc22ba3..a46a8854ce 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1253 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1253 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "διαδÏομή δοκιμής"; $prefix = create_data("dir_cp1253", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt index 4f160c1370..9d92267b01 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1254 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1254 #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "çokbaytlý iþleri"; $prefix = create_data("file_cp1254", $item, 1254); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt index 5a72058097..8f79a2982b 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1254 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1254 #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "çokbaytlý iþleri"; $prefix = create_data("dir_cp1254", "${item}42", 1254); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt index 21f87c501a..d924f87edd 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1254 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1254 #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "çokbaytlý iþleri"; $prefix = create_data("dir_cp1254", "${item}42}", 1254); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt index 7fcb0ff66d..da264f9e3e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt @@ -2,7 +2,7 @@ cp1254 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1254 #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "çokbaytlý iþleri"; diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt index 7a3d496f9f..b79e0f466f 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1254 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "çokbaytlı iÅŸleri"; $prefix = create_data("file_cp1254", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt index 0cb73207e8..2966eebab4 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1254 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "çokbaytlı iÅŸleri"; $prefix = create_data("dir_cp1254", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt index ea4950974c..a8b1a9a67f 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1254 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "çokbaytlı iÅŸleri"; $prefix = create_data("dir_cp1254", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt index 0c330ea445..a08dfc3e30 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt @@ -2,7 +2,7 @@ cp1254 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "çokbaytlı iÅŸleri"; diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt index 01b4f7732d..db96aa08d6 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1255 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1255 #vim: set encoding=cp1255 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ëììéí îøåáéí"; $prefix = create_data("file_cp1255", $item, 1255); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt index 991d2ab615..4da386eaa4 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1255 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1255 #vim: set encoding=cp1255 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ëììéí îøåáéí"; $prefix = create_data("dir_cp1255", "${item}42", 1255); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt index 276af84a91..e5b6f4cf77 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1255 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1255 #vim: set encoding=cp1255 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ëììéí îøåáéí"; $prefix = create_data("dir_cp1255", "${item}42}", 1255); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt index e33616ddd3..b8937a2f9e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1255 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1255 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "×›×œ×œ×™× ×ž×¨×•×‘×™×"; $prefix = create_data("file_cp1255", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt index b241210faa..dc47630450 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1255 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1255 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "×›×œ×œ×™× ×ž×¨×•×‘×™×"; $prefix = create_data("dir_cp1255", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt index 10fef62404..109d2dbd64 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1255 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1255 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "×›×œ×œ×™× ×ž×¨×•×‘×™×"; $prefix = create_data("dir_cp1255", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt index 617ebedddd..5ac99b2fd3 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1256 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1256 #vim: set encoding=cp1256 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ãÓÇÑ ãÊÚÏÏ ÇáÈÇíÊ ÇÎÊÈÇÑ"; // cp1256 string $prefix = create_data("file_cp1256", $item, 1256); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt index 341c0c01a2..ec95e582d9 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1256 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1256 #vim: set encoding=cp1256 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ãÓÇÑ ãÊÚÏÏ ÇáÈÇíÊ ÇÎÊÈÇÑ"; $prefix = create_data("dir_cp1256", "${item}42", 1256); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt index e8cf5709a7..fd7303f1e7 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1256 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1256 #vim: set encoding=cp1256 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ãÓÇÑ ãÊÚÏÏ ÇáÈÇíÊ ÇÎÊÈÇÑ"; $prefix = create_data("dir_cp1256", "${item}42}", 1256); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt index 32596c2bd5..25e1118fcb 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1256 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1256 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "مسار متعدد البايت اختبار"; $prefix = create_data("file_cp1256", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt index fd0204aace..f660c5e906 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1256 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1256 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "مسار متعدد البايت اختبار"; $prefix = create_data("dir_cp1256", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt index ef0229a2e9..e8a14ca9a4 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1256 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1256 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "مسار متعدد البايت اختبار"; $prefix = create_data("dir_cp1256", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt index efc43f3513..8a52ab0a1f 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt @@ -2,7 +2,7 @@ Thai cp874 basic test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp874 #vim: set encoding=cp874 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $names = array( /* cp874 */ "à»ç¹á¿éÁ·Õè·´Êͺ1", @@ -35,7 +35,7 @@ $names = array( /* cp874 */ $i = 0; foreach ($names as $name) { - $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . $name . ".txt"; + $path = __DIR__ . DIRECTORY_SEPARATOR . $name . ".txt"; file_put_contents($path, "hello" . $i++); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt index aa877d7406..2e6df976a4 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt @@ -2,7 +2,7 @@ Thai cp874 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,12 +19,12 @@ internal_encoding=cp874 #vim: set encoding=cp874 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "à»ç¹á¿éÁ·Õè·´Êͺ11"; $prefix = create_data("file_cp874", $item, 874); -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . $item; +$fn = __DIR__ . DIRECTORY_SEPARATOR . $item; var_dump($fn); var_dump(touch($fn)); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt index 2c244997b6..3ac3035b4c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt @@ -2,7 +2,7 @@ Thai UTF-8 basic test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp874 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $names = array( /* cp874 */ "à»ç¹á¿éÁ·Õè·´Êͺ1", @@ -32,7 +32,7 @@ $names = array( /* cp874 */ $i = 0; foreach ($names as $name) { - $pathw = dirname(__FILE__) . DIRECTORY_SEPARATOR . iconv('cp874', 'utf-8', $name) . ".txt"; + $pathw = __DIR__ . DIRECTORY_SEPARATOR . iconv('cp874', 'utf-8', $name) . ".txt"; file_put_contents($pathw, "hello" . $i++); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt index 13ec027748..1bc8fca100 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt @@ -2,7 +2,7 @@ Thai UTF-8 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp874 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "เป็นà¹à¸Ÿà¹‰à¸¡à¸—ี่ทดสà¸à¸š11"; diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt index 48e55981ca..12c38eae69 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp932 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp932 #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ƒeƒXƒgƒ}ƒ‹ƒ`ƒoƒCƒgEƒpƒX"; // cp932 string $prefix = create_data("file_cp932", $item, 932); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt index b177e2d1e2..9163f87b33 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp932 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp932 #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ƒeƒXƒgƒ}ƒ‹ƒ`ƒoƒCƒgEƒpƒX"; // cp932 string $prefix = create_data("dir_cp932", "${item}42", 932); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt index 595f86213a..149c0fe595 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write to cp932 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp932 #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ƒeƒXƒgƒ}ƒ‹ƒ`ƒoƒCƒgEƒpƒX"; // cp932 string $prefix = create_data("dir_cp932", "${item}42}", 932); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt index 95992ae79f..a6fd814203 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt @@ -2,7 +2,7 @@ cp932 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp932 #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ƒeƒXƒgƒ}ƒ‹ƒ`ƒoƒCƒgEƒpƒX77"; // cp932 string diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt index 5e0e67b662..b845e313b3 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp932 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp932', 'utf-8', "ƒeƒXƒgƒ}ƒ‹ƒ`ƒoƒCƒgEƒpƒX"); // cp932 string $prefix = create_data("file_cp932", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt index 2092e40da0..80a49dd28b 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp932 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp932', 'utf-8', "ƒeƒXƒgƒ}ƒ‹ƒ`ƒoƒCƒgEƒpƒX"); // cp932 string $prefix = create_data("dir_cp932", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt index bd9b1791ea..1d7764236a 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp932 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp932', 'utf-8', "ƒeƒXƒgƒ}ƒ‹ƒ`ƒoƒCƒgEƒpƒX"); // cp932 string $prefix = create_data("dir_cp932", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt index 46db0ebc4b..b29631ad5c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp936 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp936 #vim: set encoding=cp936 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "œyÔ‡¶à×ֹ·½"; // cp936 string $prefix = create_data("file_cp936", $item, 936); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt index 9eb1f08217..d7ee04bf9e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp936 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp936 #vim: set encoding=cp936 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "œyÔ‡¶à×ֹ·½"; // cp936 string $prefix = create_data("dir_cp936", $item . "5", 936); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt index eedee97bd0..eef4e4915e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp936 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp936 #vim: set encoding=cp936 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "œyÔ‡¶à×ֹ·½"; // cp936 string $prefix = create_data("file_cp936", $item . "25", 936); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt index b0b709c0cc..52b164fdb2 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp936 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp936 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp936', 'utf-8', "œyÔ‡¶à×ֹ·½"); // cp936 string $prefix = create_data("file_cp936", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt index 2c4b2876c5..1a22b13ea6 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp936 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp936 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp936', 'utf-8', "œyÔ‡¶à×ֹ·½"); // cp936 string $prefix = create_data("dir_cp936", $item . "5"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt index b260b7b37f..b4fe8415c2 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp936 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp936 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp936', 'utf-8', "œyÔ‡¶à×ֹ·½"); // cp936 string $prefix = create_data("file_cp936", $item . "25"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt b/ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt index 930082bd63..394ab17011 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt @@ -3,7 +3,7 @@ Test chdir()/getcwd() with a dir for multibyte filenames --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $prefix = create_data("dir_mb"); $dirw = $prefix . DIRECTORY_SEPARATOR . "テストマルãƒãƒã‚¤ãƒˆãƒ»ãƒ‘ス42"; diff --git a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt index 4b2bae974f..0c8f70919f 100644 --- a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading eucjp to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=eucjp */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('eucjp', 'utf-8', "¥Æ¥¹¥È¥Þ¥ë¥Á¥Ð¥¤¥È¡¦¥Ñ¥¹"); // EUCJP string $prefix = create_data("file_eucjp", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt index db3f1d861b..634c676385 100644 --- a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir eucjp to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=eucjp */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('eucjp', 'utf-8', "¥Æ¥¹¥È¥Þ¥ë¥Á¥Ð¥¤¥È¡¦¥Ñ¥¹"); // EUCJP string $prefix = create_data("dir_eucjp", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt index 0d06fb2489..4b3c631837 100644 --- a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write eucjp to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=eucjp */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('eucjp', 'utf-8', "¥Æ¥¹¥È¥Þ¥ë¥Á¥Ð¥¤¥È¡¦¥Ñ¥¹"); // EUCJP string $prefix = create_data("dir_eucjp", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt index 51f1bb945b..b1576e827a 100644 --- a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading Kartuli UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=utf-8 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ქáƒáƒ თველები"; $prefix = create_data("file_kartuli", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt index ff32d75869..73ae71a6ba 100644 --- a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir Kartuli UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=utf-8 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ქáƒáƒ თველები"; $prefix = create_data("dir_kartuli", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt index 192072760c..8aa7b2378c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write Kartuli UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=kartuli */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ქáƒáƒ თველები"; $prefix = create_data("dir_kartuli", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt index 8f08357792..211124ad21 100644 --- a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt @@ -2,7 +2,7 @@ Kartuli UTF-8 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp874 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ქáƒáƒ თველები55"; diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt index 688fc6caca..181ba33ca1 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt @@ -2,7 +2,7 @@ Basic long path test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -21,7 +21,7 @@ for ($i = 0; $i < $how_many; $i++) { $p .= DIRECTORY_SEPARATOR; } -$p = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . $p; +$p = realpath(__DIR__) . DIRECTORY_SEPARATOR . $p; echo strlen($p), "\n", $p, "\n"; @@ -34,7 +34,7 @@ for ($i = 0; $i < $how_many; $i++) { rmdir($p0); } -var_dump(file_exists(realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . $s)); +var_dump(file_exists(realpath(__DIR__) . DIRECTORY_SEPARATOR . $s)); ?> ===DONE=== diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt index b2af71aa76..48f30dbccd 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt @@ -2,7 +2,7 @@ Basic long path test with file I/O --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -21,7 +21,7 @@ for ($i = 0; $i < $how_many; $i++) { $p .= DIRECTORY_SEPARATOR; } -$p = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . $p; +$p = realpath(__DIR__) . DIRECTORY_SEPARATOR . $p; echo strlen($p), "\n", $p, "\n"; @@ -41,7 +41,7 @@ for ($i = 0; $i < $how_many; $i++) { rmdir($p0); } -var_dump(file_exists(realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . $s)); +var_dump(file_exists(realpath(__DIR__) . DIRECTORY_SEPARATOR . $s)); ?> ===DONE=== diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt index bcae2c53bc..3437656eec 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt @@ -2,7 +2,7 @@ Basic long path test with file I/O, multibyte path and realpath() check --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -22,7 +22,7 @@ for ($i = 0; $i < $how_many; $i++) { } /* path doesn't exist at this point! */ -$p = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . $p; +$p = realpath(__DIR__) . DIRECTORY_SEPARATOR . $p; echo strlen($p), "\n", $p, "\n"; @@ -47,7 +47,7 @@ for ($i = 0; $i < $how_many; $i++) { rmdir($p0); } -var_dump(file_exists(realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . $s)); +var_dump(file_exists(realpath(__DIR__) . DIRECTORY_SEPARATOR . $s)); ?> ===DONE=== diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt index e897aaa07d..d572206c5d 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt @@ -2,7 +2,7 @@ Bug #30730 Filename path length limit broken on NTFS volume, using rename --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -11,7 +11,7 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); --FILE-- <?php -$dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test_bug30730"; +$dir = __DIR__ . DIRECTORY_SEPARATOR . "test_bug30730"; $file = $dir . DIRECTORY_SEPARATOR . "test_file"; var_dump(mkdir($dir)); diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt index bb50ffdebe..6dd1e21afb 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt @@ -2,7 +2,7 @@ Bug #70943 fopen() can't open a file if path is 259 characters long --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -11,7 +11,7 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); --FILE-- <?php // Generates a sample file whose path is exactly 259 characters long -$testFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . str_repeat("a", 254 - strlen(dirname(__FILE__))).".dat"; +$testFile = __DIR__ . DIRECTORY_SEPARATOR . str_repeat("a", 254 - strlen(__DIR__)).".dat"; echo "Generating a file with a path length of ".strlen($testFile)." characters...\r\n"; touch($testFile); 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 4b5bd445f4..7a83c1e4f9 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 @@ -2,7 +2,7 @@ Bug #71103 file_exists and is_readable fail silently --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -11,7 +11,7 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); --FILE-- <?php -$base = dirname(__FILE__); +$base = __DIR__; $d = $base . '\\dev\\http\\tproj\\app\\cache\\dev_old\\annotations\\72'; $foo = $d . '\\5b53796d666f6e795c42756e646c655c5477696742756e646c655c436f6e74726f6c6c65725c457863657074696f6e436f6e74726f6c6c657223676574416e64436c65616e4f7574707574427566666572696e67405b416e6e6f745d5d5b.doctrinecache.data'; diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt index 9dc7cf3cc4..287dbf192e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt @@ -2,11 +2,11 @@ Mkdir with path length < 260 and > 248 has be a long path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); -$start = realpath(dirname(__FILE__)); +$start = realpath(__DIR__); if (strlen($start) > 260 || strlen($start) > 248) { die("skip the starting path length is unsuitable for this test"); } @@ -23,7 +23,7 @@ for ($i = 0; $i < $how_many; $i++) { $p .= "$s\\"; } -$start = realpath(dirname(__FILE__)); +$start = realpath(__DIR__); $newstart = false; if (strlen($start) <= 248) { // create the exact length diff --git a/ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt b/ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt index 1033c0e3e6..d64316b3af 100644 --- a/ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt @@ -2,7 +2,7 @@ Test readdir() with a dir for multibyte filenames --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -12,7 +12,7 @@ skip_if_no_required_exts(); --FILE-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $prefix = create_data("mb_names"); $content = ""; diff --git a/ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt b/ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt index 7279850c86..acd9323c5c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt @@ -3,7 +3,7 @@ Test rename() with a dir for multibyte filenames --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $prefix = create_data("file2_mb"); diff --git a/ext/standard/tests/filters/bug22538.phpt b/ext/standard/tests/filters/bug22538.phpt index 0f007e47bb..0ef37a7bc1 100644 --- a/ext/standard/tests/filters/bug22538.phpt +++ b/ext/standard/tests/filters/bug22538.phpt @@ -11,8 +11,8 @@ function my_stream_copy_to_stream($fin, $fout) { $size = 65536; do { - $path1 = sprintf("%s/%s%da", dirname(__FILE__), uniqid(), time()); - $path2 = sprintf("%s/%s%db", dirname(__FILE__), uniqid(), time()); + $path1 = sprintf("%s/%s%da", __DIR__, uniqid(), time()); + $path2 = sprintf("%s/%s%db", __DIR__, uniqid(), time()); } while ($path1 == $path2); $fp = fopen($path1, "w") or die("Can not open $path1\n"); diff --git a/ext/standard/tests/filters/bug35916.phpt b/ext/standard/tests/filters/bug35916.phpt index 4d2027d249..8c853023b1 100644 --- a/ext/standard/tests/filters/bug35916.phpt +++ b/ext/standard/tests/filters/bug35916.phpt @@ -2,7 +2,7 @@ Bug #35916 (Duplicate calls to stream_bucket_append() lead to a crash) --FILE-- <?php -$file = dirname(__FILE__) . "/bug35916.txt"; +$file = __DIR__ . "/bug35916.txt"; @unlink($file); class strtoupper_filter extends php_user_filter diff --git a/ext/standard/tests/filters/stream_filter_remove_basic.phpt b/ext/standard/tests/filters/stream_filter_remove_basic.phpt index fd2a4bd4ca..a264a0e4f6 100644 --- a/ext/standard/tests/filters/stream_filter_remove_basic.phpt +++ b/ext/standard/tests/filters/stream_filter_remove_basic.phpt @@ -15,7 +15,7 @@ if(! in_array( "string.rot13", $filters )) die( "skip rot13 filter not available echo "*** Testing stream_filter_remove() : basic functionality ***\n"; -$file = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; +$file = __DIR__ . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; touch( $file ); $fp = fopen( $file, 'w+' ); @@ -35,7 +35,7 @@ fclose( $fp ); --CLEAN-- <?php -$file = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; +$file = __DIR__ . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; unlink( $file ); ?> diff --git a/ext/standard/tests/filters/stream_filter_remove_error.phpt b/ext/standard/tests/filters/stream_filter_remove_error.phpt index 37820a99c4..9513319f57 100644 --- a/ext/standard/tests/filters/stream_filter_remove_error.phpt +++ b/ext/standard/tests/filters/stream_filter_remove_error.phpt @@ -13,7 +13,7 @@ if(! in_array( "string.rot13", $filters )) die( "skip rot13 filter not available * Alias to functions: */ -$file = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; +$file = __DIR__ . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; touch( $file ); $fp = fopen( $file, 'w+' ); $filter = stream_filter_append( $fp, "string.rot13", STREAM_FILTER_WRITE ); @@ -45,7 +45,7 @@ fclose( $fp ); --CLEAN-- <?php -$file = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; +$file = __DIR__ . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; unlink( $file ); ?> diff --git a/ext/standard/tests/general_functions/004.phpt b/ext/standard/tests/general_functions/004.phpt index 5468ca99f0..fa83c7c220 100644 --- a/ext/standard/tests/general_functions/004.phpt +++ b/ext/standard/tests/general_functions/004.phpt @@ -2,7 +2,7 @@ fgetcsv() with tab delimited fields (BUG #8258) --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); $fp=fopen("004.data","r"); while($a=fgetcsv($fp,100,"\t")) { echo join(",",$a)."\n"; diff --git a/ext/standard/tests/general_functions/bug40752.phpt b/ext/standard/tests/general_functions/bug40752.phpt index 9bf524029c..4e933d1274 100644 --- a/ext/standard/tests/general_functions/bug40752.phpt +++ b/ext/standard/tests/general_functions/bug40752.phpt @@ -3,7 +3,7 @@ Bug #40752 (parse_ini_file() segfaults when a scalar setting is redeclared as an --FILE-- <?php -$file = dirname(__FILE__)."/bug40752.ini"; +$file = __DIR__."/bug40752.ini"; file_put_contents($file, ' foo = 1; foo[] = 1; diff --git a/ext/standard/tests/general_functions/bug41445.phpt b/ext/standard/tests/general_functions/bug41445.phpt index f46dc9093c..85adfeddc9 100644 --- a/ext/standard/tests/general_functions/bug41445.phpt +++ b/ext/standard/tests/general_functions/bug41445.phpt @@ -3,7 +3,7 @@ Bug #41445 (parse_ini_file() function parses octal numbers in section names) --FILE-- <?php -$file = dirname(__FILE__)."/bug41445.ini"; +$file = __DIR__."/bug41445.ini"; $data = <<<DATA [001099030277] diff --git a/ext/standard/tests/general_functions/bug41445_1.phpt b/ext/standard/tests/general_functions/bug41445_1.phpt index 378001623c..e38b6f322c 100644 --- a/ext/standard/tests/general_functions/bug41445_1.phpt +++ b/ext/standard/tests/general_functions/bug41445_1.phpt @@ -3,7 +3,7 @@ Bug #41445 (parse_ini_file() function parses octal numbers in section names) - 2 --FILE-- <?php -$file = dirname(__FILE__)."/bug41445_1.ini"; +$file = __DIR__."/bug41445_1.ini"; $data = <<<DATA [2454.33] diff --git a/ext/standard/tests/general_functions/bug48660.phpt b/ext/standard/tests/general_functions/bug48660.phpt index d92958fc42..dfb608f18b 100644 --- a/ext/standard/tests/general_functions/bug48660.phpt +++ b/ext/standard/tests/general_functions/bug48660.phpt @@ -3,7 +3,7 @@ Bug #48660 (parse_ini_*(): dollar sign as last character of value fails) --FILE-- <?php -$ini_location = dirname(__FILE__) . '/bug48660.tmp'; +$ini_location = __DIR__ . '/bug48660.tmp'; // Build ini data $ini_data = ' @@ -24,7 +24,7 @@ var_dump(parse_ini_file($ini_location, true, INI_SCANNER_NORMAL)); ?> --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug48660.tmp'); ?> +<?php @unlink(__DIR__ . '/bug48660.tmp'); ?> --EXPECT-- array(1) { ["cases"]=> diff --git a/ext/standard/tests/general_functions/bug48768.phpt b/ext/standard/tests/general_functions/bug48768.phpt index ae8329ac44..196c92d4a0 100644 --- a/ext/standard/tests/general_functions/bug48768.phpt +++ b/ext/standard/tests/general_functions/bug48768.phpt @@ -3,7 +3,7 @@ Bug #48768 (parse_ini_*() crashes with INI_SCANNER_RAW) --FILE-- <?php -$ini_location = dirname(__FILE__) . '/bug48768.tmp'; +$ini_location = __DIR__ . '/bug48768.tmp'; // Build ini data $ini_data = <<< EOT @@ -19,7 +19,7 @@ var_dump(parse_ini_file($ini_location, false, INI_SCANNER_NORMAL)); ?> --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug48768.tmp'); ?> +<?php @unlink(__DIR__ . '/bug48768.tmp'); ?> --EXPECT-- array(1) { ["equal"]=> diff --git a/ext/standard/tests/general_functions/bug49056.phpt b/ext/standard/tests/general_functions/bug49056.phpt index 208766cce0..a979562cd2 100644 --- a/ext/standard/tests/general_functions/bug49056.phpt +++ b/ext/standard/tests/general_functions/bug49056.phpt @@ -8,7 +8,7 @@ Cooking_furniture="Küchen Möbel (en)" Küchen_Möbel="Cooking furniture (en)" EOT; -$filename = dirname(__FILE__) . '/bug49056.tmp'; +$filename = __DIR__ . '/bug49056.tmp'; file_put_contents( $filename, $string); @@ -16,7 +16,7 @@ var_dump(parse_ini_file($filename)); ?> --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug49056.tmp'); ?> +<?php @unlink(__DIR__ . '/bug49056.tmp'); ?> --EXPECT-- array(2) { ["Cooking_furniture"]=> diff --git a/ext/standard/tests/general_functions/bug49847.phpt b/ext/standard/tests/general_functions/bug49847.phpt index b7fbded2fc..a35477d00c 100644 --- a/ext/standard/tests/general_functions/bug49847.phpt +++ b/ext/standard/tests/general_functions/bug49847.phpt @@ -5,7 +5,7 @@ Bug #49847 (exec() fails on lines larger then 4095 bytes) $iswin = substr(PHP_OS, 0, 3) == "WIN"; if ($iswin) { - $f = dirname(__FILE__) . '\\bug49847.tmp'; + $f = __DIR__ . '\\bug49847.tmp'; $s = str_repeat(' ', 4097); $s .= '1'; file_put_contents($f, $s); diff --git a/ext/standard/tests/general_functions/bug52138.phpt b/ext/standard/tests/general_functions/bug52138.phpt index d4f38735ab..1cf6b82b61 100644 --- a/ext/standard/tests/general_functions/bug52138.phpt +++ b/ext/standard/tests/general_functions/bug52138.phpt @@ -6,7 +6,7 @@ Bug #52138 (Constants are parsed into the ini file for section names) define('MYCONST', 1); define('A', 'B'); -$ini_file = dirname(__FILE__)."/bug52138.data"; +$ini_file = __DIR__."/bug52138.data"; $ret = parse_ini_file($ini_file, true); var_dump($ret); diff --git a/ext/standard/tests/general_functions/bug60723.phpt b/ext/standard/tests/general_functions/bug60723.phpt index 07b801bcfe..504de7afbf 100644 --- a/ext/standard/tests/general_functions/bug60723.phpt +++ b/ext/standard/tests/general_functions/bug60723.phpt @@ -5,7 +5,7 @@ date.timezone=ASIA/Chongqing log_errors=On --FILE-- <?php -$dir = dirname(__FILE__); +$dir = __DIR__; $log = $dir . "/tmp.err"; ini_set("error_log", $log); echo $aa; diff --git a/ext/standard/tests/general_functions/bug69646.phpt b/ext/standard/tests/general_functions/bug69646.phpt index 4c897516c8..97e60bfff0 100644 --- a/ext/standard/tests/general_functions/bug69646.phpt +++ b/ext/standard/tests/general_functions/bug69646.phpt @@ -21,7 +21,7 @@ var_dump( \$argv ); SCRIPT; -$script = dirname(__FILE__) . DIRECTORY_SEPARATOR . "arginfo.php"; +$script = __DIR__ . DIRECTORY_SEPARATOR . "arginfo.php"; file_put_contents($script, $helper_script); $cmd = PHP_BINARY . " " . $script . " " . escapeshellarg($a) . " " . escapeshellarg($b); diff --git a/ext/standard/tests/general_functions/bug70018.phpt b/ext/standard/tests/general_functions/bug70018.phpt index d4c38b9d8a..f7aefcc03f 100644 --- a/ext/standard/tests/general_functions/bug70018.phpt +++ b/ext/standard/tests/general_functions/bug70018.phpt @@ -10,7 +10,7 @@ if ("cli" != php_sapi_name()) { <?php $output = array(); -$test_fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . md5(uniqid()); +$test_fl = __DIR__ . DIRECTORY_SEPARATOR . md5(uniqid()); file_put_contents($test_fl, '<?php echo "abc\f\n \n";'); exec(PHP_BINARY . " -n $test_fl", $output); diff --git a/ext/standard/tests/general_functions/floatval.phpt b/ext/standard/tests/general_functions/floatval.phpt index 1bb4d1151c..a01e01dbf1 100644 --- a/ext/standard/tests/general_functions/floatval.phpt +++ b/ext/standard/tests/general_functions/floatval.phpt @@ -54,7 +54,7 @@ echo "\n*** Testing floatval() on non floating types ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); fclose($fp); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); closedir($dfp); // other types in an array diff --git a/ext/standard/tests/general_functions/floatval_variation1.phpt b/ext/standard/tests/general_functions/floatval_variation1.phpt index 0bb11e95c4..2b49cd195b 100644 --- a/ext/standard/tests/general_functions/floatval_variation1.phpt +++ b/ext/standard/tests/general_functions/floatval_variation1.phpt @@ -11,7 +11,7 @@ Testing floatval() and its alias doubleval() functions : usage variations - diff // get a resource type variable $fp = fopen (__FILE__, "r"); fclose($fp); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); closedir($dfp); // other types in an array diff --git a/ext/standard/tests/general_functions/get_included_files.phpt b/ext/standard/tests/general_functions/get_included_files.phpt index e6d00a56a1..df41ec8513 100644 --- a/ext/standard/tests/general_functions/get_included_files.phpt +++ b/ext/standard/tests/general_functions/get_included_files.phpt @@ -14,11 +14,11 @@ echo "*** Testing get_included_files()\n"; echo "\n-- List included files at start --\n"; var_dump(get_included_files()); -include(dirname(__FILE__)."/get_included_files_inc1.inc"); +include(__DIR__."/get_included_files_inc1.inc"); echo "\n-- List included files atfter including inc1 -\n"; var_dump(get_included_files()); -include(dirname(__FILE__)."/get_included_files_inc2.inc"); +include(__DIR__."/get_included_files_inc2.inc"); echo "\n-- List included files atfter including inc2 which will include inc3 which includes inc1 --\n"; var_dump(get_included_files()); diff --git a/ext/standard/tests/general_functions/gettype_settype_basic.phpt b/ext/standard/tests/general_functions/gettype_settype_basic.phpt index 59252b5e2c..f8ff6c4460 100644 --- a/ext/standard/tests/general_functions/gettype_settype_basic.phpt +++ b/ext/standard/tests/general_functions/gettype_settype_basic.phpt @@ -28,7 +28,7 @@ set_error_handler("foo"); echo "**** Testing gettype() and settype() functions ****\n"; $fp = fopen(__FILE__, "r"); -$dfp = opendir( dirname(__FILE__) ); +$dfp = opendir( __DIR__ ); $var1 = "another string"; $var2 = array(2,3,4); diff --git a/ext/standard/tests/general_functions/intval.phpt b/ext/standard/tests/general_functions/intval.phpt index 7f3d895fbe..1650b91c6f 100644 --- a/ext/standard/tests/general_functions/intval.phpt +++ b/ext/standard/tests/general_functions/intval.phpt @@ -63,7 +63,7 @@ echo "\n*** Testing intval() on non integer types ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); fclose($fp); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); closedir($dfp); // unset variable diff --git a/ext/standard/tests/general_functions/is_array.phpt b/ext/standard/tests/general_functions/is_array.phpt index 223b732904..66e5b64934 100644 --- a/ext/standard/tests/general_functions/is_array.phpt +++ b/ext/standard/tests/general_functions/is_array.phpt @@ -37,7 +37,7 @@ echo "\n*** Testing is_array() on non array types ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variables $unset_array = array(10); diff --git a/ext/standard/tests/general_functions/is_bool.phpt b/ext/standard/tests/general_functions/is_bool.phpt index a6c6111fa1..34d5e0ef6c 100644 --- a/ext/standard/tests/general_functions/is_bool.phpt +++ b/ext/standard/tests/general_functions/is_bool.phpt @@ -26,7 +26,7 @@ echo "\n*** Testing is_bool() on non boolean values ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variable $unset_bool1 = true; diff --git a/ext/standard/tests/general_functions/is_float.phpt b/ext/standard/tests/general_functions/is_float.phpt index b71a5283db..cec0e445ab 100644 --- a/ext/standard/tests/general_functions/is_float.phpt +++ b/ext/standard/tests/general_functions/is_float.phpt @@ -57,7 +57,7 @@ foreach ($floats as $float ) { echo "\n*** Testing is_float(), is_double() & is_real() with non float values ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variable $unset_var = 10; diff --git a/ext/standard/tests/general_functions/is_float_64bit.phpt b/ext/standard/tests/general_functions/is_float_64bit.phpt index 9410a21fe2..38fc52675f 100644 --- a/ext/standard/tests/general_functions/is_float_64bit.phpt +++ b/ext/standard/tests/general_functions/is_float_64bit.phpt @@ -59,7 +59,7 @@ foreach ($floats as $float ) { echo "\n*** Testing is_float(), is_double() & is_real() with non float values ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variable $unset_var = 10; diff --git a/ext/standard/tests/general_functions/is_int.phpt b/ext/standard/tests/general_functions/is_int.phpt index d154b30748..4cfbf653be 100644 --- a/ext/standard/tests/general_functions/is_int.phpt +++ b/ext/standard/tests/general_functions/is_int.phpt @@ -46,7 +46,7 @@ echo "\n*** Testing is_int(), is_integer() & is_long() with non integer values // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variable $unset_var = 10; diff --git a/ext/standard/tests/general_functions/is_int_64bit.phpt b/ext/standard/tests/general_functions/is_int_64bit.phpt index 68ef75b35b..dabc7be705 100644 --- a/ext/standard/tests/general_functions/is_int_64bit.phpt +++ b/ext/standard/tests/general_functions/is_int_64bit.phpt @@ -48,7 +48,7 @@ echo "\n*** Testing is_int(), is_integer() & is_long() with non integer values // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variable $unset_var = 10; diff --git a/ext/standard/tests/general_functions/is_null.phpt b/ext/standard/tests/general_functions/is_null.phpt index fa7c87f791..9082f5fcd1 100644 --- a/ext/standard/tests/general_functions/is_null.phpt +++ b/ext/standard/tests/general_functions/is_null.phpt @@ -44,7 +44,7 @@ echo "\n*** Testing is_bool() on non null values ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // other types in a array $not_null_types = array ( diff --git a/ext/standard/tests/general_functions/is_numeric.phpt b/ext/standard/tests/general_functions/is_numeric.phpt index 0019cf18d2..c23e5e3b8c 100644 --- a/ext/standard/tests/general_functions/is_numeric.phpt +++ b/ext/standard/tests/general_functions/is_numeric.phpt @@ -99,7 +99,7 @@ echo "\n*** Testing is_numeric() on non numeric types ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variable $unset_var = 10.5; diff --git a/ext/standard/tests/general_functions/is_object.phpt b/ext/standard/tests/general_functions/is_object.phpt index 8abc766376..96c515bf65 100644 --- a/ext/standard/tests/general_functions/is_object.phpt +++ b/ext/standard/tests/general_functions/is_object.phpt @@ -102,7 +102,7 @@ echo "\n*** Testing is_object() on non object types ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset object $unset_object = new foo(); diff --git a/ext/standard/tests/general_functions/is_string.phpt b/ext/standard/tests/general_functions/is_string.phpt index 72a885a57a..ea2fb36a24 100644 --- a/ext/standard/tests/general_functions/is_string.phpt +++ b/ext/standard/tests/general_functions/is_string.phpt @@ -62,7 +62,7 @@ echo "\n*** Testing is_string() on non string values ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset vars $unset_string1 = "string"; diff --git a/ext/standard/tests/general_functions/parse_ini_basic.phpt b/ext/standard/tests/general_functions/parse_ini_basic.phpt index 8d7b2f8a22..481f24045f 100644 --- a/ext/standard/tests/general_functions/parse_ini_basic.phpt +++ b/ext/standard/tests/general_functions/parse_ini_basic.phpt @@ -6,7 +6,7 @@ basicqval=FUBAR_QUOTES_VARIABLE --FILE-- <?php -$ini_file = dirname(__FILE__)."/parse_ini_basic.data"; +$ini_file = __DIR__."/parse_ini_basic.data"; define('TEST_CONSTANT', 'this_is_test_constant'); diff --git a/ext/standard/tests/general_functions/parse_ini_booleans.phpt b/ext/standard/tests/general_functions/parse_ini_booleans.phpt index 5b854c3f41..3868147e62 100644 --- a/ext/standard/tests/general_functions/parse_ini_booleans.phpt +++ b/ext/standard/tests/general_functions/parse_ini_booleans.phpt @@ -3,7 +3,7 @@ parse_ini_file() boolean operators --FILE-- <?php -$ini_file = dirname(__FILE__)."/parse_ini_booleans.data"; +$ini_file = __DIR__."/parse_ini_booleans.data"; var_dump(parse_ini_file($ini_file, 1)); diff --git a/ext/standard/tests/general_functions/parse_ini_file.phpt b/ext/standard/tests/general_functions/parse_ini_file.phpt index ebc714455d..368d262a6e 100644 --- a/ext/standard/tests/general_functions/parse_ini_file.phpt +++ b/ext/standard/tests/general_functions/parse_ini_file.phpt @@ -5,7 +5,7 @@ parse_ini_file() multiple calls --FILE-- <?php -$filename = dirname(__FILE__)."/parse_ini_file.dat"; +$filename = __DIR__."/parse_ini_file.dat"; @unlink($filename); /* Make sure the file really does not exist! */ var_dump(parse_ini_file()); diff --git a/ext/standard/tests/general_functions/print_r.phpt b/ext/standard/tests/general_functions/print_r.phpt index fe02a97c18..bcf5231144 100644 --- a/ext/standard/tests/general_functions/print_r.phpt +++ b/ext/standard/tests/general_functions/print_r.phpt @@ -230,7 +230,7 @@ echo "\n*** Testing print_r() on resources ***\n"; $file_handle = fopen(__FILE__, "r"); /* directory type resource */ -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); $resources = array ( $file_handle, diff --git a/ext/standard/tests/general_functions/print_r_64bit.phpt b/ext/standard/tests/general_functions/print_r_64bit.phpt index 5447a94db8..8584f08758 100644 --- a/ext/standard/tests/general_functions/print_r_64bit.phpt +++ b/ext/standard/tests/general_functions/print_r_64bit.phpt @@ -234,7 +234,7 @@ echo "\n*** Testing print_r() on resources ***\n"; $file_handle = fopen(__FILE__, "r"); /* directory type resource */ -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); $resources = array ( $file_handle, diff --git a/ext/standard/tests/general_functions/proc_open-mb0.phpt b/ext/standard/tests/general_functions/proc_open-mb0.phpt index 69c3dd53e5..4ff38267ad 100644 --- a/ext/standard/tests/general_functions/proc_open-mb0.phpt +++ b/ext/standard/tests/general_functions/proc_open-mb0.phpt @@ -10,7 +10,7 @@ if (!function_exists("proc_open")) echo "skip proc_open() is not available"; $php = PHP_BINARY; -$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . "proc_only_mb0.php"; +$f = __DIR__ . DIRECTORY_SEPARATOR . "proc_only_mb0.php"; file_put_contents($f,'<?php var_dump($argv); ?>'); $ds = array( diff --git a/ext/standard/tests/general_functions/proc_open-mb1.phpt b/ext/standard/tests/general_functions/proc_open-mb1.phpt index 2b922917f3..e7a7a4cbfc 100644 --- a/ext/standard/tests/general_functions/proc_open-mb1.phpt +++ b/ext/standard/tests/general_functions/proc_open-mb1.phpt @@ -10,7 +10,7 @@ if (!function_exists("proc_open")) echo "skip proc_open() is not available"; $php = PHP_BINARY; -$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . "proc_only_mb1.php"; +$f = __DIR__ . DIRECTORY_SEPARATOR . "proc_only_mb1.php"; file_put_contents($f,'<?php var_dump($argv); ?>'); $ds = array( diff --git a/ext/standard/tests/general_functions/strval.phpt b/ext/standard/tests/general_functions/strval.phpt index b814733dd0..e904fdcaa0 100644 --- a/ext/standard/tests/general_functions/strval.phpt +++ b/ext/standard/tests/general_functions/strval.phpt @@ -106,7 +106,7 @@ foreach ($scalars as $scalar ) { echo "\n*** Testing strval() with non_scalar values ***\n"; // get a resource type variable $fp = fopen(__FILE__, "r"); -$dfp = opendir( dirname(__FILE__) ); +$dfp = opendir( __DIR__ ); // unset variable $unset_var = 10; diff --git a/ext/standard/tests/general_functions/var_dump.phpt b/ext/standard/tests/general_functions/var_dump.phpt index f0da840c3b..4641051541 100644 --- a/ext/standard/tests/general_functions/var_dump.phpt +++ b/ext/standard/tests/general_functions/var_dump.phpt @@ -229,7 +229,7 @@ echo "\n*** Testing var_dump() on resources ***\n"; $file_handle = fopen(__FILE__, "r"); /* directory type resource */ -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); $resources = array ( $file_handle, diff --git a/ext/standard/tests/general_functions/var_dump_64bit.phpt b/ext/standard/tests/general_functions/var_dump_64bit.phpt index a2476ef3f6..738de410e4 100644 --- a/ext/standard/tests/general_functions/var_dump_64bit.phpt +++ b/ext/standard/tests/general_functions/var_dump_64bit.phpt @@ -229,7 +229,7 @@ echo "\n*** Testing var_dump() on resources ***\n"; $file_handle = fopen(__FILE__, "r"); /* directory type resource */ -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); $resources = array ( $file_handle, diff --git a/ext/standard/tests/image/bug13213.phpt b/ext/standard/tests/image/bug13213.phpt index d6b82a4f0c..7af1549586 100644 --- a/ext/standard/tests/image/bug13213.phpt +++ b/ext/standard/tests/image/bug13213.phpt @@ -2,7 +2,7 @@ Bug #13213 (GetImageSize and wrong JPEG Comments) --FILE-- <?php -var_dump(GetImageSize(dirname(__FILE__).'/bug13213.jpg')); +var_dump(GetImageSize(__DIR__.'/bug13213.jpg')); ?> --EXPECTF-- Warning: getimagesize(): corrupt JPEG data: 2 extraneous bytes before marker in %s%ebug13213.php on line %d diff --git a/ext/standard/tests/image/getimagesize.phpt b/ext/standard/tests/image/getimagesize.phpt index 1164f10c3e..2d0ab0154d 100644 --- a/ext/standard/tests/image/getimagesize.phpt +++ b/ext/standard/tests/image/getimagesize.phpt @@ -7,7 +7,7 @@ GetImageSize() --FILE-- <?php // Note: SWC requires zlib - $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); + $dir = opendir(__DIR__) or die('cannot open directory: '.__DIR__); $result = array(); $files = array(); while (($file = readdir($dir)) !== FALSE) { @@ -18,7 +18,7 @@ GetImageSize() closedir($dir); sort($files); foreach($files as $file) { - $result[$file] = getimagesize(dirname(__FILE__)."/$file"); + $result[$file] = getimagesize(__DIR__."/$file"); } var_dump($result); ?> diff --git a/ext/standard/tests/image/getimagesize_246x247.phpt b/ext/standard/tests/image/getimagesize_246x247.phpt index e5a0aea779..5908671f1c 100644 --- a/ext/standard/tests/image/getimagesize_246x247.phpt +++ b/ext/standard/tests/image/getimagesize_246x247.phpt @@ -7,7 +7,7 @@ GetImageSize() with 246x247 pixels --FILE-- <?php // Note: SWC requires zlib - $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); + $dir = opendir(__DIR__) or die('cannot open directory: '.__DIR__); $result = array(); $files = array(); while (($file = readdir($dir)) !== FALSE) { @@ -18,7 +18,7 @@ GetImageSize() with 246x247 pixels closedir($dir); sort($files); foreach($files as $file) { - $result[$file] = getimagesize(dirname(__FILE__)."/$file"); + $result[$file] = getimagesize(__DIR__."/$file"); } var_dump($result); ?> diff --git a/ext/standard/tests/image/getimagesize_384x385.phpt b/ext/standard/tests/image/getimagesize_384x385.phpt index 0051df71e0..9ed1104220 100644 --- a/ext/standard/tests/image/getimagesize_384x385.phpt +++ b/ext/standard/tests/image/getimagesize_384x385.phpt @@ -7,7 +7,7 @@ GetImageSize() with 384x385 pixels --FILE-- <?php // Note: SWC requires zlib - $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); + $dir = opendir(__DIR__) or die('cannot open directory: '.__DIR__); $result = array(); $files = array(); while (($file = readdir($dir)) !== FALSE) { @@ -18,7 +18,7 @@ GetImageSize() with 384x385 pixels closedir($dir); sort($files); foreach($files as $file) { - $result[$file] = getimagesize(dirname(__FILE__)."/$file"); + $result[$file] = getimagesize(__DIR__."/$file"); } var_dump($result); ?> diff --git a/ext/standard/tests/image/getimagesize_basic.phpt b/ext/standard/tests/image/getimagesize_basic.phpt index dc2ec5e2e7..1129975742 100644 --- a/ext/standard/tests/image/getimagesize_basic.phpt +++ b/ext/standard/tests/image/getimagesize_basic.phpt @@ -41,7 +41,7 @@ echo "*** Testing getimagesize() : basic functionality ***\n"; // loop through each element of the array for imagetype foreach($imagetype_filenames as $key => $filename) { echo "\n-- $key ($filename) --\n"; - var_dump( getimagesize(dirname(__FILE__)."/$filename", $info) ); + var_dump( getimagesize(__DIR__."/$filename", $info) ); var_dump( $info ); }; ?> diff --git a/ext/standard/tests/image/getimagesize_jpgapp.phpt b/ext/standard/tests/image/getimagesize_jpgapp.phpt index 000cef0555..2776c8617a 100644 --- a/ext/standard/tests/image/getimagesize_jpgapp.phpt +++ b/ext/standard/tests/image/getimagesize_jpgapp.phpt @@ -16,7 +16,7 @@ $arr['this'] = "will"; $arr['all'] = "be destroyed!"; $arr['APP1'] = "and this too"; -getimagesize( dirname(__FILE__)."/testAPP.jpg", $arr); +getimagesize( __DIR__."/testAPP.jpg", $arr); foreach ($arr as $key => $value) { echo "$key - length: ". strlen($value) ."; md5: " . md5($value) . "\n" ; diff --git a/ext/standard/tests/image/getimagesize_swc.phpt b/ext/standard/tests/image/getimagesize_swc.phpt index f8c74498a4..5e79a5d0a2 100644 --- a/ext/standard/tests/image/getimagesize_swc.phpt +++ b/ext/standard/tests/image/getimagesize_swc.phpt @@ -8,7 +8,7 @@ GetImageSize() for compressed swf files ?> --FILE-- <?php - var_dump(getimagesize(dirname(__FILE__) . "/test13pix.swf")); + var_dump(getimagesize(__DIR__ . "/test13pix.swf")); ?> --EXPECT-- array(5) { diff --git a/ext/standard/tests/image/getimagesize_tif_mm.phpt b/ext/standard/tests/image/getimagesize_tif_mm.phpt index 3e044e12be..fe4efaf357 100644 --- a/ext/standard/tests/image/getimagesize_tif_mm.phpt +++ b/ext/standard/tests/image/getimagesize_tif_mm.phpt @@ -9,7 +9,7 @@ GetImageSize() for tiff format with big-endian (aka Motorola, aka MM) ordering */ echo "*** Testing getimagesize() : tiff_mm format ***\n"; -var_dump(getimagesize(dirname(__FILE__) . "/2x2mm.tif", $arr)); +var_dump(getimagesize(__DIR__ . "/2x2mm.tif", $arr)); var_dump($arr); ?> diff --git a/ext/standard/tests/image/getimagesize_variation2.phpt b/ext/standard/tests/image/getimagesize_variation2.phpt index eec2301c40..c475a9cb05 100644 --- a/ext/standard/tests/image/getimagesize_variation2.phpt +++ b/ext/standard/tests/image/getimagesize_variation2.phpt @@ -16,7 +16,7 @@ set_error_handler('test_error_handler'); echo "*** Testing getimagesize() : usage variations ***\n"; // Initialise function arguments not being substituted (if any) -$imagefile = dirname(__FILE__)."/test1pix.jpg"; +$imagefile = __DIR__."/test1pix.jpg"; //get an unset variable $unset_var = 10; diff --git a/ext/standard/tests/image/getimagesize_variation3.phpt b/ext/standard/tests/image/getimagesize_variation3.phpt index f935a9f883..a608047707 100644 --- a/ext/standard/tests/image/getimagesize_variation3.phpt +++ b/ext/standard/tests/image/getimagesize_variation3.phpt @@ -27,8 +27,8 @@ echo "*** Testing getimagesize() : variation ***\n"; //loop through each element of the array for filename foreach($file_types_array as $key => $filename) { echo "\n-- $key ($filename) --\n"; - var_dump( getimagesize(dirname(__FILE__)."/$filename" ) ); - var_dump( getimagesize(dirname(__FILE__)."/$filename", $info) ); + var_dump( getimagesize(__DIR__."/$filename" ) ); + var_dump( getimagesize(__DIR__."/$filename", $info) ); var_dump( $info ); }; ?> diff --git a/ext/standard/tests/image/getimagesize_variation4.phpt b/ext/standard/tests/image/getimagesize_variation4.phpt index ae73e27921..526e35c305 100644 --- a/ext/standard/tests/image/getimagesize_variation4.phpt +++ b/ext/standard/tests/image/getimagesize_variation4.phpt @@ -15,7 +15,7 @@ Test getimagesize() function : variation - For shockwave-flash format echo "*** Testing getimagesize() : variation ***\n"; -var_dump( getimagesize(dirname(__FILE__)."/test13pix.swf", $info) ); +var_dump( getimagesize(__DIR__."/test13pix.swf", $info) ); var_dump( $info ); ?> ===DONE=== diff --git a/ext/standard/tests/image/getimagesize_variation_003.phpt b/ext/standard/tests/image/getimagesize_variation_003.phpt index c242234e97..0e82e6fae3 100644 --- a/ext/standard/tests/image/getimagesize_variation_003.phpt +++ b/ext/standard/tests/image/getimagesize_variation_003.phpt @@ -27,8 +27,8 @@ echo "*** Testing getimagesize() : variation ***\n"; //loop through each element of the array for filename foreach($file_types_array as $key => $filename) { echo "\n-- $key ($filename) --\n"; - var_dump( getimagesize(dirname(__FILE__)."/$filename" ) ); - var_dump( getimagesize(dirname(__FILE__)."/$filename", $info) ); + var_dump( getimagesize(__DIR__."/$filename" ) ); + var_dump( getimagesize(__DIR__."/$filename", $info) ); var_dump( $info ); }; ?> diff --git a/ext/standard/tests/image/getimagesize_variation_005.phpt b/ext/standard/tests/image/getimagesize_variation_005.phpt index ea7b813d77..79d2de03e9 100644 --- a/ext/standard/tests/image/getimagesize_variation_005.phpt +++ b/ext/standard/tests/image/getimagesize_variation_005.phpt @@ -15,7 +15,7 @@ Test getimagesize() function : basic functionality for shockwave-flash echo "*** Testing getimagesize() : basic functionality ***\n"; -var_dump( getimagesize(dirname(__FILE__)."/test13pix.swf", $info) ); +var_dump( getimagesize(__DIR__."/test13pix.swf", $info) ); var_dump( $info ); ?> ===DONE=== diff --git a/ext/standard/tests/image/getimagesize_wbmp.phpt b/ext/standard/tests/image/getimagesize_wbmp.phpt index e09eab40af..268a7b7b08 100644 --- a/ext/standard/tests/image/getimagesize_wbmp.phpt +++ b/ext/standard/tests/image/getimagesize_wbmp.phpt @@ -9,7 +9,7 @@ GetImageSize() for wbmp format */ echo "*** Testing getimagesize() : wbmp format ***\n"; -var_dump(getimagesize(dirname(__FILE__) . "/75x50.wbmp", $arr)); +var_dump(getimagesize(__DIR__ . "/75x50.wbmp", $arr)); var_dump($arr); ?> diff --git a/ext/standard/tests/image/getimagesize_xbm.phpt b/ext/standard/tests/image/getimagesize_xbm.phpt index 635750c51c..6520cdb46e 100644 --- a/ext/standard/tests/image/getimagesize_xbm.phpt +++ b/ext/standard/tests/image/getimagesize_xbm.phpt @@ -9,7 +9,7 @@ GetImageSize() for xbm format */ echo "*** Testing getimagesize() : xbm format ***\n"; -var_dump(getimagesize(dirname(__FILE__) . "/75x50.xbm", $arr)); +var_dump(getimagesize(__DIR__ . "/75x50.xbm", $arr)); var_dump($arr); ?> diff --git a/ext/standard/tests/image/image_type_to_mime_type.phpt b/ext/standard/tests/image/image_type_to_mime_type.phpt index 199d2c4b58..f1a40e3eb3 100644 --- a/ext/standard/tests/image/image_type_to_mime_type.phpt +++ b/ext/standard/tests/image/image_type_to_mime_type.phpt @@ -7,7 +7,7 @@ image_type_to_mime_type() --FILE-- <?php // Note: SWC requires zlib - $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); + $dir = opendir(__DIR__) or die('cannot open directory: '.__DIR__); $result = array(); $files = array(); while (($file = readdir($dir)) !== FALSE) { @@ -18,7 +18,7 @@ image_type_to_mime_type() closedir($dir); sort($files); foreach($files as $file) { - $result[$file] = getimagesize(dirname(__FILE__)."/$file"); + $result[$file] = getimagesize(__DIR__."/$file"); $result[$file] = image_type_to_mime_type($result[$file][2]); } var_dump($result); diff --git a/ext/standard/tests/image/iptcembed_001.phpt b/ext/standard/tests/image/iptcembed_001.phpt index a8ca381ce8..83cddcd47c 100644 --- a/ext/standard/tests/image/iptcembed_001.phpt +++ b/ext/standard/tests/image/iptcembed_001.phpt @@ -3,7 +3,7 @@ iptcembed() and wrong file --FILE-- <?php -$file = dirname(__FILE__).'/iptcembed_001.data'; +$file = __DIR__.'/iptcembed_001.data'; $fp = fopen($file, "w"); fwrite($fp, "-1-1"); fclose($fp); diff --git a/ext/standard/tests/mail/mail_basic_alt1-win32.phpt b/ext/standard/tests/mail/mail_basic_alt1-win32.phpt index eb4c47271f..f615972a84 100644 --- a/ext/standard/tests/mail/mail_basic_alt1-win32.phpt +++ b/ext/standard/tests/mail/mail_basic_alt1-win32.phpt @@ -7,7 +7,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -25,7 +25,7 @@ ini_set("smtp_port", 25); ini_set("sendmail_from", "user@example.com"); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/mail/mail_basic_alt2-win32.phpt b/ext/standard/tests/mail/mail_basic_alt2-win32.phpt index dedb1e3ff8..5efe4504fe 100644 --- a/ext/standard/tests/mail/mail_basic_alt2-win32.phpt +++ b/ext/standard/tests/mail/mail_basic_alt2-win32.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -21,7 +21,7 @@ max_execution_time = 120 error_reporting(E_ALL & ~E_STRICT); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/mail/mail_basic_alt3-win32.phpt b/ext/standard/tests/mail/mail_basic_alt3-win32.phpt index 5d1ec6b7a3..955c47451f 100644 --- a/ext/standard/tests/mail/mail_basic_alt3-win32.phpt +++ b/ext/standard/tests/mail/mail_basic_alt3-win32.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -21,7 +21,7 @@ max_execution_time = 120 error_reporting(E_ALL & ~E_STRICT); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/mail/mail_basic_alt4-win32.phpt b/ext/standard/tests/mail/mail_basic_alt4-win32.phpt index c90e909c6f..4cf3367073 100644 --- a/ext/standard/tests/mail/mail_basic_alt4-win32.phpt +++ b/ext/standard/tests/mail/mail_basic_alt4-win32.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -21,7 +21,7 @@ max_execution_time = 120 error_reporting(E_ALL & ~E_STRICT); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/mail/mail_variation_alt1-win32.phpt b/ext/standard/tests/mail/mail_variation_alt1-win32.phpt index 258bf31377..598dea9c3b 100644 --- a/ext/standard/tests/mail/mail_variation_alt1-win32.phpt +++ b/ext/standard/tests/mail/mail_variation_alt1-win32.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -24,7 +24,7 @@ ini_set("smtp_port", 2525); ini_set("sendmail_from", "user@example.com"); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/mail/mail_variation_alt2-win32.phpt b/ext/standard/tests/mail/mail_variation_alt2-win32.phpt index 4c8ee2ff6c..78df2c7ddf 100644 --- a/ext/standard/tests/mail/mail_variation_alt2-win32.phpt +++ b/ext/standard/tests/mail/mail_variation_alt2-win32.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -24,7 +24,7 @@ ini_set("smtp_port", 25); ini_set("sendmail_from", "user@example.com"); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/mail/mail_variation_alt3-win32.phpt b/ext/standard/tests/mail/mail_variation_alt3-win32.phpt index ae6e308715..63d6ea61fa 100644 --- a/ext/standard/tests/mail/mail_variation_alt3-win32.phpt +++ b/ext/standard/tests/mail/mail_variation_alt3-win32.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -23,7 +23,7 @@ ini_set("SMTP", "localhost"); ini_set("smtp_port", 25); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/math/abs.phpt b/ext/standard/tests/math/abs.phpt index 9350fc71fb..af8732811d 100644 --- a/ext/standard/tests/math/abs.phpt +++ b/ext/standard/tests/math/abs.phpt @@ -18,7 +18,7 @@ $tests = <<<TESTS -(LONG_MIN+1) === abs(LONG_MIN+1) TESTS; -include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); +include(__DIR__ . '/../../../../tests/quicktester.inc'); --EXPECT-- 1,1,0,0 OK diff --git a/ext/standard/tests/math/acos_basic.phpt b/ext/standard/tests/math/acos_basic.phpt index a5af21e958..6f73d40f40 100644 --- a/ext/standard/tests/math/acos_basic.phpt +++ b/ext/standard/tests/math/acos_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); diff --git a/ext/standard/tests/math/acosh_basic.phpt b/ext/standard/tests/math/acosh_basic.phpt index ba1a706574..a9ba199df5 100644 --- a/ext/standard/tests/math/acosh_basic.phpt +++ b/ext/standard/tests/math/acosh_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); echo "acosh 1.1276259652064= "; diff --git a/ext/standard/tests/math/asin_basic.phpt b/ext/standard/tests/math/asin_basic.phpt index 7c7542e0f6..ec43d50692 100644 --- a/ext/standard/tests/math/asin_basic.phpt +++ b/ext/standard/tests/math/asin_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); diff --git a/ext/standard/tests/math/asinh_basic.phpt b/ext/standard/tests/math/asinh_basic.phpt index 31643fa3c4..8fd189c66a 100644 --- a/ext/standard/tests/math/asinh_basic.phpt +++ b/ext/standard/tests/math/asinh_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); echo "asinh 0.52109530549375= "; diff --git a/ext/standard/tests/math/atan_basic.phpt b/ext/standard/tests/math/atan_basic.phpt index 180263fe59..24f1f4b924 100644 --- a/ext/standard/tests/math/atan_basic.phpt +++ b/ext/standard/tests/math/atan_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); echo "atan 1.7320508075689 = "; diff --git a/ext/standard/tests/math/atanh_basic.phpt b/ext/standard/tests/math/atanh_basic.phpt index 87580ef181..8b994bc5fd 100644 --- a/ext/standard/tests/math/atanh_basic.phpt +++ b/ext/standard/tests/math/atanh_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); echo "atanh 0.46211715726001 = "; diff --git a/ext/standard/tests/math/cos_basic.phpt b/ext/standard/tests/math/cos_basic.phpt index 8ad7010ce1..863d443830 100644 --- a/ext/standard/tests/math/cos_basic.phpt +++ b/ext/standard/tests/math/cos_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); diff --git a/ext/standard/tests/math/cosh_basic.phpt b/ext/standard/tests/math/cosh_basic.phpt index e6cfd868a0..5b52fb2a63 100644 --- a/ext/standard/tests/math/cosh_basic.phpt +++ b/ext/standard/tests/math/cosh_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); echo "cosh .5 = "; diff --git a/ext/standard/tests/math/deg2rad_basic.phpt b/ext/standard/tests/math/deg2rad_basic.phpt index 3b756281fa..6db1be4da8 100644 --- a/ext/standard/tests/math/deg2rad_basic.phpt +++ b/ext/standard/tests/math/deg2rad_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); $arg_0 = 0.0; diff --git a/ext/standard/tests/math/log10_basic.phpt b/ext/standard/tests/math/log10_basic.phpt index 3ea14b59ac..b81284faf2 100644 --- a/ext/standard/tests/math/log10_basic.phpt +++ b/ext/standard/tests/math/log10_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); $arg_0 = 1.0; diff --git a/ext/standard/tests/math/pow-operator.phpt b/ext/standard/tests/math/pow-operator.phpt index 66c65f4dea..c72e946422 100644 --- a/ext/standard/tests/math/pow-operator.phpt +++ b/ext/standard/tests/math/pow-operator.phpt @@ -15,7 +15,7 @@ $tests = <<<TESTS TESTS; echo "On failure, please mail result to php-dev@lists.php.net\n"; - include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); + include(__DIR__ . '/../../../../tests/quicktester.inc'); --EXPECT-- On failure, please mail result to php-dev@lists.php.net OK diff --git a/ext/standard/tests/math/pow.phpt b/ext/standard/tests/math/pow.phpt index 896acd7bcf..534ecbd58f 100644 --- a/ext/standard/tests/math/pow.phpt +++ b/ext/standard/tests/math/pow.phpt @@ -141,7 +141,7 @@ LONG_MIN*LONG_MIN ~== pow(LONG_MIN,2.0) TESTS; echo "On failure, please mail result to php-dev@lists.php.net\n"; - include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); + include(__DIR__ . '/../../../../tests/quicktester.inc'); --EXPECT-- 1,1,0,0 On failure, please mail result to php-dev@lists.php.net diff --git a/ext/standard/tests/math/rad2deg_basic.phpt b/ext/standard/tests/math/rad2deg_basic.phpt index e79e591cf7..d09f376151 100644 --- a/ext/standard/tests/math/rad2deg_basic.phpt +++ b/ext/standard/tests/math/rad2deg_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); $arg_0 = 0.0; diff --git a/ext/standard/tests/math/round.phpt b/ext/standard/tests/math/round.phpt index 6a1615bd9a..16255c0a30 100644 --- a/ext/standard/tests/math/round.phpt +++ b/ext/standard/tests/math/round.phpt @@ -31,7 +31,7 @@ $tests = <<<TESTS LONG_MAX ~== floor(LONG_MAX + 0.5) TESTS; -include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); +include(__DIR__ . '/../../../../tests/quicktester.inc'); --EXPECT-- 1,1,0,0 OK diff --git a/ext/standard/tests/math/sin_basic.phpt b/ext/standard/tests/math/sin_basic.phpt index 27579cd289..f9be13bec9 100644 --- a/ext/standard/tests/math/sin_basic.phpt +++ b/ext/standard/tests/math/sin_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); diff --git a/ext/standard/tests/math/sinh_basic.phpt b/ext/standard/tests/math/sinh_basic.phpt index 2bcf42f9fd..8d16e1712e 100644 --- a/ext/standard/tests/math/sinh_basic.phpt +++ b/ext/standard/tests/math/sinh_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); echo "sinh .5 = "; diff --git a/ext/standard/tests/math/tan_basic.phpt b/ext/standard/tests/math/tan_basic.phpt index b804a662de..a4d95d77b0 100644 --- a/ext/standard/tests/math/tan_basic.phpt +++ b/ext/standard/tests/math/tan_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); $sixty = M_PI / 3.0; diff --git a/ext/standard/tests/math/tanh_basic.phpt b/ext/standard/tests/math/tanh_basic.phpt index 30eacca4cc..472d88b94e 100644 --- a/ext/standard/tests/math/tanh_basic.phpt +++ b/ext/standard/tests/math/tanh_basic.phpt @@ -8,7 +8,7 @@ precision = 14 * proto float tanh(float number) * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); diff --git a/ext/standard/tests/misc/get_browser_basic.phpt b/ext/standard/tests/misc/get_browser_basic.phpt index 312bd89b66..fdc2a7868c 100644 --- a/ext/standard/tests/misc/get_browser_basic.phpt +++ b/ext/standard/tests/misc/get_browser_basic.phpt @@ -23,7 +23,7 @@ browscap={PWD}/browscap.ini * Alias to functions: */ -$browsers = include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'browsernames.inc'; +$browsers = include __DIR__ . DIRECTORY_SEPARATOR . 'browsernames.inc'; echo "*** Testing get_browser() : basic functionality ***\n"; diff --git a/ext/standard/tests/misc/get_browser_error.phpt b/ext/standard/tests/misc/get_browser_error.phpt index 049c8b9431..c8689d8370 100644 --- a/ext/standard/tests/misc/get_browser_error.phpt +++ b/ext/standard/tests/misc/get_browser_error.phpt @@ -23,7 +23,7 @@ browscap={PWD}/browscap.ini * Alias to functions: */ -$browsers = include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'browsernames.inc'; +$browsers = include __DIR__ . DIRECTORY_SEPARATOR . 'browsernames.inc'; echo "*** Testing get_browser() : error functionality ***\n"; diff --git a/ext/standard/tests/misc/get_browser_variation1.phpt b/ext/standard/tests/misc/get_browser_variation1.phpt index 551206a569..2cd2c4e5a0 100644 --- a/ext/standard/tests/misc/get_browser_variation1.phpt +++ b/ext/standard/tests/misc/get_browser_variation1.phpt @@ -23,7 +23,7 @@ browscap={PWD}/browscap.ini * Alias to functions: */ -$browsers = include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'browsernames.inc'; +$browsers = include __DIR__ . DIRECTORY_SEPARATOR . 'browsernames.inc'; echo "*** Testing get_browser() : variation functionality: extra browser names ***\n"; diff --git a/ext/standard/tests/serialize/005.phpt b/ext/standard/tests/serialize/005.phpt index b152b91aad..c0f5917ec9 100644 --- a/ext/standard/tests/serialize/005.phpt +++ b/ext/standard/tests/serialize/005.phpt @@ -9,7 +9,7 @@ function do_autoload($class_name) { if ($class_name != 'autoload_not_available') { - require_once(dirname(__FILE__) . '/' . strtolower($class_name) . '.inc'); + require_once(__DIR__ . '/' . strtolower($class_name) . '.inc'); } echo __FUNCTION__ . "($class_name)\n"; } diff --git a/ext/standard/tests/serialize/bug30234.phpt b/ext/standard/tests/serialize/bug30234.phpt index 1a46fc7851..41ef9dd565 100644 --- a/ext/standard/tests/serialize/bug30234.phpt +++ b/ext/standard/tests/serialize/bug30234.phpt @@ -8,7 +8,7 @@ Bug #30234 (__autoload() not invoked for interfaces) <?php spl_autoload_register(function ($class_name) { - require_once(dirname(__FILE__) . '/' . strtolower($class_name) . '.inc'); + require_once(__DIR__ . '/' . strtolower($class_name) . '.inc'); echo __FUNCTION__ . '(' . $class_name . ")\n"; }); diff --git a/ext/standard/tests/streams/bug46024.phpt b/ext/standard/tests/streams/bug46024.phpt index 548768283c..4fb0eee402 100644 --- a/ext/standard/tests/streams/bug46024.phpt +++ b/ext/standard/tests/streams/bug46024.phpt @@ -9,7 +9,7 @@ $pipes = array(); $proc = proc_open( "$php -n -i" ,array(0 => array('pipe', 'r'), 1 => array('pipe', 'w')) - ,$pipes, dirname(__FILE__), array(), array() + ,$pipes, __DIR__, array(), array() ); var_dump($proc); if (!$proc) { diff --git a/ext/standard/tests/streams/bug64433.phpt b/ext/standard/tests/streams/bug64433.phpt index 897947f453..bb22edee55 100644 --- a/ext/standard/tests/streams/bug64433.phpt +++ b/ext/standard/tests/streams/bug64433.phpt @@ -2,9 +2,9 @@ Bug #60180 ($_SERVER["PHP_SELF"] incorrect) --SKIPIF-- <?php -if(!file_exists(dirname(__FILE__)."/../../../../sapi/cli/tests/php_cli_server.inc")) +if(!file_exists(__DIR__."/../../../../sapi/cli/tests/php_cli_server.inc")) die("skip could not found cli server script"); -$res = @include dirname(__FILE__)."/../../../../sapi/cli/tests/php_cli_server.inc"; +$res = @include __DIR__."/../../../../sapi/cli/tests/php_cli_server.inc"; if(!$res) { die("skip could not open cli server script"); } @@ -13,8 +13,8 @@ if(!$res) { server --FILE-- <?php -include dirname(__FILE__)."/../../../../sapi/cli/tests/php_cli_server.inc"; -php_cli_server_start(file_get_contents(dirname(__FILE__).'/bug64433_srv.inc')); +include __DIR__."/../../../../sapi/cli/tests/php_cli_server.inc"; +php_cli_server_start(file_get_contents(__DIR__.'/bug64433_srv.inc')); echo file_get_contents("http://".PHP_CLI_SERVER_ADDRESS."/index.php"); echo "default\n"; diff --git a/ext/standard/tests/streams/bug70198.phpt b/ext/standard/tests/streams/bug70198.phpt index 7b4b8cc16d..83efb9669b 100644 --- a/ext/standard/tests/streams/bug70198.phpt +++ b/ext/standard/tests/streams/bug70198.phpt @@ -16,7 +16,7 @@ server */ $srv_addr = "tcp://127.0.0.1:8964"; -$srv_fl = dirname(__FILE__) . "/bug70198_svr_" . md5(uniqid()) . ".php"; +$srv_fl = __DIR__ . "/bug70198_svr_" . md5(uniqid()) . ".php"; $srv_fl_cont = <<<SRV <?php \$socket = stream_socket_server('$srv_addr', \$errno, \$errstr); diff --git a/ext/standard/tests/streams/bug72534.phpt b/ext/standard/tests/streams/bug72534.phpt index 5ffc90b6bd..005b8b9d7d 100644 --- a/ext/standard/tests/streams/bug72534.phpt +++ b/ext/standard/tests/streams/bug72534.phpt @@ -2,7 +2,7 @@ Bug #72534 stream_socket_get_name crashes --FILE-- <?php -$fname = dirname(__FILE__) . '/aa.tmp'; +$fname = __DIR__ . '/aa.tmp'; $fp0 = fopen($fname, 'w'); var_dump(stream_socket_get_name($fp0, false)); var_dump(stream_socket_get_name($fp0, true)); @@ -10,7 +10,7 @@ fclose($fp0); ?> --CLEAN-- <?php -$fname = dirname(__FILE__) . '/aa.tmp'; +$fname = __DIR__ . '/aa.tmp'; unlink($fname); ?> --EXPECT-- diff --git a/ext/standard/tests/streams/bug72857.phpt b/ext/standard/tests/streams/bug72857.phpt index e91e6fa4ea..7b71c269f4 100644 --- a/ext/standard/tests/streams/bug72857.phpt +++ b/ext/standard/tests/streams/bug72857.phpt @@ -2,7 +2,7 @@ Bug #72857 stream_socket_recvfrom read access violation --FILE-- <?php - $fname = dirname(__FILE__) . DIRECTORY_SEPARATOR . "stream_socket_recvfrom.tmp"; + $fname = __DIR__ . DIRECTORY_SEPARATOR . "stream_socket_recvfrom.tmp"; $fp0 = fopen($fname, 'w'); $v2=10; $v3=STREAM_PEEK; diff --git a/ext/standard/tests/streams/proc_open_bug51800.phpt b/ext/standard/tests/streams/proc_open_bug51800.phpt index a107875e3e..7e7d2c7cb3 100644 --- a/ext/standard/tests/streams/proc_open_bug51800.phpt +++ b/ext/standard/tests/streams/proc_open_bug51800.phpt @@ -18,7 +18,7 @@ so then the pipe buffer is emptied more often and the child has chance to contin write. The behaviour might look some better if write/read in a separate thread, however this is much more resource greedy and complexer to integrate into the user script. */ -$callee = dirname(__FILE__) . "/process_proc_open_bug51800.php"; +$callee = __DIR__ . "/process_proc_open_bug51800.php"; $php = PHP_BINARY; $cmd = "$php $callee"; @@ -77,7 +77,7 @@ var_dump(array( ===DONE=== --CLEAN-- <?php -$callee = dirname(__FILE__) . "/process_proc_open_bug51800.php"; +$callee = __DIR__ . "/process_proc_open_bug51800.php"; unlink($callee); ?> --EXPECTF-- diff --git a/ext/standard/tests/streams/proc_open_bug51800_right.phpt b/ext/standard/tests/streams/proc_open_bug51800_right.phpt index 2753570fb1..22860f1fc3 100644 --- a/ext/standard/tests/streams/proc_open_bug51800_right.phpt +++ b/ext/standard/tests/streams/proc_open_bug51800_right.phpt @@ -2,7 +2,7 @@ Bug #51800 proc_open on Windows hangs forever, the right way to do it --FILE-- <?php -$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right.php"; +$callee = __DIR__ . "/process_proc_open_bug51800_right.php"; $php = PHP_BINARY; $cmd = "$php -n $callee"; @@ -60,7 +60,7 @@ var_dump(array( ===DONE=== --CLEAN-- <?php -$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right.php"; +$callee = __DIR__ . "/process_proc_open_bug51800_right.php"; unlink($callee); ?> --EXPECTF-- diff --git a/ext/standard/tests/streams/proc_open_bug51800_right2.phpt b/ext/standard/tests/streams/proc_open_bug51800_right2.phpt index 045d3f70db..d183557066 100644 --- a/ext/standard/tests/streams/proc_open_bug51800_right2.phpt +++ b/ext/standard/tests/streams/proc_open_bug51800_right2.phpt @@ -2,7 +2,7 @@ Bug #51800 proc_open on Windows hangs forever, the right way to do it with more data --FILE-- <?php -$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right2.php"; +$callee = __DIR__ . "/process_proc_open_bug51800_right2.php"; $php = PHP_BINARY; $cmd = "$php -n $callee"; @@ -66,7 +66,7 @@ var_dump(array( ===DONE=== --CLEAN-- <?php -$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right2.php"; +$callee = __DIR__ . "/process_proc_open_bug51800_right2.php"; unlink($callee); ?> --EXPECTF-- diff --git a/ext/standard/tests/streams/proc_open_bug69900.phpt b/ext/standard/tests/streams/proc_open_bug69900.phpt index 8e0c99fb83..6e1133a399 100644 --- a/ext/standard/tests/streams/proc_open_bug69900.phpt +++ b/ext/standard/tests/streams/proc_open_bug69900.phpt @@ -5,7 +5,7 @@ Bug #69900 Commandline input/output weird behaviour with STDIO error_reporting(E_ALL); -$fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test69900.php"; +$fl = __DIR__ . DIRECTORY_SEPARATOR . "test69900.php"; $max_ms = 10; $test_content = '<?php @@ -52,7 +52,7 @@ proc_close($process); ===DONE=== --CLEAN-- <?php -$fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test69900.php"; +$fl = __DIR__ . DIRECTORY_SEPARATOR . "test69900.php"; @unlink($fl); ?> --EXPECTF-- diff --git a/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt b/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt index ed7f7fb0ac..420d5ad490 100644 --- a/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt +++ b/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt @@ -39,7 +39,7 @@ CODE; include sprintf( "%s/../../../openssl/tests/ServerClientTestCase.inc", - dirname(__FILE__)); + __DIR__); ServerClientTestCase::getInstance()->run($serverCode, $clientCode); ?> --EXPECT-- diff --git a/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt b/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt index 6658d69a4b..bdcc077b67 100644 --- a/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt +++ b/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt @@ -3,11 +3,11 @@ stream_get_meta_data() on directories --FILE-- <?php -$dir = opendir(dirname(__FILE__)); +$dir = opendir(__DIR__); var_dump(stream_get_meta_data($dir)); closedir($dir); -$dirObject = dir(dirname(__FILE__)); +$dirObject = dir(__DIR__); var_dump(stream_get_meta_data($dirObject->handle)); ?> diff --git a/ext/standard/tests/strings/fprintf_variation_001.phpt b/ext/standard/tests/strings/fprintf_variation_001.phpt index df81c249b6..c010aef3d4 100644 --- a/ext/standard/tests/strings/fprintf_variation_001.phpt +++ b/ext/standard/tests/strings/fprintf_variation_001.phpt @@ -7,7 +7,7 @@ $float_variation = array( "%f","%-f", "%+f", "%7.2f", "%-7.2f", "%07.2f", "%-07. $float_numbers = array( 0, 1, -1, 0.32, -0.32, 3.4. -3.4, 2.54, -2.54 ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_001.txt'; +$data_file = __DIR__ . '/fprintf_variation_001.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_002.phpt b/ext/standard/tests/strings/fprintf_variation_002.phpt index 1cc1a4ddd7..f0f21b4630 100644 --- a/ext/standard/tests/strings/fprintf_variation_002.phpt +++ b/ext/standard/tests/strings/fprintf_variation_002.phpt @@ -7,7 +7,7 @@ $int_variation = array( "%d", "%-d", "%+d", "%7.2d", "%-7.2d", "%07.2d", "%-07.2 $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_002.txt'; +$data_file = __DIR__ . '/fprintf_variation_002.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_003.phpt b/ext/standard/tests/strings/fprintf_variation_003.phpt index 1e8eb4706f..9e9779371e 100644 --- a/ext/standard/tests/strings/fprintf_variation_003.phpt +++ b/ext/standard/tests/strings/fprintf_variation_003.phpt @@ -10,7 +10,7 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_003.txt'; +$data_file = __DIR__ . '/fprintf_variation_003.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_003_64bit.phpt b/ext/standard/tests/strings/fprintf_variation_003_64bit.phpt index 26db7ab18b..bdb59d5021 100644 --- a/ext/standard/tests/strings/fprintf_variation_003_64bit.phpt +++ b/ext/standard/tests/strings/fprintf_variation_003_64bit.phpt @@ -10,7 +10,7 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_003_64bit.txt'; +$data_file = __DIR__ . '/fprintf_variation_003_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_004.phpt b/ext/standard/tests/strings/fprintf_variation_004.phpt Binary files differindex aa47a298d8..103ca579f4 100644 --- a/ext/standard/tests/strings/fprintf_variation_004.phpt +++ b/ext/standard/tests/strings/fprintf_variation_004.phpt diff --git a/ext/standard/tests/strings/fprintf_variation_005.phpt b/ext/standard/tests/strings/fprintf_variation_005.phpt index 0be2cb6847..ddc4f70938 100644 --- a/ext/standard/tests/strings/fprintf_variation_005.phpt +++ b/ext/standard/tests/strings/fprintf_variation_005.phpt @@ -6,7 +6,7 @@ Test fprintf() function (variation - 5) $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_005.txt'; +$data_file = __DIR__ . '/fprintf_variation_005.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_006.phpt b/ext/standard/tests/strings/fprintf_variation_006.phpt index b48720c2d5..75846c2731 100644 --- a/ext/standard/tests/strings/fprintf_variation_006.phpt +++ b/ext/standard/tests/strings/fprintf_variation_006.phpt @@ -10,7 +10,7 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_006.txt'; +$data_file = __DIR__ . '/fprintf_variation_006.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_006_64bit.phpt b/ext/standard/tests/strings/fprintf_variation_006_64bit.phpt index 92ab010d03..a4c20f16f5 100644 --- a/ext/standard/tests/strings/fprintf_variation_006_64bit.phpt +++ b/ext/standard/tests/strings/fprintf_variation_006_64bit.phpt @@ -10,7 +10,7 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_006_64bit.txt'; +$data_file = __DIR__ . '/fprintf_variation_006_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_007.phpt b/ext/standard/tests/strings/fprintf_variation_007.phpt index f2653a1ee1..e2102a53ab 100644 --- a/ext/standard/tests/strings/fprintf_variation_007.phpt +++ b/ext/standard/tests/strings/fprintf_variation_007.phpt @@ -10,7 +10,7 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_007.txt'; +$data_file = __DIR__ . '/fprintf_variation_007.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_007_64bit.phpt b/ext/standard/tests/strings/fprintf_variation_007_64bit.phpt index 9e30f91639..b4c80f95c5 100644 --- a/ext/standard/tests/strings/fprintf_variation_007_64bit.phpt +++ b/ext/standard/tests/strings/fprintf_variation_007_64bit.phpt @@ -10,7 +10,7 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_007_64bit.txt'; +$data_file = __DIR__ . '/fprintf_variation_007_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_008.phpt b/ext/standard/tests/strings/fprintf_variation_008.phpt index e8c0a9e412..dba49b47ba 100644 --- a/ext/standard/tests/strings/fprintf_variation_008.phpt +++ b/ext/standard/tests/strings/fprintf_variation_008.phpt @@ -11,7 +11,7 @@ $int_variation = array( "%d", "%-d", "%+d", "%7.2d", "%-7.2d", "%07.2d", "%-07.2 $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_008.txt'; +$data_file = __DIR__ . '/fprintf_variation_008.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_008_64bit.phpt b/ext/standard/tests/strings/fprintf_variation_008_64bit.phpt index 661f2711f3..fae1ce3c2a 100644 --- a/ext/standard/tests/strings/fprintf_variation_008_64bit.phpt +++ b/ext/standard/tests/strings/fprintf_variation_008_64bit.phpt @@ -11,7 +11,7 @@ $int_variation = array( "%d", "%-d", "%+d", "%7.2d", "%-7.2d", "%07.2d", "%-07.2 $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_008_64bit.txt'; +$data_file = __DIR__ . '/fprintf_variation_008_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_009.phpt b/ext/standard/tests/strings/fprintf_variation_009.phpt index c16623ba8f..eb1780f0ce 100644 --- a/ext/standard/tests/strings/fprintf_variation_009.phpt +++ b/ext/standard/tests/strings/fprintf_variation_009.phpt @@ -7,7 +7,7 @@ $string_variation = array( "%5s", "%-5s", "%05s", "%'#5s" ); $strings = array( NULL, "abc", 'aaa' ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_009.txt'; +$data_file = __DIR__ . '/fprintf_variation_009.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/get_meta_tags.phpt b/ext/standard/tests/strings/get_meta_tags.phpt index cc29995046..406ceb2590 100644 --- a/ext/standard/tests/strings/get_meta_tags.phpt +++ b/ext/standard/tests/strings/get_meta_tags.phpt @@ -3,7 +3,7 @@ get_meta_tags() tests --FILE-- <?php -$filename = dirname(__FILE__)."/get_meta_tags.html"; +$filename = __DIR__."/get_meta_tags.html"; $data = <<<DATA <meta name="author" content="name"> diff --git a/ext/standard/tests/strings/highlight_file.phpt b/ext/standard/tests/strings/highlight_file.phpt index 65636908e6..9861c6c27f 100644 --- a/ext/standard/tests/strings/highlight_file.phpt +++ b/ext/standard/tests/strings/highlight_file.phpt @@ -11,7 +11,7 @@ allow_url_fopen=1 --FILE-- <?php -$filename = dirname(__FILE__)."/highlight_file.dat"; +$filename = __DIR__."/highlight_file.dat"; var_dump(highlight_file()); var_dump(highlight_file($filename)); diff --git a/ext/standard/tests/strings/implode1.phpt b/ext/standard/tests/strings/implode1.phpt Binary files differindex d5de391e96..085c9bc0cd 100644 --- a/ext/standard/tests/strings/implode1.phpt +++ b/ext/standard/tests/strings/implode1.phpt diff --git a/ext/standard/tests/strings/php_strip_whitespace.phpt b/ext/standard/tests/strings/php_strip_whitespace.phpt index d9376b101a..442672c6aa 100644 --- a/ext/standard/tests/strings/php_strip_whitespace.phpt +++ b/ext/standard/tests/strings/php_strip_whitespace.phpt @@ -3,7 +3,7 @@ php_strip_whitespace() tests --FILE-- <?php -$filename = dirname(__FILE__)."/php_strip_whitespace.dat"; +$filename = __DIR__."/php_strip_whitespace.dat"; var_dump(php_strip_whitespace()); var_dump(php_strip_whitespace($filename)); diff --git a/ext/standard/tests/strings/sha1.phpt b/ext/standard/tests/strings/sha1.phpt index 68a8a080ca..1dc73881ef 100644 --- a/ext/standard/tests/strings/sha1.phpt +++ b/ext/standard/tests/strings/sha1.phpt @@ -3,7 +3,7 @@ sha1() with ASCII output --FILE-- <?php -$filename = dirname(__FILE__)."/sha1.dat"; +$filename = __DIR__."/sha1.dat"; $a = array( "abc", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", diff --git a/ext/standard/tests/strings/sprintf_variation11.phpt b/ext/standard/tests/strings/sprintf_variation11.phpt index cb2a3a9cac..d3de553580 100644 --- a/ext/standard/tests/strings/sprintf_variation11.phpt +++ b/ext/standard/tests/strings/sprintf_variation11.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : float formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation17.phpt b/ext/standard/tests/strings/sprintf_variation17.phpt index dc9bc8bcad..ac040faeaf 100644 --- a/ext/standard/tests/strings/sprintf_variation17.phpt +++ b/ext/standard/tests/strings/sprintf_variation17.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : string formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource values $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation23.phpt b/ext/standard/tests/strings/sprintf_variation23.phpt index fc3148c0be..8a7a45e57a 100644 --- a/ext/standard/tests/strings/sprintf_variation23.phpt +++ b/ext/standard/tests/strings/sprintf_variation23.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : char formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation30.phpt b/ext/standard/tests/strings/sprintf_variation30.phpt index d0beeb9501..885dc26718 100644 --- a/ext/standard/tests/strings/sprintf_variation30.phpt +++ b/ext/standard/tests/strings/sprintf_variation30.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : octal formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation36.phpt b/ext/standard/tests/strings/sprintf_variation36.phpt index bf05a99db4..b465e0cf9e 100644 --- a/ext/standard/tests/strings/sprintf_variation36.phpt +++ b/ext/standard/tests/strings/sprintf_variation36.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : hexa formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation42.phpt b/ext/standard/tests/strings/sprintf_variation42.phpt index 760c173a00..8dcec355ac 100644 --- a/ext/standard/tests/strings/sprintf_variation42.phpt +++ b/ext/standard/tests/strings/sprintf_variation42.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : unsigned formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation48.phpt b/ext/standard/tests/strings/sprintf_variation48.phpt index ac551a4453..1f5504af4b 100644 --- a/ext/standard/tests/strings/sprintf_variation48.phpt +++ b/ext/standard/tests/strings/sprintf_variation48.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : scientific formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation5.phpt b/ext/standard/tests/strings/sprintf_variation5.phpt index 4fc37435ef..a5cb86bdda 100644 --- a/ext/standard/tests/strings/sprintf_variation5.phpt +++ b/ext/standard/tests/strings/sprintf_variation5.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : integer formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); $fp_copy = $fp; $dfp_copy = $dfp; diff --git a/ext/standard/tests/strings/trim.phpt b/ext/standard/tests/strings/trim.phpt index 44276284e1..660bb202eb 100644 --- a/ext/standard/tests/strings/trim.phpt +++ b/ext/standard/tests/strings/trim.phpt @@ -21,6 +21,6 @@ $tests = <<<TESTS "ABC" === trim("ABC\\x50\\xC1\\x60\\x90","\\x50..\\xC1") TESTS; -include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); +include(__DIR__ . '/../../../../tests/quicktester.inc'); --EXPECT-- OK diff --git a/ext/standard/tests/strings/vfprintf_basic1.phpt b/ext/standard/tests/strings/vfprintf_basic1.phpt index 84d8ad101d..aa8d2eb850 100644 --- a/ext/standard/tests/strings/vfprintf_basic1.phpt +++ b/ext/standard/tests/strings/vfprintf_basic1.phpt @@ -20,7 +20,7 @@ $arg3 = array("one","two","three"); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic1.txt'; +$data_file = __DIR__ . '/vfprintf_basic1.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic2.phpt b/ext/standard/tests/strings/vfprintf_basic2.phpt index 970640f071..4593dbb1b6 100644 --- a/ext/standard/tests/strings/vfprintf_basic2.phpt +++ b/ext/standard/tests/strings/vfprintf_basic2.phpt @@ -23,7 +23,7 @@ $arg2 = array(111,222); $arg3 = array(111,222,333); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic2.txt'; +$data_file = __DIR__ . '/vfprintf_basic2.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic3.phpt b/ext/standard/tests/strings/vfprintf_basic3.phpt index a940ccffe8..b303f196f8 100644 --- a/ext/standard/tests/strings/vfprintf_basic3.phpt +++ b/ext/standard/tests/strings/vfprintf_basic3.phpt @@ -24,7 +24,7 @@ $arg2 = array(11.11,22.22); $arg3 = array(11.11,22.22,33.33); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic3.txt'; +$data_file = __DIR__ . '/vfprintf_basic3.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic4.phpt b/ext/standard/tests/strings/vfprintf_basic4.phpt index c8a170c670..a0780c160b 100644 --- a/ext/standard/tests/strings/vfprintf_basic4.phpt +++ b/ext/standard/tests/strings/vfprintf_basic4.phpt @@ -19,7 +19,7 @@ $arg2 = array(TRUE,FALSE); $arg3 = array(TRUE,FALSE,TRUE); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic4.txt'; +$data_file = __DIR__ . '/vfprintf_basic4.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic5.phpt b/ext/standard/tests/strings/vfprintf_basic5.phpt index f89ab53f5c..56dd2c67fc 100644 --- a/ext/standard/tests/strings/vfprintf_basic5.phpt +++ b/ext/standard/tests/strings/vfprintf_basic5.phpt @@ -19,7 +19,7 @@ $arg2 = array(65,66); $arg3 = array(65,66,67); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic5.txt'; +$data_file = __DIR__ . '/vfprintf_basic5.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic6.phpt b/ext/standard/tests/strings/vfprintf_basic6.phpt index 9e888939d2..0590810e31 100644 --- a/ext/standard/tests/strings/vfprintf_basic6.phpt +++ b/ext/standard/tests/strings/vfprintf_basic6.phpt @@ -20,7 +20,7 @@ $arg2 = array(1000,2000); $arg3 = array(1000,2000,3000); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic6.txt'; +$data_file = __DIR__ . '/vfprintf_basic6.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic7.phpt b/ext/standard/tests/strings/vfprintf_basic7.phpt index a9f286f5a8..f7cc0ed0b3 100644 --- a/ext/standard/tests/strings/vfprintf_basic7.phpt +++ b/ext/standard/tests/strings/vfprintf_basic7.phpt @@ -23,7 +23,7 @@ $arg2 = array(-1111,-1234567); $arg3 = array(-1111,-1234567,-2345432); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic7.txt'; +$data_file = __DIR__ . '/vfprintf_basic7.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt b/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt index b5526a652f..3587792d81 100644 --- a/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt @@ -23,7 +23,7 @@ $arg2 = array(-1111,-1234567); $arg3 = array(-1111,-1234567,-2345432); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic7_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_basic7_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic8.phpt b/ext/standard/tests/strings/vfprintf_basic8.phpt index ed9d23c2ad..ced87284f8 100644 --- a/ext/standard/tests/strings/vfprintf_basic8.phpt +++ b/ext/standard/tests/strings/vfprintf_basic8.phpt @@ -19,7 +19,7 @@ $arg2 = array(021,0347); $arg3 = array(021,0347,0567); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic8.txt'; +$data_file = __DIR__ . '/vfprintf_basic8.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic9.phpt b/ext/standard/tests/strings/vfprintf_basic9.phpt index 080e52bb64..db98c442e8 100644 --- a/ext/standard/tests/strings/vfprintf_basic9.phpt +++ b/ext/standard/tests/strings/vfprintf_basic9.phpt @@ -24,7 +24,7 @@ $arg2 = array(11,132); $arg3 = array(11,132,177); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic9.txt'; +$data_file = __DIR__ . '/vfprintf_basic9.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation10.phpt b/ext/standard/tests/strings/vfprintf_variation10.phpt Binary files differindex fac24dc7a9..dda2105dcd 100644 --- a/ext/standard/tests/strings/vfprintf_variation10.phpt +++ b/ext/standard/tests/strings/vfprintf_variation10.phpt diff --git a/ext/standard/tests/strings/vfprintf_variation11.phpt b/ext/standard/tests/strings/vfprintf_variation11.phpt index e94e7e0c56..6c93875c75 100644 --- a/ext/standard/tests/strings/vfprintf_variation11.phpt +++ b/ext/standard/tests/strings/vfprintf_variation11.phpt @@ -45,7 +45,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation11.txt'; +$data_file = __DIR__ . '/vfprintf_variation11.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt index ab3e1ce83f..5217442ff9 100644 --- a/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt @@ -45,7 +45,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation11_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation11_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation12.phpt b/ext/standard/tests/strings/vfprintf_variation12.phpt index 51ab97e8bf..a655da5367 100644 --- a/ext/standard/tests/strings/vfprintf_variation12.phpt +++ b/ext/standard/tests/strings/vfprintf_variation12.phpt @@ -68,7 +68,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation12.txt'; +$data_file = __DIR__ . '/vfprintf_variation12.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt index ffd232355c..651ff7b70d 100644 --- a/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt @@ -68,7 +68,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation12_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation12_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation13.phpt b/ext/standard/tests/strings/vfprintf_variation13.phpt index ebb45acb6b..dca1d4c169 100644 --- a/ext/standard/tests/strings/vfprintf_variation13.phpt +++ b/ext/standard/tests/strings/vfprintf_variation13.phpt @@ -45,7 +45,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation13.txt'; +$data_file = __DIR__ . '/vfprintf_variation13.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt index 34089e2b78..7288abc485 100644 --- a/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt @@ -45,7 +45,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation13_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation13_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation14.phpt b/ext/standard/tests/strings/vfprintf_variation14.phpt index ea2957a18c..7e0ab0193f 100644 --- a/ext/standard/tests/strings/vfprintf_variation14.phpt +++ b/ext/standard/tests/strings/vfprintf_variation14.phpt @@ -68,7 +68,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation14.txt'; +$data_file = __DIR__ . '/vfprintf_variation14.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt index 9916967b3f..83576b1d34 100644 --- a/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt @@ -68,7 +68,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation14_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation14_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation15.phpt b/ext/standard/tests/strings/vfprintf_variation15.phpt index b513227836..b0d7091c09 100644 --- a/ext/standard/tests/strings/vfprintf_variation15.phpt +++ b/ext/standard/tests/strings/vfprintf_variation15.phpt @@ -38,7 +38,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation15.txt'; +$data_file = __DIR__ . '/vfprintf_variation15.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt index b31ffd3eb4..53dd105123 100644 --- a/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt @@ -38,7 +38,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation15_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation15_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation16.phpt b/ext/standard/tests/strings/vfprintf_variation16.phpt index 010028c387..1d2858cbab 100644 --- a/ext/standard/tests/strings/vfprintf_variation16.phpt +++ b/ext/standard/tests/strings/vfprintf_variation16.phpt @@ -61,7 +61,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation16.txt'; +$data_file = __DIR__ . '/vfprintf_variation16.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt index 0819cc0e5f..f65998aeef 100644 --- a/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt @@ -61,7 +61,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation16_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation16_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation17.phpt b/ext/standard/tests/strings/vfprintf_variation17.phpt index 545ae6d43d..3c9d82025f 100644 --- a/ext/standard/tests/strings/vfprintf_variation17.phpt +++ b/ext/standard/tests/strings/vfprintf_variation17.phpt @@ -34,7 +34,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation17.txt'; +$data_file = __DIR__ . '/vfprintf_variation17.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation18.phpt b/ext/standard/tests/strings/vfprintf_variation18.phpt index 3d0d810442..71277ca3d8 100644 --- a/ext/standard/tests/strings/vfprintf_variation18.phpt +++ b/ext/standard/tests/strings/vfprintf_variation18.phpt @@ -57,7 +57,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation18.txt'; +$data_file = __DIR__ . '/vfprintf_variation18.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation19.phpt b/ext/standard/tests/strings/vfprintf_variation19.phpt index 19aac7738b..b3d5eed82b 100644 --- a/ext/standard/tests/strings/vfprintf_variation19.phpt +++ b/ext/standard/tests/strings/vfprintf_variation19.phpt @@ -46,7 +46,7 @@ $args_array = array( /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation19.txt'; +$data_file = __DIR__ . '/vfprintf_variation19.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt index 8ad2df0947..0ae053ac98 100644 --- a/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt @@ -46,7 +46,7 @@ $args_array = array( /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation19_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation19_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation20.phpt b/ext/standard/tests/strings/vfprintf_variation20.phpt index 3bc9bf6b29..1f8dfefca4 100644 --- a/ext/standard/tests/strings/vfprintf_variation20.phpt +++ b/ext/standard/tests/strings/vfprintf_variation20.phpt @@ -84,7 +84,7 @@ $values = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation20.txt'; +$data_file = __DIR__ . '/vfprintf_variation20.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation21.phpt b/ext/standard/tests/strings/vfprintf_variation21.phpt index 874b279763..11f29e87ac 100644 --- a/ext/standard/tests/strings/vfprintf_variation21.phpt +++ b/ext/standard/tests/strings/vfprintf_variation21.phpt @@ -81,7 +81,7 @@ $values = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation21.txt'; +$data_file = __DIR__ . '/vfprintf_variation21.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation3.phpt b/ext/standard/tests/strings/vfprintf_variation3.phpt index e3e7b9636a..7cb8e83d0d 100644 --- a/ext/standard/tests/strings/vfprintf_variation3.phpt +++ b/ext/standard/tests/strings/vfprintf_variation3.phpt @@ -45,7 +45,7 @@ $args_array = array( // and with int values from the above $args_array array /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation3.txt'; +$data_file = __DIR__ . '/vfprintf_variation3.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation4.phpt b/ext/standard/tests/strings/vfprintf_variation4.phpt index 9dad0eff58..312ec6f18a 100644 --- a/ext/standard/tests/strings/vfprintf_variation4.phpt +++ b/ext/standard/tests/strings/vfprintf_variation4.phpt @@ -62,7 +62,7 @@ $args_array = array( /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation4.txt'; +$data_file = __DIR__ . '/vfprintf_variation4.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt index 1bf0861c0f..690e2633f2 100644 --- a/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt @@ -62,7 +62,7 @@ $args_array = array( /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation4_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation4_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation5.phpt b/ext/standard/tests/strings/vfprintf_variation5.phpt index ffe6c347bc..a9139ce6af 100644 --- a/ext/standard/tests/strings/vfprintf_variation5.phpt +++ b/ext/standard/tests/strings/vfprintf_variation5.phpt @@ -42,7 +42,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation5.txt'; +$data_file = __DIR__ . '/vfprintf_variation5.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation6.phpt b/ext/standard/tests/strings/vfprintf_variation6.phpt index 9194d84866..e586a074f2 100644 --- a/ext/standard/tests/strings/vfprintf_variation6.phpt +++ b/ext/standard/tests/strings/vfprintf_variation6.phpt @@ -57,7 +57,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation6.txt'; +$data_file = __DIR__ . '/vfprintf_variation6.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation7.phpt b/ext/standard/tests/strings/vfprintf_variation7.phpt Binary files differindex ee836edc77..54b4ef4505 100644 --- a/ext/standard/tests/strings/vfprintf_variation7.phpt +++ b/ext/standard/tests/strings/vfprintf_variation7.phpt diff --git a/ext/standard/tests/strings/vfprintf_variation8.phpt b/ext/standard/tests/strings/vfprintf_variation8.phpt index 036c52b04a..ff806154f4 100644 --- a/ext/standard/tests/strings/vfprintf_variation8.phpt +++ b/ext/standard/tests/strings/vfprintf_variation8.phpt @@ -60,7 +60,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation8.txt'; +$data_file = __DIR__ . '/vfprintf_variation8.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation9.phpt b/ext/standard/tests/strings/vfprintf_variation9.phpt Binary files differindex 677840a584..30509d9119 100644 --- a/ext/standard/tests/strings/vfprintf_variation9.phpt +++ b/ext/standard/tests/strings/vfprintf_variation9.phpt diff --git a/ext/standard/tests/strings/wordwrap.phpt b/ext/standard/tests/strings/wordwrap.phpt index 50531b5e93..543c41fdd9 100644 --- a/ext/standard/tests/strings/wordwrap.phpt +++ b/ext/standard/tests/strings/wordwrap.phpt @@ -31,6 +31,6 @@ FALSE === @wordwrap(chr(0), 0, "") TESTS; -include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); +include(__DIR__ . '/../../../../tests/quicktester.inc'); --EXPECT-- OK diff --git a/ext/standard/tests/url/get_headers_error_003.phpt b/ext/standard/tests/url/get_headers_error_003.phpt index 8a50e3bc8a..a8edc2cb21 100644 --- a/ext/standard/tests/url/get_headers_error_003.phpt +++ b/ext/standard/tests/url/get_headers_error_003.phpt @@ -5,7 +5,7 @@ server --FILE-- <?php -include dirname(__FILE__)."/../../../../sapi/cli/tests/php_cli_server.inc"; +include __DIR__."/../../../../sapi/cli/tests/php_cli_server.inc"; php_cli_server_start('header("X-Request-Method: ".$_SERVER["REQUEST_METHOD"]);'); $opts = array( diff --git a/ext/standard/tests/url/parse_url_basic_001.phpt b/ext/standard/tests/url/parse_url_basic_001.phpt index 7340d24323..d59f080fbf 100644 --- a/ext/standard/tests/url/parse_url_basic_001.phpt +++ b/ext/standard/tests/url/parse_url_basic_001.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying the component /* * Parse a load of URLs without specifying the component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "\n--> $url: "; diff --git a/ext/standard/tests/url/parse_url_basic_002.phpt b/ext/standard/tests/url/parse_url_basic_002.phpt index 5f8b6bf145..c8b94dec1c 100644 --- a/ext/standard/tests/url/parse_url_basic_002.phpt +++ b/ext/standard/tests/url/parse_url_basic_002.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_SCHEM /* * Parse a load of URLs without specifying PHP_URL_SCHEME as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_003.phpt b/ext/standard/tests/url/parse_url_basic_003.phpt index bced2757de..f917b77b97 100644 --- a/ext/standard/tests/url/parse_url_basic_003.phpt +++ b/ext/standard/tests/url/parse_url_basic_003.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_HOST /* * Parse a load of URLs without specifying PHP_URL_HOST as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_004.phpt b/ext/standard/tests/url/parse_url_basic_004.phpt index f705d408d3..29d4655243 100644 --- a/ext/standard/tests/url/parse_url_basic_004.phpt +++ b/ext/standard/tests/url/parse_url_basic_004.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_PORT /* * Parse a load of URLs without specifying PHP_URL_PORT as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_005.phpt b/ext/standard/tests/url/parse_url_basic_005.phpt index dafb784860..716d8d1dfa 100644 --- a/ext/standard/tests/url/parse_url_basic_005.phpt +++ b/ext/standard/tests/url/parse_url_basic_005.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_USER /* * Parse a load of URLs without specifying PHP_URL_USER as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_006.phpt b/ext/standard/tests/url/parse_url_basic_006.phpt index d881c9527e..3ae94ca626 100644 --- a/ext/standard/tests/url/parse_url_basic_006.phpt +++ b/ext/standard/tests/url/parse_url_basic_006.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_PASS /* * Parse a load of URLs without specifying PHP_URL_PASS as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_007.phpt b/ext/standard/tests/url/parse_url_basic_007.phpt index fc5593ea3b..8cad27e958 100644 --- a/ext/standard/tests/url/parse_url_basic_007.phpt +++ b/ext/standard/tests/url/parse_url_basic_007.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_PATH /* * Parse a load of URLs without specifying PHP_URL_PATH as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_008.phpt b/ext/standard/tests/url/parse_url_basic_008.phpt index 753432107b..761eb61179 100644 --- a/ext/standard/tests/url/parse_url_basic_008.phpt +++ b/ext/standard/tests/url/parse_url_basic_008.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_QUERY /* * Parse a load of URLs without specifying PHP_URL_QUERY as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_009.phpt b/ext/standard/tests/url/parse_url_basic_009.phpt index b5d32b2053..f08787761d 100644 --- a/ext/standard/tests/url/parse_url_basic_009.phpt +++ b/ext/standard/tests/url/parse_url_basic_009.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_FRAGM /* * Parse a load of URLs without specifying PHP_URL_FRAGMENT as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_unterminated.phpt b/ext/standard/tests/url/parse_url_unterminated.phpt index c83e458085..94975ee889 100644 --- a/ext/standard/tests/url/parse_url_unterminated.phpt +++ b/ext/standard/tests/url/parse_url_unterminated.phpt @@ -11,7 +11,7 @@ if (!function_exists('zend_create_unterminated_string')) die('skip ext/test requ * This is the same as the basic001 test, but with unterminated strings. */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "\n--> $url: "; |