summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file
diff options
context:
space:
mode:
authorFabien Villepinte <fabien.villepinte@gmail.com>2019-03-15 22:55:30 +0100
committerPeter Kokot <peterkokot@gmail.com>2019-03-15 22:55:30 +0100
commit26dfce7f36d1c6f737ac241df1315a1b42b932c7 (patch)
tree570279b2f4d66a3de7f6ff7f7c865654ad04cea4 /ext/standard/tests/file
parent63802a8446691869371bb37078d55b99cae7eb95 (diff)
downloadphp-git-26dfce7f36d1c6f737ac241df1315a1b42b932c7.tar.gz
Replace dirname(__FILE__) by __DIR__ in tests
Diffstat (limited to 'ext/standard/tests/file')
-rw-r--r--ext/standard/tests/file/001-win32-mb.phpt2
-rw-r--r--ext/standard/tests/file/001-win32.phpt2
-rw-r--r--ext/standard/tests/file/001.phpt2
-rw-r--r--ext/standard/tests/file/004.phpt2
-rw-r--r--ext/standard/tests/file/005_basic.phpt8
-rw-r--r--ext/standard/tests/file/005_variation-win32.phpt4
-rw-r--r--ext/standard/tests/file/005_variation.phpt4
-rw-r--r--ext/standard/tests/file/006_basic.phpt8
-rw-r--r--ext/standard/tests/file/006_error.phpt12
-rw-r--r--ext/standard/tests/file/006_variation1.phpt14
-rw-r--r--ext/standard/tests/file/006_variation2.phpt14
-rw-r--r--ext/standard/tests/file/007_basic.phpt2
-rw-r--r--ext/standard/tests/file/007_variation1.phpt4
-rw-r--r--ext/standard/tests/file/007_variation10.phpt4
-rw-r--r--ext/standard/tests/file/007_variation11-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/007_variation11-win32.phpt4
-rw-r--r--ext/standard/tests/file/007_variation11.phpt4
-rw-r--r--ext/standard/tests/file/007_variation12-win32.phpt4
-rw-r--r--ext/standard/tests/file/007_variation12.phpt4
-rw-r--r--ext/standard/tests/file/007_variation13-win32.phpt4
-rw-r--r--ext/standard/tests/file/007_variation13.phpt4
-rw-r--r--ext/standard/tests/file/007_variation14.phpt4
-rw-r--r--ext/standard/tests/file/007_variation15.phpt4
-rw-r--r--ext/standard/tests/file/007_variation16.phpt4
-rw-r--r--ext/standard/tests/file/007_variation17.phpt4
-rw-r--r--ext/standard/tests/file/007_variation18.phpt4
-rw-r--r--ext/standard/tests/file/007_variation19.phpt4
-rw-r--r--ext/standard/tests/file/007_variation2.phpt4
-rw-r--r--ext/standard/tests/file/007_variation20.phpt4
-rw-r--r--ext/standard/tests/file/007_variation21.phpt4
-rw-r--r--ext/standard/tests/file/007_variation22.phpt4
-rw-r--r--ext/standard/tests/file/007_variation23.phpt4
-rw-r--r--ext/standard/tests/file/007_variation24.phpt4
-rw-r--r--ext/standard/tests/file/007_variation3.phpt4
-rw-r--r--ext/standard/tests/file/007_variation4.phpt4
-rw-r--r--ext/standard/tests/file/007_variation5.phpt4
-rw-r--r--ext/standard/tests/file/007_variation6.phpt4
-rw-r--r--ext/standard/tests/file/007_variation7.phpt4
-rw-r--r--ext/standard/tests/file/007_variation8.phpt4
-rw-r--r--ext/standard/tests/file/007_variation9.phpt4
-rw-r--r--ext/standard/tests/file/bug12556.phpt2
-rw-r--r--ext/standard/tests/file/bug22382.phpt2
-rw-r--r--ext/standard/tests/file/bug26003.phptbin225 -> 215 bytes
-rw-r--r--ext/standard/tests/file/bug30362.phpt2
-rw-r--r--ext/standard/tests/file/bug32160.phpt4
-rw-r--r--ext/standard/tests/file/bug35740.phpt2
-rw-r--r--ext/standard/tests/file/bug35781.phpt2
-rw-r--r--ext/standard/tests/file/bug37158.phpt2
-rw-r--r--ext/standard/tests/file/bug38086.phpt4
-rw-r--r--ext/standard/tests/file/bug39538.phpt2
-rw-r--r--ext/standard/tests/file/bug39673.phpt2
-rw-r--r--ext/standard/tests/file/bug40501.phpt2
-rw-r--r--ext/standard/tests/file/bug41655_2.phpt2
-rw-r--r--ext/standard/tests/file/bug41815.phpt2
-rw-r--r--ext/standard/tests/file/bug43248.phpt2
-rw-r--r--ext/standard/tests/file/bug44805.phpt2
-rw-r--r--ext/standard/tests/file/bug53848.phpt2
-rw-r--r--ext/standard/tests/file/bug65272.phpt4
-rw-r--r--ext/standard/tests/file/bug65701.phpt4
-rw-r--r--ext/standard/tests/file/bug68335.phpt2
-rw-r--r--ext/standard/tests/file/bug69628.phpt4
-rw-r--r--ext/standard/tests/file/bug72035.phpt2
-rw-r--r--ext/standard/tests/file/bug75679.phpt4
-rw-r--r--ext/standard/tests/file/chmod_variation1.phpt2
-rw-r--r--ext/standard/tests/file/chmod_variation2-win32-mb.phpt2
-rw-r--r--ext/standard/tests/file/chmod_variation2-win32.phpt2
-rw-r--r--ext/standard/tests/file/chmod_variation2.phpt2
-rw-r--r--ext/standard/tests/file/copy_basic.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation1.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation10.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation11.phpt6
-rw-r--r--ext/standard/tests/file/copy_variation12-win32.phpt6
-rw-r--r--ext/standard/tests/file/copy_variation12.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation13.phpt6
-rw-r--r--ext/standard/tests/file/copy_variation14.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation15.phpt8
-rw-r--r--ext/standard/tests/file/copy_variation16-win32.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation16.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation17.phpt6
-rw-r--r--ext/standard/tests/file/copy_variation18.phpt6
-rw-r--r--ext/standard/tests/file/copy_variation2-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation2-win32.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation2.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation3-win32.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation3.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation4.phptbin4959 -> 4939 bytes
-rw-r--r--ext/standard/tests/file/copy_variation5-win32.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation5.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation6-win32.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation6.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation7.phpt4
-rw-r--r--ext/standard/tests/file/copy_variation8.phpt2
-rw-r--r--ext/standard/tests/file/copy_variation9.phpt8
-rw-r--r--ext/standard/tests/file/directory_wrapper_fstat_basic.phpt2
-rw-r--r--ext/standard/tests/file/disk_free_space_basic.phpt4
-rw-r--r--ext/standard/tests/file/disk_free_space_error-win32.phpt4
-rw-r--r--ext/standard/tests/file/disk_free_space_error.phpt4
-rw-r--r--ext/standard/tests/file/disk_free_space_variation.phpt4
-rw-r--r--ext/standard/tests/file/disk_total_space_basic.phpt4
-rw-r--r--ext/standard/tests/file/disk_total_space_error-win32.phpt4
-rw-r--r--ext/standard/tests/file/disk_total_space_error.phpt4
-rw-r--r--ext/standard/tests/file/disk_total_space_variation.phpt4
-rw-r--r--ext/standard/tests/file/fflush_basic.phpt4
-rw-r--r--ext/standard/tests/file/fflush_variation1-win32-mb.phpt2
-rw-r--r--ext/standard/tests/file/fflush_variation1-win32.phpt2
-rw-r--r--ext/standard/tests/file/fflush_variation1.phpt2
-rw-r--r--ext/standard/tests/file/fflush_variation2.phpt2
-rw-r--r--ext/standard/tests/file/fflush_variation3.phpt2
-rw-r--r--ext/standard/tests/file/fflush_variation4.phpt2
-rw-r--r--ext/standard/tests/file/fgetc_basic.phpt6
-rw-r--r--ext/standard/tests/file/fgetc_variation1.phpt6
-rw-r--r--ext/standard/tests/file/fgetc_variation3.phpt2
-rw-r--r--ext/standard/tests/file/fgetc_variation4.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation1.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation10.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation11.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation12.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation13.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation14.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation15.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation16.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation17.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation18.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation19.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation2.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation20.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation21.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation22.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation23.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation24.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation25.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation26.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation27.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation28.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation29.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation3.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation30.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation31.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation4.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation5.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation6.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation7.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation8.phpt2
-rw-r--r--ext/standard/tests/file/fgetcsv_variation9.phpt2
-rw-r--r--ext/standard/tests/file/fgets_basic.phpt4
-rw-r--r--ext/standard/tests/file/fgets_variation1.phpt2
-rw-r--r--ext/standard/tests/file/fgets_variation3.phpt2
-rw-r--r--ext/standard/tests/file/fgets_variation4-win32-mb.phpt2
-rw-r--r--ext/standard/tests/file/fgets_variation4-win32.phpt2
-rw-r--r--ext/standard/tests/file/fgets_variation4.phpt2
-rw-r--r--ext/standard/tests/file/fgets_variation5.phpt2
-rw-r--r--ext/standard/tests/file/fgets_variation6-win32.phpt2
-rw-r--r--ext/standard/tests/file/fgets_variation6.phpt2
-rw-r--r--ext/standard/tests/file/fgetss.phpt2
-rw-r--r--ext/standard/tests/file/fgetss1.phpt4
-rw-r--r--ext/standard/tests/file/fgetss_basic1.phpt2
-rw-r--r--ext/standard/tests/file/fgetss_basic2-win32-mb.phpt2
-rw-r--r--ext/standard/tests/file/fgetss_basic2-win32.phpt2
-rw-r--r--ext/standard/tests/file/fgetss_basic2.phpt2
-rw-r--r--ext/standard/tests/file/fgetss_variation1-win32.phpt2
-rw-r--r--ext/standard/tests/file/fgetss_variation1.phpt2
-rw-r--r--ext/standard/tests/file/fgetss_variation2.phpt2
-rw-r--r--ext/standard/tests/file/fgetss_variation3-win32.phpt2
-rw-r--r--ext/standard/tests/file/fgetss_variation3.phpt2
-rw-r--r--ext/standard/tests/file/fgetss_variation4.phpt2
-rw-r--r--ext/standard/tests/file/fgetss_variation5-win32.phpt2
-rw-r--r--ext/standard/tests/file/fgetss_variation5.phpt2
-rw-r--r--ext/standard/tests/file/file_basic.phpt4
-rw-r--r--ext/standard/tests/file/file_error.phpt4
-rw-r--r--ext/standard/tests/file/file_get_contents_basic.phpt2
-rw-r--r--ext/standard/tests/file/file_get_contents_basic001.phpt4
-rw-r--r--ext/standard/tests/file/file_get_contents_error.phpt4
-rw-r--r--ext/standard/tests/file/file_get_contents_file_put_contents_basic.phpt4
-rw-r--r--ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt4
-rw-r--r--ext/standard/tests/file/file_get_contents_file_put_contents_variation1.phpt4
-rw-r--r--ext/standard/tests/file/file_get_contents_file_put_contents_variation2.phpt4
-rw-r--r--ext/standard/tests/file/file_get_contents_variation2.phpt2
-rw-r--r--ext/standard/tests/file/file_get_contents_variation7-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/file_get_contents_variation7-win32.phpt4
-rw-r--r--ext/standard/tests/file/file_get_contents_variation7.phpt4
-rw-r--r--ext/standard/tests/file/file_get_contents_variation9.phpt8
-rw-r--r--ext/standard/tests/file/file_put_contents.phpt2
-rw-r--r--ext/standard/tests/file/file_put_contents_variation5.phpt6
-rw-r--r--ext/standard/tests/file/file_put_contents_variation7-win32.phpt4
-rw-r--r--ext/standard/tests/file/file_put_contents_variation7.phpt4
-rw-r--r--ext/standard/tests/file/file_put_contents_variation9.phpt8
-rw-r--r--ext/standard/tests/file/file_variation.phpt8
-rw-r--r--ext/standard/tests/file/file_variation5-win32-mb.phpt2
-rw-r--r--ext/standard/tests/file/file_variation5-win32.phpt2
-rw-r--r--ext/standard/tests/file/file_variation5.phpt2
-rw-r--r--ext/standard/tests/file/file_variation8-win32.phpt4
-rw-r--r--ext/standard/tests/file/file_variation8.phpt4
-rw-r--r--ext/standard/tests/file/file_variation9.phpt2
-rw-r--r--ext/standard/tests/file/filegroup_basic.phpt4
-rw-r--r--ext/standard/tests/file/filegroup_variation1.phpt4
-rw-r--r--ext/standard/tests/file/filegroup_variation2.phpt4
-rw-r--r--ext/standard/tests/file/filegroup_variation3.phpt4
-rw-r--r--ext/standard/tests/file/fileinode_basic.phpt4
-rw-r--r--ext/standard/tests/file/fileinode_variation.phpt2
-rw-r--r--ext/standard/tests/file/fileinode_variation1.phpt4
-rw-r--r--ext/standard/tests/file/fileinode_variation2.phpt4
-rw-r--r--ext/standard/tests/file/fileinode_variation3.phpt4
-rw-r--r--ext/standard/tests/file/fileowner_basic.phpt4
-rw-r--r--ext/standard/tests/file/fileowner_variation1.phpt4
-rw-r--r--ext/standard/tests/file/fileowner_variation2.phpt4
-rw-r--r--ext/standard/tests/file/fileowner_variation3.phpt4
-rw-r--r--ext/standard/tests/file/fileperms_variation1.phpt4
-rw-r--r--ext/standard/tests/file/fileperms_variation2.phpt4
-rw-r--r--ext/standard/tests/file/fileperms_variation3.phpt4
-rw-r--r--ext/standard/tests/file/filesize_basic.phpt4
-rw-r--r--ext/standard/tests/file/filesize_variation1-win32-mb.phpt2
-rw-r--r--ext/standard/tests/file/filesize_variation1-win32.phpt2
-rw-r--r--ext/standard/tests/file/filesize_variation1.phpt2
-rw-r--r--ext/standard/tests/file/filesize_variation2-win32.phpt4
-rw-r--r--ext/standard/tests/file/filesize_variation2.phpt4
-rw-r--r--ext/standard/tests/file/filesize_variation3-win32.phpt4
-rw-r--r--ext/standard/tests/file/filesize_variation3.phpt4
-rw-r--r--ext/standard/tests/file/filesize_variation4-win32.phpt6
-rw-r--r--ext/standard/tests/file/filesize_variation4.phpt6
-rw-r--r--ext/standard/tests/file/filetype_variation.phpt2
-rw-r--r--ext/standard/tests/file/flock.phpt4
-rw-r--r--ext/standard/tests/file/flock_basic.phpt2
-rw-r--r--ext/standard/tests/file/flock_error.phpt4
-rw-r--r--ext/standard/tests/file/flock_variation.phpt2
-rw-r--r--ext/standard/tests/file/fnmatch_variation.phpt2
-rw-r--r--ext/standard/tests/file/fopen_unlink.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation10-win32.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation11-win32.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation12.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation5.phpt2
-rw-r--r--ext/standard/tests/file/fopen_variation8.phpt2
-rw-r--r--ext/standard/tests/file/fpassthru_basic.phpt4
-rw-r--r--ext/standard/tests/file/fpassthru_variation.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_002.phpt4
-rw-r--r--ext/standard/tests/file/fputcsv_variation1.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation10.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation11.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation12.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation13.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation14.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation15.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation2.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation3.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation4.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation5.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation6.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation7.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation8.phpt2
-rw-r--r--ext/standard/tests/file/fputcsv_variation9.phpt2
-rw-r--r--ext/standard/tests/file/fread_basic.phpt4
-rw-r--r--ext/standard/tests/file/fread_variation1.phpt4
-rw-r--r--ext/standard/tests/file/fread_variation2.phpt4
-rw-r--r--ext/standard/tests/file/fread_variation3-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/fread_variation3-win32.phpt4
-rw-r--r--ext/standard/tests/file/fread_variation3.phpt4
-rw-r--r--ext/standard/tests/file/fread_variation4-win32.phpt4
-rw-r--r--ext/standard/tests/file/fread_variation4.phpt4
-rw-r--r--ext/standard/tests/file/fscanf.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_error.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation1.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation10.phpt6
-rw-r--r--ext/standard/tests/file/fscanf_variation11.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation12.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation13.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation14.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation15.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation16.phpt6
-rw-r--r--ext/standard/tests/file/fscanf_variation17.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation18.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation19.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation2.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation20.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation21.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation22.phpt6
-rw-r--r--ext/standard/tests/file/fscanf_variation23.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation24.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation25.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation26.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation27.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation28.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation29.phpt6
-rw-r--r--ext/standard/tests/file/fscanf_variation3.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation30.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation31.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation32.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation33.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation34.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation35.phpt6
-rw-r--r--ext/standard/tests/file/fscanf_variation36.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation37.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation38.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation39.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation4.phpt6
-rw-r--r--ext/standard/tests/file/fscanf_variation40.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation41.phpt6
-rw-r--r--ext/standard/tests/file/fscanf_variation42.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation43.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation44.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation45.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation46.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation47.phpt6
-rw-r--r--ext/standard/tests/file/fscanf_variation48.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation49.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation5.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation50.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation51.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation52.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation53.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation54.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation55.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation6.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation7.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation8.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation9.phpt4
-rw-r--r--ext/standard/tests/file/fseek_dir_basic.phpt4
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt4
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt2
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt2
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt2
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_variation1.phpt4
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt2
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt2
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_variation3.phpt4
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt2
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt2
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_variation5.phpt4
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt2
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt2
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_variation7.phpt4
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt2
-rw-r--r--ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt2
-rw-r--r--ext/standard/tests/file/fstat.phpt2
-rw-r--r--ext/standard/tests/file/ftruncate.phptbin1147 -> 1137 bytes
-rw-r--r--ext/standard/tests/file/ftruncate_bug76422.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_bug76803.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_bug77081.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_error.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation1-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation1-win32.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation1.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation2-win32.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation2.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation3-win32.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation3.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation4-win32.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation4.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation5-win32.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation5.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation6-win32.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation6.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation7-win32.phpt4
-rw-r--r--ext/standard/tests/file/ftruncate_variation7.phpt4
-rw-r--r--ext/standard/tests/file/fwrite.phpt2
-rw-r--r--ext/standard/tests/file/fwrite_basic-win32-mb.phpt2
-rw-r--r--ext/standard/tests/file/fwrite_basic-win32.phpt2
-rw-r--r--ext/standard/tests/file/fwrite_basic.phpt2
-rw-r--r--ext/standard/tests/file/fwrite_error.phpt4
-rw-r--r--ext/standard/tests/file/fwrite_variation1-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/fwrite_variation1-win32.phpt4
-rw-r--r--ext/standard/tests/file/fwrite_variation1.phpt4
-rw-r--r--ext/standard/tests/file/fwrite_variation2-win32.phpt4
-rw-r--r--ext/standard/tests/file/fwrite_variation2.phpt4
-rw-r--r--ext/standard/tests/file/fwrite_variation3-win32.phpt4
-rw-r--r--ext/standard/tests/file/fwrite_variation3.phpt4
-rw-r--r--ext/standard/tests/file/fwrite_variation4-win32.phpt2
-rw-r--r--ext/standard/tests/file/fwrite_variation4.phpt2
-rw-r--r--ext/standard/tests/file/glob_basic.phpt4
-rw-r--r--ext/standard/tests/file/glob_variation-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/glob_variation-win32.phpt4
-rw-r--r--ext/standard/tests/file/glob_variation.phpt4
-rw-r--r--ext/standard/tests/file/glob_variation2.phpt4
-rw-r--r--ext/standard/tests/file/glob_variation3.phpt2
-rw-r--r--ext/standard/tests/file/glob_variation4.phpt2
-rw-r--r--ext/standard/tests/file/glob_variation5.phpt2
-rw-r--r--ext/standard/tests/file/glob_variation6.phpt2
-rw-r--r--ext/standard/tests/file/is_dir_basic.phpt4
-rw-r--r--ext/standard/tests/file/is_dir_variation1.phpt4
-rw-r--r--ext/standard/tests/file/is_dir_variation2.phpt4
-rw-r--r--ext/standard/tests/file/is_dir_variation3.phpt2
-rw-r--r--ext/standard/tests/file/is_dir_variation4.phpt4
-rw-r--r--ext/standard/tests/file/is_executable_basic-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/is_executable_basic-win32.phpt4
-rw-r--r--ext/standard/tests/file/is_executable_basic.phpt6
-rw-r--r--ext/standard/tests/file/is_executable_error.phpt2
-rw-r--r--ext/standard/tests/file/is_executable_variation1.phpt8
-rw-r--r--ext/standard/tests/file/is_executable_variation2.phpt28
-rw-r--r--ext/standard/tests/file/is_executable_variation3.phpt2
-rw-r--r--ext/standard/tests/file/is_file_basic.phpt6
-rw-r--r--ext/standard/tests/file/is_file_variation1.phpt2
-rw-r--r--ext/standard/tests/file/is_file_variation2.phpt4
-rw-r--r--ext/standard/tests/file/is_file_variation3.phpt4
-rw-r--r--ext/standard/tests/file/is_file_variation4.phpt4
-rw-r--r--ext/standard/tests/file/is_readable_basic-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/is_readable_basic-win32.phpt4
-rw-r--r--ext/standard/tests/file/is_readable_basic.phpt6
-rw-r--r--ext/standard/tests/file/is_readable_error.phpt2
-rw-r--r--ext/standard/tests/file/is_readable_variation1.phpt10
-rw-r--r--ext/standard/tests/file/is_readable_variation2.phpt28
-rw-r--r--ext/standard/tests/file/is_readable_variation3.phpt2
-rw-r--r--ext/standard/tests/file/is_writable_basic.phpt6
-rw-r--r--ext/standard/tests/file/is_writable_error.phpt4
-rw-r--r--ext/standard/tests/file/is_writable_variation1.phpt10
-rw-r--r--ext/standard/tests/file/is_writable_variation2.phpt28
-rw-r--r--ext/standard/tests/file/is_writable_variation3.phpt2
-rw-r--r--ext/standard/tests/file/lchgrp_basic.phpt8
-rw-r--r--ext/standard/tests/file/lchown_basic.phpt8
-rw-r--r--ext/standard/tests/file/lchown_error.phpt6
-rw-r--r--ext/standard/tests/file/lstat_stat_basic.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_error.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation1.phpt6
-rw-r--r--ext/standard/tests/file/lstat_stat_variation10.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation11.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation12.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation13.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation14.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation15.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation16.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation17.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation18.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation19.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation2.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation20.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation21.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation3.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation4.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation5.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation6.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation7.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation8.phpt4
-rw-r--r--ext/standard/tests/file/lstat_stat_variation9.phpt4
-rw-r--r--ext/standard/tests/file/mkdir-001.phpt8
-rw-r--r--ext/standard/tests/file/mkdir-002.phpt10
-rw-r--r--ext/standard/tests/file/mkdir-003.phpt6
-rw-r--r--ext/standard/tests/file/mkdir-006.phpt2
-rw-r--r--ext/standard/tests/file/mkdir_rmdir_variation-win32-mb.phpt8
-rw-r--r--ext/standard/tests/file/mkdir_rmdir_variation-win32.phpt8
-rw-r--r--ext/standard/tests/file/mkdir_rmdir_variation1.phpt4
-rw-r--r--ext/standard/tests/file/mkdir_rmdir_variation2.phpt8
-rw-r--r--ext/standard/tests/file/parse_ini_file.phpt4
-rw-r--r--ext/standard/tests/file/parse_ini_file_variation6-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/parse_ini_file_variation6-win32.phpt4
-rw-r--r--ext/standard/tests/file/parse_ini_file_variation6.phpt4
-rw-r--r--ext/standard/tests/file/pathinfo_basic.phpt2
-rw-r--r--ext/standard/tests/file/popen_pclose_basic-win32-mb.phpt2
-rw-r--r--ext/standard/tests/file/popen_pclose_basic-win32.phpt2
-rw-r--r--ext/standard/tests/file/popen_pclose_basic.phpt4
-rw-r--r--ext/standard/tests/file/popen_pclose_error-sunos.phpt4
-rw-r--r--ext/standard/tests/file/popen_pclose_error.phpt4
-rw-r--r--ext/standard/tests/file/readfile_basic-win32.phpt4
-rw-r--r--ext/standard/tests/file/readfile_basic.phpt4
-rw-r--r--ext/standard/tests/file/readfile_error.phpt2
-rw-r--r--ext/standard/tests/file/readfile_variation1.phpt4
-rw-r--r--ext/standard/tests/file/readfile_variation2.phpt4
-rw-r--r--ext/standard/tests/file/readfile_variation3.phpt6
-rw-r--r--ext/standard/tests/file/readfile_variation7.phpt2
-rw-r--r--ext/standard/tests/file/readfile_variation8-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/readfile_variation8-win32.phpt4
-rw-r--r--ext/standard/tests/file/readfile_variation9.phpt4
-rw-r--r--ext/standard/tests/file/readlink_realpath_basic1.phpt4
-rw-r--r--ext/standard/tests/file/readlink_realpath_basic2.phpt4
-rw-r--r--ext/standard/tests/file/readlink_realpath_error.phpt6
-rw-r--r--ext/standard/tests/file/readlink_realpath_variation1.phpt4
-rw-r--r--ext/standard/tests/file/readlink_realpath_variation2.phpt4
-rw-r--r--ext/standard/tests/file/readlink_variation1.phpt4
-rw-r--r--ext/standard/tests/file/realpath_basic-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/realpath_basic-win32.phpt4
-rw-r--r--ext/standard/tests/file/realpath_basic3.phpt4
-rw-r--r--ext/standard/tests/file/realpath_basic4.phpt4
-rw-r--r--ext/standard/tests/file/realpath_variation-win32-mb.phpt6
-rw-r--r--ext/standard/tests/file/realpath_variation-win32.phpt6
-rw-r--r--ext/standard/tests/file/rename_basic.phpt4
-rw-r--r--ext/standard/tests/file/rename_variation-win32.phpt6
-rw-r--r--ext/standard/tests/file/rename_variation.phpt2
-rw-r--r--ext/standard/tests/file/rename_variation1-win32.phpt6
-rw-r--r--ext/standard/tests/file/rename_variation1.phpt4
-rw-r--r--ext/standard/tests/file/rename_variation11-win32.phpt4
-rw-r--r--ext/standard/tests/file/rename_variation12-win32.phpt4
-rw-r--r--ext/standard/tests/file/rename_variation12.phpt4
-rw-r--r--ext/standard/tests/file/rename_variation13-win32.phptbin5243 -> 5233 bytes
-rw-r--r--ext/standard/tests/file/rename_variation13.phpt2
-rw-r--r--ext/standard/tests/file/rename_variation2-win32.phpt6
-rw-r--r--ext/standard/tests/file/rename_variation2.phpt4
-rw-r--r--ext/standard/tests/file/rename_variation3-win32.phpt6
-rw-r--r--ext/standard/tests/file/rename_variation3.phpt4
-rw-r--r--ext/standard/tests/file/rename_variation4.phpt6
-rw-r--r--ext/standard/tests/file/rename_variation5.phpt4
-rw-r--r--ext/standard/tests/file/rename_variation7-win32.phpt2
-rw-r--r--ext/standard/tests/file/rename_variation7.phpt2
-rw-r--r--ext/standard/tests/file/rename_variation8-win32.phpt4
-rw-r--r--ext/standard/tests/file/rename_variation8.phpt6
-rw-r--r--ext/standard/tests/file/rename_variation9.phpt6
-rw-r--r--ext/standard/tests/file/stat_basic-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/stat_basic-win32.phpt4
-rw-r--r--ext/standard/tests/file/stat_error-win32.phpt4
-rw-r--r--ext/standard/tests/file/stat_variation1-win32-mb.phpt4
-rw-r--r--ext/standard/tests/file/stat_variation1-win32.phpt4
-rw-r--r--ext/standard/tests/file/stat_variation2-win32.phpt4
-rw-r--r--ext/standard/tests/file/stat_variation3-win32.phpt4
-rw-r--r--ext/standard/tests/file/stat_variation4-win32.phpt4
-rw-r--r--ext/standard/tests/file/stat_variation5-win32.phpt4
-rw-r--r--ext/standard/tests/file/stat_variation6-win32.phpt4
-rw-r--r--ext/standard/tests/file/stat_variation7-win32.phpt4
-rw-r--r--ext/standard/tests/file/stat_variation8-win32.phpt4
-rw-r--r--ext/standard/tests/file/stream_copy_to_stream.phpt4
-rw-r--r--ext/standard/tests/file/stream_get_line.phpt2
-rw-r--r--ext/standard/tests/file/stream_rfc2397_003.phpt2
-rw-r--r--ext/standard/tests/file/symlink.phpt6
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt4
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt4
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt8
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt6
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt4
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt2
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_variation3.phpt2
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt2
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_variation5.phpt4
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt6
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt4
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt2
-rw-r--r--ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt4
-rw-r--r--ext/standard/tests/file/tempnam_variation1-win32-mb.phpt2
-rw-r--r--ext/standard/tests/file/tempnam_variation1-win32.phpt2
-rw-r--r--ext/standard/tests/file/tempnam_variation1.phpt2
-rw-r--r--ext/standard/tests/file/tempnam_variation2-win32.phpt4
-rw-r--r--ext/standard/tests/file/tempnam_variation2.phpt4
-rw-r--r--ext/standard/tests/file/tempnam_variation3-win32.phpt2
-rw-r--r--ext/standard/tests/file/tempnam_variation3.phpt2
-rw-r--r--ext/standard/tests/file/tempnam_variation4-0.phpt4
-rw-r--r--ext/standard/tests/file/tempnam_variation4-1.phpt4
-rw-r--r--ext/standard/tests/file/tempnam_variation5-win32.phpt2
-rw-r--r--ext/standard/tests/file/tempnam_variation5.phpt2
-rw-r--r--ext/standard/tests/file/tempnam_variation6-win32.phpt2
-rw-r--r--ext/standard/tests/file/tempnam_variation6.phpt2
-rw-r--r--ext/standard/tests/file/tempnam_variation8-win32.phpt4
-rw-r--r--ext/standard/tests/file/touch.phpt2
-rw-r--r--ext/standard/tests/file/touch_basic-win32-mb.phpt2
-rw-r--r--ext/standard/tests/file/touch_basic-win32.phpt2
-rw-r--r--ext/standard/tests/file/touch_basic.phpt2
-rw-r--r--ext/standard/tests/file/touch_variation1.phpt2
-rw-r--r--ext/standard/tests/file/touch_variation2.phpt2
-rw-r--r--ext/standard/tests/file/umask_variation1.phpt2
-rw-r--r--ext/standard/tests/file/umask_variation2.phpt2
-rw-r--r--ext/standard/tests/file/unlink_basic.phpt2
-rw-r--r--ext/standard/tests/file/unlink_error-win32-mb.phpt10
-rw-r--r--ext/standard/tests/file/unlink_error-win32.phpt8
-rw-r--r--ext/standard/tests/file/unlink_error.phpt8
-rw-r--r--ext/standard/tests/file/unlink_variation1-win32-mb.phpt2
-rw-r--r--ext/standard/tests/file/unlink_variation1-win32.phpt2
-rw-r--r--ext/standard/tests/file/unlink_variation1.phpt4
-rw-r--r--ext/standard/tests/file/unlink_variation2.phpt2
-rw-r--r--ext/standard/tests/file/unlink_variation3.phpt2
-rw-r--r--ext/standard/tests/file/unlink_variation4.phpt2
-rw-r--r--ext/standard/tests/file/unlink_variation5.phpt2
-rw-r--r--ext/standard/tests/file/windows_links/bug76335.phpt12
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug54028.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug54028_2.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug54977.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug61315.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug64506.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug64699.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug70903.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug71509.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug74923.phpt2
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt8
-rw-r--r--ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt8
-rw-r--r--ext/standard/tests/file/windows_mb_path/recursive_it.phpt10
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_big5_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_big5_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_big5_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt6
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt4
-rw-r--r--ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt4
656 files changed, 1268 insertions, 1268 deletions
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
index 7d08374693..aaf3b34135 100644
--- a/ext/standard/tests/file/bug26003.phpt
+++ b/ext/standard/tests/file/bug26003.phpt
Binary files differ
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
index 3c3abea05a..b082c082b5 100644
--- a/ext/standard/tests/file/copy_variation4.phpt
+++ b/ext/standard/tests/file/copy_variation4.phpt
Binary files differ
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
index 67b070c836..3779cf3378 100644
--- a/ext/standard/tests/file/ftruncate.phpt
+++ b/ext/standard/tests/file/ftruncate.phpt
Binary files differ
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
index 6319d4ad61..d8db734e38 100644
--- a/ext/standard/tests/file/rename_variation13-win32.phpt
+++ b/ext/standard/tests/file/rename_variation13-win32.phpt
Binary files differ
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", "Rd_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 = "զhr`|"; // 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 = "զhr`|"; // 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 = "զhr`|"; // 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', "զhr`|"); // 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', "զhr`|"); // 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', "զhr`|"); // 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', "Volao"); // 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', "Volao"); // 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', "Volao"); // 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 ileri";
$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 ileri";
$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 ileri";
$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 ileri";
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 = "eXg}`oCgEpX"; // 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 = "eXg}`oCgEpX"; // 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 = "eXg}`oCgEpX"; // 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 = "eXg}`oCgEpX77"; // 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', "eXg}`oCgEpX"); // 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', "eXg}`oCgEpX"); // 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', "eXg}`oCgEpX"); // 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");