diff options
Diffstat (limited to 'ext/dba')
92 files changed, 343 insertions, 501 deletions
diff --git a/ext/dba/README b/ext/dba/README deleted file mode 100755 index ec0610b71f..0000000000 --- a/ext/dba/README +++ /dev/null @@ -1,54 +0,0 @@ -These functions build the foundation for accessing Berkeley DB style -databases. - -This is a general abstraction layer for several file-based databases. As -such, functionality is limited to a common subset of features supported -by modern databases such as Sleepycat Software's DB2. (This is not to be -confused with IBM's DB2 software, which is supported through the ODBC -functions.) - -This extensions allows to work with the following databases: -dbm DBM is the oldest (original) type of Berkeley DB style databases. - You should avoid it, if possible. We do not support the - compatibility functions built into DB2 and gdbm, because they are - only compatible on the source code level, but cannot handle the - original dbm format. -ndbm NDBM is a newer type and more flexible than dbm. It still has - most of the arbitrary limits of dbm (therefore it is deprecated). -gdbm GDBM is the GNU database manager. -db2 DB2 is Sleepycat Software's DB2. It's described as "a programmatic - toolkit that provides high-performance built-in database support - for both standalone and client/server applications. -db3 DB3 is Sleepycat Software's DB3. -db4 DB4 is Sleepycat Software's DB4. This is available since PHP 5.0. -cdb CDB is "a fast, reliable, lightweight package for creating and - reading constant databases." It is from the author of qmail and - can be found at http://cr.yp.to/cdb.html. Since it is constant, - we support only reading operations. And since PHP 4.3.0 we support - writing (not updating) through the internal cdb library. -cdb_make Since PHP 4.3.0 we support creation (not updating) of cdb files - when the bundled cdb library is used. -flatfile This is available since PHP 4.3.0 for compatibility with the - deprecated dbm extension only and should be avoided. However you - may use this where files were created in this format. That happens - when configure could not find any external library. -inifile This is available since PHP 4.3.3 to be able to modify php.ini - files from within PHP scripts. When working with ini files you - can pass arrays of the form array(0=>group,1=>value_name) or - strings of the form "[group]value_name" where group is optional. - As the functions dba_firstkey() and dba_nextkey() return string - representations of the key there is a new function dba_key_split() - available since PHP 5 which allows to convert the string keys into - array keys without losing FALSE. -qdbm This is available since PHP 5.0.0. The qdbm library can be loaded - from http://qdbm.sourceforge.net. - - -After configuring and compiling PHP you must execute the following test -from commandline: - php run-tests.php ext/dba. -This shows whether your combination of handlers works. Most problematic -are dbm and ndbm which conflict with many installations. The reason for -this is that on several systems these libraries are part of more than one -other library. The configuration test only prevents you from configuring -malfaunctioning single handlers but not combinations. diff --git a/ext/dba/config.m4 b/ext/dba/config.m4 index 86fa48072e..1e80319218 100644 --- a/ext/dba/config.m4 +++ b/ext/dba/config.m4 @@ -1,7 +1,4 @@ -dnl config.m4 for extension dba - dnl Suppose we need FlatFile if no support or only CDB is used. - AC_DEFUN([PHP_DBA_STD_BEGIN],[ unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT ]) @@ -67,46 +64,76 @@ dnl dnl Options dnl -PHP_ARG_ENABLE(dba,, -[ --enable-dba Build DBA with bundled modules. To build shared DBA - extension use --enable-dba=shared]) - -PHP_ARG_WITH(qdbm,, -[ --with-qdbm[=DIR] DBA: QDBM support], no, no) - -PHP_ARG_WITH(gdbm,, -[ --with-gdbm[=DIR] DBA: GDBM support], no, no) - -PHP_ARG_WITH(ndbm,, -[ --with-ndbm[=DIR] DBA: NDBM support], no, no) - -PHP_ARG_WITH(db4,, -[ --with-db4[=DIR] DBA: Oracle Berkeley DB 4.x or 5.x support], no, no) - -PHP_ARG_WITH(db3,, -[ --with-db3[=DIR] DBA: Oracle Berkeley DB 3.x support], no, no) - -PHP_ARG_WITH(db2,, -[ --with-db2[=DIR] DBA: Oracle Berkeley DB 2.x support], no, no) - -PHP_ARG_WITH(db1,, -[ --with-db1[=DIR] DBA: Oracle Berkeley DB 1.x support/emulation], no, no) - -PHP_ARG_WITH(dbm,, -[ --with-dbm[=DIR] DBA: DBM support], no, no) - -PHP_ARG_WITH(tcadb,, -[ --with-tcadb[=DIR] DBA: Tokyo Cabinet abstract DB support], no, no) - -PHP_ARG_WITH(lmdb,, -[ --with-lmdb[=DIR] DBA: Lightning memory-mapped database support], no, no) - +PHP_ARG_ENABLE([dba],, + [AS_HELP_STRING([--enable-dba], + [Build DBA with bundled modules. To build shared DBA extension use + --enable-dba=shared])]) + +PHP_ARG_WITH([qdbm],, + [AS_HELP_STRING([[--with-qdbm[=DIR]]], + [DBA: QDBM support])], + [no], + [no]) + +PHP_ARG_WITH([gdbm],, + [AS_HELP_STRING([[--with-gdbm[=DIR]]], + [DBA: GDBM support])], + [no], + [no]) + +PHP_ARG_WITH([ndbm],, + [AS_HELP_STRING([[--with-ndbm[=DIR]]], + [DBA: NDBM support])], + [no], + [no]) + +PHP_ARG_WITH([db4],, + [AS_HELP_STRING([[--with-db4[=DIR]]], + [DBA: Oracle Berkeley DB 4.x or 5.x support])], + [no], + [no]) + +PHP_ARG_WITH([db3],, + [AS_HELP_STRING([[--with-db3[=DIR]]], + [DBA: Oracle Berkeley DB 3.x support])], + [no], + [no]) + +PHP_ARG_WITH([db2],, + [AS_HELP_STRING([[--with-db2[=DIR]]], + [DBA: Oracle Berkeley DB 2.x support])], + [no], + [no]) + +PHP_ARG_WITH([db1],, + [AS_HELP_STRING([[--with-db1[=DIR]]], + [DBA: Oracle Berkeley DB 1.x support/emulation])], + [no], + [no]) + +PHP_ARG_WITH([dbm],, + [AS_HELP_STRING([[--with-dbm[=DIR]]], + [DBA: DBM support])], + [no], + [no]) + +PHP_ARG_WITH([tcadb],, + [AS_HELP_STRING([[--with-tcadb[=DIR]]], + [DBA: Tokyo Cabinet abstract DB support])], + [no], + [no]) + +PHP_ARG_WITH([lmdb],, + [AS_HELP_STRING([[--with-lmdb[=DIR]]], + [DBA: Lightning memory-mapped database support])], + [no], + [no]) dnl dnl Library checks dnl -# QDBM +dnl QDBM if test "$PHP_QDBM" != "no"; then PHP_DBA_STD_BEGIN for i in $PHP_QDBM /usr/local /usr; do @@ -114,6 +141,10 @@ if test "$PHP_QDBM" != "no"; then THIS_PREFIX=$i THIS_INCLUDE=$i/include/depot.h break + elif test -f "$i/include/qdbm/depot.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/qdbm/depot.h + break fi done @@ -136,7 +167,7 @@ if test "$PHP_QDBM" != "no"; then fi PHP_DBA_STD_RESULT(qdbm) -# GDBM +dnl GDBM if test "$PHP_GDBM" != "no"; then PHP_DBA_STD_BEGIN if test "$HAVE_QDBM" = "1"; then @@ -164,7 +195,7 @@ if test "$PHP_GDBM" != "no"; then fi PHP_DBA_STD_RESULT(gdbm) -# NDBM +dnl NDBM if test "$PHP_NDBM" != "no"; then PHP_DBA_STD_BEGIN for i in $PHP_NDBM /usr/local /usr; do @@ -338,7 +369,7 @@ AC_DEFUN([PHP_DBA_DB_CHECK],[ PHP_DBA_STD_ATTACH ]) -# DB4 +dnl DB4 if test "$PHP_DB4" != "no"; then PHP_DBA_STD_BEGIN dbdp4="/usr/local/BerkeleyDB.4." @@ -402,7 +433,7 @@ if test "$PHP_DB4" != "no"; then fi PHP_DBA_STD_RESULT(db4,Berkeley DB4) -# DB3 +dnl DB3 if test "$PHP_DB3" != "no"; then PHP_DBA_STD_BEGIN if test "$HAVE_DB4" = "1"; then @@ -435,7 +466,7 @@ if test "$PHP_DB3" != "no"; then fi PHP_DBA_STD_RESULT(db3,Berkeley DB3) -# DB2 +dnl DB2 if test "$PHP_DB2" != "no"; then PHP_DBA_STD_BEGIN if test "$HAVE_DB3" = "1" || test "$HAVE_DB4" = "1"; then @@ -468,7 +499,7 @@ if test "$PHP_DB2" != "no"; then fi PHP_DBA_STD_RESULT(db2, Berkeley DB2) -# DB1 +dnl DB1 if test "$PHP_DB1" != "no"; then PHP_DBA_STD_BEGIN AC_MSG_CHECKING([for DB1 in library]) @@ -535,7 +566,7 @@ if test "$PHP_DB1" != "no"; then fi PHP_DBA_STD_RESULT(db1, DB1) -# DBM +dnl DBM if test "$PHP_DBM" != "no"; then PHP_DBA_STD_BEGIN if test "$HAVE_QDBM" = "1"; then @@ -580,25 +611,33 @@ if test "$PHP_DBM" != "no"; then fi PHP_DBA_STD_RESULT(dbm) -dnl -dnl Bundled modules that should be enabled by default if any other option is enabled -dnl +dnl Bundled modules that should be enabled by default if any other option is +dnl enabled if test "$PHP_DBA" != "no" || test "$HAVE_DBA" = "1" || test "$with_cdb" = "yes" || test "$enable_inifile" = "yes" || test "$enable_flatfile" = "yes"; then php_dba_enable=yes else php_dba_enable=no fi -PHP_ARG_WITH(cdb,, -[ --without-cdb[=DIR] DBA: CDB support (bundled)], $php_dba_enable, no) - -PHP_ARG_ENABLE(inifile,, -[ --disable-inifile DBA: INI support (bundled)], $php_dba_enable, no) - -PHP_ARG_ENABLE(flatfile,, -[ --disable-flatfile DBA: FlatFile support (bundled)], $php_dba_enable, no) - -# CDB +PHP_ARG_WITH([cdb],, + [AS_HELP_STRING([[--without-cdb[=DIR]]], + [DBA: CDB support (bundled)])], + [$php_dba_enable], + [no]) + +PHP_ARG_ENABLE([inifile],, + [AS_HELP_STRING([--disable-inifile], + [DBA: INI support (bundled)])], + [$php_dba_enable], + [no]) + +PHP_ARG_ENABLE([flatfile],, + [AS_HELP_STRING([--disable-flatfile], + [DBA: FlatFile support (bundled)])], + [$php_dba_enable], + [no]) + +dnl CDB if test "$PHP_CDB" = "yes"; then AC_DEFINE(DBA_CDB_BUILTIN, 1, [ ]) AC_DEFINE(DBA_CDB_MAKE, 1, [ ]) @@ -634,7 +673,7 @@ elif test "$PHP_CDB" != "no"; then fi PHP_DBA_STD_RESULT(cdb) -# INIFILE +dnl INIFILE if test "$PHP_INIFILE" != "no"; then AC_DEFINE(DBA_INIFILE, 1, [ ]) ini_sources="libinifile/inifile.c" @@ -642,7 +681,7 @@ if test "$PHP_INIFILE" != "no"; then fi PHP_DBA_STD_RESULT(inifile, [INI File]) -# FLATFILE +dnl FLATFILE if test "$PHP_FLATFILE" != "no"; then AC_DEFINE(DBA_FLATFILE, 1, [ ]) flat_sources="libflatfile/flatfile.c" @@ -661,7 +700,7 @@ if test "$HAVE_DBA" = "1"; then AC_MSG_RESULT([yes]) fi AC_DEFINE(HAVE_DBA, 1, [ ]) - PHP_NEW_EXTENSION(dba, dba.c dba_cdb.c dba_dbm.c dba_gdbm.c dba_ndbm.c dba_db1.c dba_db2.c dba_db3.c dba_db4.c dba_flatfile.c dba_inifile.c dba_qdbm.c dba_tcadb.c dba_lmdb.c $cdb_sources $flat_sources $ini_sources, $ext_shared) + PHP_NEW_EXTENSION(dba, dba.c dba_cdb.c dba_dbm.c dba_gdbm.c dba_ndbm.c dba_db1.c dba_db2.c dba_db3.c dba_db4.c dba_flatfile.c dba_inifile.c dba_qdbm.c dba_tcadb.c dba_lmdb.c $cdb_sources $flat_sources $ini_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) PHP_ADD_BUILD_DIR($ext_builddir/libinifile) PHP_ADD_BUILD_DIR($ext_builddir/libcdb) PHP_ADD_BUILD_DIR($ext_builddir/libflatfile) diff --git a/ext/dba/config.w32 b/ext/dba/config.w32 index 16317c941d..6391076de8 100644 --- a/ext/dba/config.w32 +++ b/ext/dba/config.w32 @@ -6,7 +6,7 @@ ARG_WITH("db", "DBA: Berkeley DB support", "no"); ARG_WITH("lmdb", "DBA: Lightning memory-mapped database support", "no"); if (PHP_DBA != "no") { - EXTENSION("dba", "dba.c dba_cdb.c dba_db1.c dba_db2.c dba_db3.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_ndbm.c dba_inifile.c"); + EXTENSION("dba", "dba.c dba_cdb.c dba_db1.c dba_db2.c dba_db3.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_ndbm.c dba_inifile.c", null, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); ADD_SOURCES("ext/dba/libcdb", "cdb.c cdb_make.c uint32.c", "dba"); ADD_SOURCES("ext/dba/libflatfile", "flatfile.c", "dba"); ADD_SOURCES("ext/dba/libinifile", "inifile.c", "dba"); diff --git a/ext/dba/dba.c b/ext/dba/dba.c index c7bea22296..952993582b 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -160,11 +160,7 @@ ZEND_END_MODULE_GLOBALS(dba) ZEND_DECLARE_MODULE_GLOBALS(dba) -#ifdef ZTS -#define DBA_G(v) TSRMG(dba_globals_id, zend_dba_globals *, v) -#else -#define DBA_G(v) (dba_globals.v) -#endif +#define DBA_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(dba, v) static PHP_GINIT_FUNCTION(dba); @@ -186,6 +182,9 @@ zend_module_entry dba_module_entry = { }; #ifdef COMPILE_DL_DBA +#ifdef ZTS +ZEND_TSRMLS_CACHE_DEFINE() +#endif ZEND_GET_MODULE(dba) #endif @@ -515,6 +514,9 @@ PHP_INI_END() */ static PHP_GINIT_FUNCTION(dba) { +#if defined(COMPILE_DL_DBA) && defined(ZTS) + ZEND_TSRMLS_CACHE_UPDATE(); +#endif dba_globals->default_handler = ""; dba_globals->default_hptr = NULL; } @@ -670,6 +672,12 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) keylen += Z_STRLEN(args[i]); } + /* Exception during string conversion */ + if (EG(exception)) { + FREENOW; + return; + } + if (persistent) { zend_resource *le; @@ -889,7 +897,7 @@ restart: spprintf(&lock_name, 0, "%s.lck", info->path); if (!strcmp(file_mode, "r")) { /* when in read only mode try to use existing .lck file first */ - /* do not log errors for .lck file while in read ony mode on .lck file */ + /* do not log errors for .lck file while in read only mode on .lck file */ lock_file_mode = "rb"; info->lock.fp = php_stream_open_wrapper(lock_name, lock_file_mode, STREAM_MUST_SEEK|IGNORE_PATH|persistent_flag, &opened_path); } @@ -1319,12 +1327,3 @@ PHP_FUNCTION(dba_list) /* }}} */ #endif /* HAVE_DBA */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_cdb.c b/ext/dba/dba_cdb.c index 8fb2259145..d269990c16 100644 --- a/ext/dba/dba_cdb.c +++ b/ext/dba/dba_cdb.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -183,7 +183,7 @@ DBA_UPDATE_FUNC(cdb) if (!cdb->make) return FAILURE; /* database was opened readonly */ if (!mode) - return FAILURE; /* cdb_make dosn't know replace */ + return FAILURE; /* cdb_make doesn't know replace */ if (cdb_make_add(&cdb->m, key, keylen, val, vallen) != -1) return SUCCESS; #endif @@ -337,12 +337,3 @@ DBA_INFO_FUNC(cdb) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_db1.c b/ext/dba/dba_db1.c index adf99ae825..5d9c28dcec 100644 --- a/ext/dba/dba_db1.c +++ b/ext/dba/dba_db1.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -183,12 +183,3 @@ DBA_INFO_FUNC(db1) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_db2.c b/ext/dba/dba_db2.c index 1ddf402565..0fecd36c33 100644 --- a/ext/dba/dba_db2.c +++ b/ext/dba/dba_db2.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -195,12 +195,3 @@ DBA_INFO_FUNC(db2) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c index e59ecc28c1..bc0fdacd02 100644 --- a/ext/dba/dba_db3.c +++ b/ext/dba/dba_db3.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -232,12 +232,3 @@ DBA_INFO_FUNC(db3) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c index b793020ffb..ee296b9c4f 100644 --- a/ext/dba/dba_db4.c +++ b/ext/dba/dba_db4.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -287,12 +287,3 @@ DBA_INFO_FUNC(db4) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c index 98e1a3ac15..58a1493c51 100644 --- a/ext/dba/dba_dbm.c +++ b/ext/dba/dba_dbm.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -199,12 +199,3 @@ DBA_INFO_FUNC(dbm) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_flatfile.c b/ext/dba/dba_flatfile.c index 08579a6f75..9a4a3674f3 100644 --- a/ext/dba/dba_flatfile.c +++ b/ext/dba/dba_flatfile.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -176,12 +176,3 @@ DBA_INFO_FUNC(flatfile) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c index f9c4780216..185241421d 100644 --- a/ext/dba/dba_gdbm.c +++ b/ext/dba/dba_gdbm.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -193,12 +193,3 @@ DBA_INFO_FUNC(gdbm) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_inifile.c b/ext/dba/dba_inifile.c index 0e24022e3e..ed001654af 100644 --- a/ext/dba/dba_inifile.c +++ b/ext/dba/dba_inifile.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -181,12 +181,3 @@ DBA_INFO_FUNC(inifile) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_lmdb.c b/ext/dba/dba_lmdb.c index b3f6442e0c..ea8784bcb1 100644 --- a/ext/dba/dba_lmdb.c +++ b/ext/dba/dba_lmdb.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 2017-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -267,14 +267,14 @@ DBA_FIRSTKEY_FUNC(lmdb) rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); if (rc) { - php_error_docref0(NULL, E_WARNING, "%s", mdb_strerror(rc)); + php_error_docref(NULL, E_WARNING, "%s", mdb_strerror(rc)); return NULL; } rc = mdb_cursor_open(LMDB_IT(txn), LMDB_IT(dbi), &LMDB_IT(cur)); if (rc) { mdb_txn_abort(LMDB_IT(txn)); - php_error_docref0(NULL, E_WARNING, "%s", mdb_strerror(rc)); + php_error_docref(NULL, E_WARNING, "%s", mdb_strerror(rc)); return NULL; } @@ -284,7 +284,7 @@ DBA_FIRSTKEY_FUNC(lmdb) mdb_cursor_close(LMDB_IT(cur)); LMDB_IT(cur) = NULL; if (MDB_NOTFOUND != rc) { - php_error_docref0(NULL, E_WARNING, "%s", mdb_strerror(rc)); + php_error_docref(NULL, E_WARNING, "%s", mdb_strerror(rc)); } return NULL; } @@ -307,7 +307,7 @@ DBA_NEXTKEY_FUNC(lmdb) rc = mdb_txn_renew(LMDB_IT(txn)); if (rc) { - php_error_docref0(NULL, E_WARNING, "%s", mdb_strerror(rc)); + php_error_docref(NULL, E_WARNING, "%s", mdb_strerror(rc)); return NULL; } @@ -317,7 +317,7 @@ DBA_NEXTKEY_FUNC(lmdb) mdb_cursor_close(LMDB_IT(cur)); LMDB_IT(cur) = NULL; if (MDB_NOTFOUND != rc) { - php_error_docref0(NULL, E_WARNING, "%s", mdb_strerror(rc)); + php_error_docref(NULL, E_WARNING, "%s", mdb_strerror(rc)); } return NULL; } @@ -343,7 +343,7 @@ DBA_SYNC_FUNC(lmdb) rc = mdb_env_sync(LMDB_IT(env), 1); if (rc) { - php_error_docref0(NULL, E_WARNING, "%s", mdb_strerror(rc)); + php_error_docref(NULL, E_WARNING, "%s", mdb_strerror(rc)); return FAILURE; } @@ -356,12 +356,3 @@ DBA_INFO_FUNC(lmdb) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_ndbm.c b/ext/dba/dba_ndbm.c index 7d918961f8..973a91322f 100644 --- a/ext/dba/dba_ndbm.c +++ b/ext/dba/dba_ndbm.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -157,12 +157,3 @@ DBA_INFO_FUNC(ndbm) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_qdbm.c b/ext/dba/dba_qdbm.c index 5d1386271f..ba68bcc4ba 100644 --- a/ext/dba/dba_qdbm.c +++ b/ext/dba/dba_qdbm.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -183,12 +183,3 @@ DBA_INFO_FUNC(qdbm) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_tcadb.c b/ext/dba/dba_tcadb.c index 932e708d8c..2df9433026 100644 --- a/ext/dba/dba_tcadb.c +++ b/ext/dba/dba_tcadb.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -208,12 +208,3 @@ DBA_INFO_FUNC(tcadb) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/libcdb/cdb.c b/ext/dba/libcdb/cdb.c index d8d6f46f29..841505a20a 100644 --- a/ext/dba/libcdb/cdb.c +++ b/ext/dba/libcdb/cdb.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/dba/libcdb/cdb.h b/ext/dba/libcdb/cdb.h index b201899e3c..f02ec5040e 100644 --- a/ext/dba/libcdb/cdb.h +++ b/ext/dba/libcdb/cdb.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/dba/libcdb/cdb_make.c b/ext/dba/libcdb/cdb_make.c index 92cfbe7421..95b1c25181 100644 --- a/ext/dba/libcdb/cdb_make.c +++ b/ext/dba/libcdb/cdb_make.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/dba/libcdb/cdb_make.h b/ext/dba/libcdb/cdb_make.h index 75ce699e61..d6cc715a04 100644 --- a/ext/dba/libcdb/cdb_make.h +++ b/ext/dba/libcdb/cdb_make.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/dba/libcdb/uint32.c b/ext/dba/libcdb/uint32.c index 8ea55eebc4..9dd8236886 100644 --- a/ext/dba/libcdb/uint32.c +++ b/ext/dba/libcdb/uint32.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/dba/libcdb/uint32.h b/ext/dba/libcdb/uint32.h index 1ce90cc7ed..1ccc04eefb 100644 --- a/ext/dba/libcdb/uint32.h +++ b/ext/dba/libcdb/uint32.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/dba/libflatfile/flatfile.c b/ext/dba/libflatfile/flatfile.c index 464bb5af8f..410f340526 100644 --- a/ext/dba/libflatfile/flatfile.c +++ b/ext/dba/libflatfile/flatfile.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -289,12 +289,3 @@ char *flatfile_version() return "1.0, $Id$"; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/libflatfile/flatfile.h b/ext/dba/libflatfile/flatfile.h index c83b3db51d..184500cec5 100644 --- a/ext/dba/libflatfile/flatfile.h +++ b/ext/dba/libflatfile/flatfile.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/dba/libinifile/inifile.c b/ext/dba/libinifile/inifile.c index 9e36088102..42cb3bb761 100644 --- a/ext/dba/libinifile/inifile.c +++ b/ext/dba/libinifile/inifile.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -602,12 +602,3 @@ int inifile_append(inifile *dba, const key_type *key, const val_type *value) return inifile_delete_replace_append(dba, key, value, 1, NULL); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/libinifile/inifile.h b/ext/dba/libinifile/inifile.h index b1bd8ab9c3..11ffbd834b 100644 --- a/ext/dba/libinifile/inifile.h +++ b/ext/dba/libinifile/inifile.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/dba/php_dba.h b/ext/dba/php_dba.h index 81c6a1fb08..221d60afa5 100644 --- a/ext/dba/php_dba.h +++ b/ext/dba/php_dba.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/dba/php_tcadb.h b/ext/dba/php_tcadb.h index 6552886bb5..a8158ce57c 100644 --- a/ext/dba/php_tcadb.h +++ b/ext/dba/php_tcadb.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -28,12 +28,3 @@ DBA_FUNCS(tcadb); #endif #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/tests/CONFLICTS b/ext/dba/tests/CONFLICTS new file mode 100644 index 0000000000..7c5f980770 --- /dev/null +++ b/ext/dba/tests/CONFLICTS @@ -0,0 +1,2 @@ +# Many of these tests work on the same database file +dba diff --git a/ext/dba/tests/bug36436.phpt b/ext/dba/tests/bug36436.phpt index 40cc5283cd..fa1d6140f6 100644 --- a/ext/dba/tests/bug36436.phpt +++ b/ext/dba/tests/bug36436.phpt @@ -3,13 +3,13 @@ Bug #36436 (DBA problem with Berkeley DB4) --SKIPIF-- <?php $handler = 'db4'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php $handler = 'db4'; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); $db = dba_popen($db_filename, 'c', 'db4'); @@ -27,7 +27,7 @@ dba_close($db); ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- resource(%d) of type (dba persistent) diff --git a/ext/dba/tests/bug38698.phpt b/ext/dba/tests/bug38698.phpt index 254d3e37c6..6ace7c02aa 100644 --- a/ext/dba/tests/bug38698.phpt +++ b/ext/dba/tests/bug38698.phpt @@ -3,7 +3,7 @@ Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and cdb can't --SKIPIF-- <?php $handler = 'cdb_make'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php @@ -12,7 +12,7 @@ function isLittleEndian() { return 0x00FF === current(unpack('v', pack('S',0x00FF))); } -$db_file = dirname(__FILE__) .'/129php.cdb'; +$db_file = __DIR__ .'/129php.cdb'; if (($db_make=dba_open($db_file, "n", 'cdb_make'))!==FALSE) { if (isLittleEndian() === FALSE) { diff --git a/ext/dba/tests/bug48240.phpt b/ext/dba/tests/bug48240.phpt index 547c7a9ccc..75e70da965 100644 --- a/ext/dba/tests/bug48240.phpt +++ b/ext/dba/tests/bug48240.phpt @@ -3,13 +3,13 @@ Bug #48240 (DBA Segmentation fault dba_nextkey) --SKIPIF-- <?php $handler = 'db4'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php $handler = 'db4'; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); $db = dba_open($db_filename, 'c', 'db4'); @@ -21,7 +21,7 @@ dba_close($db); ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- bool(false) diff --git a/ext/dba/tests/bug49125.phpt b/ext/dba/tests/bug49125.phpt index c1ecc50846..70f59c97c9 100644 --- a/ext/dba/tests/bug49125.phpt +++ b/ext/dba/tests/bug49125.phpt @@ -3,7 +3,7 @@ Bug #49125 (Error in dba_exists C code) --SKIPIF-- <?php $handler = 'db4'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php @@ -11,7 +11,7 @@ Bug #49125 (Error in dba_exists C code) error_reporting(E_ALL); $handler = 'db4'; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); $db = dba_popen($db_filename, 'c', 'db4'); @@ -24,7 +24,7 @@ dba_close($db); ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- bool(true) diff --git a/ext/dba/tests/bug65708.phpt b/ext/dba/tests/bug65708.phpt index ede2511c9e..8bec60a543 100644 --- a/ext/dba/tests/bug65708.phpt +++ b/ext/dba/tests/bug65708.phpt @@ -2,14 +2,14 @@ Bug #65708 (dba functions cast $key param to string in-place, bypassing copy on write) --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php error_reporting(E_ALL); -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); $db = dba_popen($db_filename, 'c'); @@ -29,7 +29,7 @@ dba_close($db); ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- integer diff --git a/ext/dba/tests/bug72157.phpt b/ext/dba/tests/bug72157.phpt index 3443f4bb40..71fa8730b8 100644 --- a/ext/dba/tests/bug72157.phpt +++ b/ext/dba/tests/bug72157.phpt @@ -2,7 +2,7 @@ Bug #72157 (use-after-free caused by dba_open) --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/dba/tests/bug72885.phpt b/ext/dba/tests/bug72885.phpt index bef95fd5c8..f8bcc7e7ab 100644 --- a/ext/dba/tests/bug72885.phpt +++ b/ext/dba/tests/bug72885.phpt @@ -3,12 +3,12 @@ Bug #72885 flatfile: dba_fetch() fails to read replaced entry --SKIPIF-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); $db = dba_open($db_filename, 'c', 'flatfile'); dba_insert('foo', 'bar', $db); @@ -20,7 +20,7 @@ dba_close($db); ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__) .'/clean.inc'); +require_once(__DIR__ .'/clean.inc'); ?> --EXPECT-- bool(true) diff --git a/ext/dba/tests/dba001.phpt b/ext/dba/tests/dba001.phpt index e5a8f58f85..836d03da74 100644 --- a/ext/dba/tests/dba001.phpt +++ b/ext/dba/tests/dba001.phpt @@ -2,12 +2,12 @@ DBA File Creation Test --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { echo "database file created\n"; @@ -18,7 +18,7 @@ DBA File Creation Test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba002.phpt b/ext/dba/tests/dba002.phpt index 051c51b9b5..73b2d42df9 100644 --- a/ext/dba/tests/dba002.phpt +++ b/ext/dba/tests/dba002.phpt @@ -2,12 +2,12 @@ DBA Insert/Fetch Test --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "This is a test insert", $db_file); @@ -19,7 +19,7 @@ DBA Insert/Fetch Test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba003.phpt b/ext/dba/tests/dba003.phpt index 6d1e26bfac..af73282c9f 100644 --- a/ext/dba/tests/dba003.phpt +++ b/ext/dba/tests/dba003.phpt @@ -2,12 +2,12 @@ DBA Insert/Replace/Fetch Test --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "This is a test insert", $db_file); @@ -21,7 +21,7 @@ DBA Insert/Replace/Fetch Test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba004.phpt b/ext/dba/tests/dba004.phpt index 69bc717ea4..c197d761d4 100644 --- a/ext/dba/tests/dba004.phpt +++ b/ext/dba/tests/dba004.phpt @@ -2,12 +2,12 @@ DBA Multiple Insert/Fetch Test --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -25,7 +25,7 @@ DBA Multiple Insert/Fetch Test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba005.phpt b/ext/dba/tests/dba005.phpt index 4e43beab19..5173283755 100644 --- a/ext/dba/tests/dba005.phpt +++ b/ext/dba/tests/dba005.phpt @@ -2,12 +2,12 @@ DBA FirstKey/NextKey Loop Test With 5 Items --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -32,7 +32,7 @@ DBA FirstKey/NextKey Loop Test With 5 Items ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba006.phpt b/ext/dba/tests/dba006.phpt index 7f359a2fd8..84814f2bcf 100644 --- a/ext/dba/tests/dba006.phpt +++ b/ext/dba/tests/dba006.phpt @@ -2,12 +2,12 @@ DBA FirstKey/NextKey with 2 deletes --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -34,7 +34,7 @@ DBA FirstKey/NextKey with 2 deletes ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba007.phpt b/ext/dba/tests/dba007.phpt index fbd78212f2..7c8e2b0bd4 100644 --- a/ext/dba/tests/dba007.phpt +++ b/ext/dba/tests/dba007.phpt @@ -2,16 +2,16 @@ DBA Multiple File Creation Test --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); if (!function_exists('dba_list')) die('skip dba_list() not available'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; - $db_file1 = $db_filename1 = dirname(__FILE__).'/test1.dbm'; - $db_file2 = $db_filename2 = dirname(__FILE__).'/test2.dbm'; + $db_file1 = $db_filename1 = __DIR__.'/test1.dbm'; + $db_file2 = $db_filename2 = __DIR__.'/test2.dbm'; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { echo "database file created\n"; } else { @@ -35,7 +35,7 @@ DBA Multiple File Creation Test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba009.phpt b/ext/dba/tests/dba009.phpt index 3da48b0cc7..d1d612243b 100644 --- a/ext/dba/tests/dba009.phpt +++ b/ext/dba/tests/dba009.phpt @@ -2,12 +2,12 @@ DBA dba_popen Test --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); print("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db=dba_popen($db_file, "n", $handler))!==FALSE) { echo "Opened\n"; @@ -26,7 +26,7 @@ DBA dba_popen Test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba010.phpt b/ext/dba/tests/dba010.phpt index d411c56adb..f5cb08871a 100644 --- a/ext/dba/tests/dba010.phpt +++ b/ext/dba/tests/dba010.phpt @@ -2,12 +2,12 @@ DBA with array keys --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert(array("", "name0") , "Content String 1", $db_file); @@ -37,7 +37,7 @@ if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba011.phpt b/ext/dba/tests/dba011.phpt index 0891a30f48..087233667c 100644 --- a/ext/dba/tests/dba011.phpt +++ b/ext/dba/tests/dba011.phpt @@ -2,12 +2,12 @@ DBA argument tests --SKIPIF-- <?php -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; var_dump(dba_open($db_file)); var_dump(dba_open($db_file, 'n')); @@ -18,7 +18,7 @@ var_dump(dba_open($db_file, 'n', $handler, 2, 3, 4, 5, 6, 7, 8)); ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba012.phpt b/ext/dba/tests/dba012.phpt index 612d543249..022ca03fc3 100644 --- a/ext/dba/tests/dba012.phpt +++ b/ext/dba/tests/dba012.phpt @@ -3,14 +3,14 @@ DBA dba.default_handler tests --SKIPIF-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); ?> --INI-- dba.default_handler=flatfile --FILE-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; echo "Test 1\n"; @@ -28,7 +28,7 @@ var_dump(dba_open($db_filename, 'n')); ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba013.phpt b/ext/dba/tests/dba013.phpt index 661275c07d..8a446cf9a8 100644 --- a/ext/dba/tests/dba013.phpt +++ b/ext/dba/tests/dba013.phpt @@ -2,12 +2,12 @@ DBA with array key with empty array --SKIPIF-- <?php -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { @@ -19,7 +19,7 @@ if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba014.phpt b/ext/dba/tests/dba014.phpt index 799fe830a5..410c3af3c1 100644 --- a/ext/dba/tests/dba014.phpt +++ b/ext/dba/tests/dba014.phpt @@ -2,12 +2,12 @@ DBA with array key with array containing too many elements --SKIPIF-- <?php -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { @@ -19,7 +19,7 @@ if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba015.phpt b/ext/dba/tests/dba015.phpt index 4cd0ea101a..7d268cbe20 100644 --- a/ext/dba/tests/dba015.phpt +++ b/ext/dba/tests/dba015.phpt @@ -3,14 +3,14 @@ DBA with persistent connections --SKIPIF-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; echo "Test 1\n"; @@ -51,7 +51,7 @@ echo dba_fetch("key2", $db_file1), "\n"; ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba016.phpt b/ext/dba/tests/dba016.phpt index 4b0052352a..60bf4da4bf 100644 --- a/ext/dba/tests/dba016.phpt +++ b/ext/dba/tests/dba016.phpt @@ -3,13 +3,13 @@ DBA lock modifier error message test --SKIPIF-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; $db_file1 = dba_popen($db_filename, 'n-t', 'flatfile'); @@ -18,7 +18,7 @@ $db_file1 = dba_popen($db_filename, 'n-t', 'flatfile'); ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba_cdb.phpt b/ext/dba/tests/dba_cdb.phpt index 998fc41638..87e9992179 100644 --- a/ext/dba/tests/dba_cdb.phpt +++ b/ext/dba/tests/dba_cdb.phpt @@ -3,19 +3,19 @@ DBA CDB handler test --SKIPIF-- <?php $handler = 'cdb'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die('info CDB does not support replace or delete'); ?> --FILE-- <?php $handler = 'cdb'; - require_once(dirname(__FILE__) .'/test.inc'); - require_once(dirname(__FILE__) .'/dba_handler.inc'); + require_once(__DIR__ .'/test.inc'); + require_once(__DIR__ .'/dba_handler.inc'); ?> ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: cdb diff --git a/ext/dba/tests/dba_cdb_001.phpt b/ext/dba/tests/dba_cdb_001.phpt index a0dc438636..82a1c0b585 100644 --- a/ext/dba/tests/dba_cdb_001.phpt +++ b/ext/dba/tests/dba_cdb_001.phpt @@ -3,14 +3,14 @@ DBA CDB handler test --SKIPIF-- <?php $handler = 'cdb'; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die('info CDB does not support replace or delete'); ?> --FILE-- <?php $handler = 'cdb'; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "Test 0\n"; @@ -64,7 +64,7 @@ else { ===DONE=== --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- Test 0 diff --git a/ext/dba/tests/dba_cdb_make.phpt b/ext/dba/tests/dba_cdb_make.phpt index 0a1fd79b36..33fcd6ea47 100644 --- a/ext/dba/tests/dba_cdb_make.phpt +++ b/ext/dba/tests/dba_cdb_make.phpt @@ -3,16 +3,16 @@ DBA CDB_MAKE handler test --SKIPIF-- <?php $handler = 'cdb_make'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die('info CDB_MAKE does not support reading'); ?> --FILE-- <?php $handler = 'cdb_make'; - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; // print md5 checksum of test.cdb which is generated by cdb_make program - var_dump(md5_file(dirname(__FILE__).'/test.cdb')); + var_dump(md5_file(__DIR__.'/test.cdb')); if (($db_make=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("1", "1", $db_make); dba_insert("2", "2", $db_make); @@ -32,7 +32,7 @@ DBA CDB_MAKE handler test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: cdb_make diff --git a/ext/dba/tests/dba_cdb_read.phpt b/ext/dba/tests/dba_cdb_read.phpt index 9d65f8b732..91ca6e9853 100644 --- a/ext/dba/tests/dba_cdb_read.phpt +++ b/ext/dba/tests/dba_cdb_read.phpt @@ -3,13 +3,13 @@ DBA CDB handler test (read only) --SKIPIF-- <?php $handler = 'cdb_make'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php echo "database handler: cdb\n"; $handler = 'cdb'; - $db_file = dirname(__FILE__).'/test.cdb'; + $db_file = __DIR__.'/test.cdb'; if (($db_file=dba_open($db_file, "r", $handler))!==FALSE) { // read key sequence $a = dba_firstkey($db_file); diff --git a/ext/dba/tests/dba_db1.phpt b/ext/dba/tests/dba_db1.phpt index 01d96feec5..c378aaf3c2 100644 --- a/ext/dba/tests/dba_db1.phpt +++ b/ext/dba/tests/dba_db1.phpt @@ -3,13 +3,13 @@ DBA DB1 handler test --SKIPIF-- <?php $handler = 'db1'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'db1'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/test.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --EXPECT-- diff --git a/ext/dba/tests/dba_db2.phpt b/ext/dba/tests/dba_db2.phpt index 09fefb581e..8662189cbd 100644 --- a/ext/dba/tests/dba_db2.phpt +++ b/ext/dba/tests/dba_db2.phpt @@ -3,13 +3,13 @@ DBA DB2 handler test --SKIPIF-- <?php $handler = 'db2'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'db2'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/test.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --EXPECT-- diff --git a/ext/dba/tests/dba_db3.phpt b/ext/dba/tests/dba_db3.phpt index 9c78eb3726..670680cb8a 100644 --- a/ext/dba/tests/dba_db3.phpt +++ b/ext/dba/tests/dba_db3.phpt @@ -3,13 +3,13 @@ DBA DB3 handler test --SKIPIF-- <?php $handler = 'db3'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'db3'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/test.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --EXPECT-- diff --git a/ext/dba/tests/dba_db4_000.phpt b/ext/dba/tests/dba_db4_000.phpt index 21e4a18394..afeedff47c 100644 --- a/ext/dba/tests/dba_db4_000.phpt +++ b/ext/dba/tests/dba_db4_000.phpt @@ -3,18 +3,18 @@ DBA DB4 handler test --SKIPIF-- <?php $handler = 'db4'; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php $handler = 'db4'; -require_once(dirname(__FILE__) .'/test.inc'); -require_once(dirname(__FILE__) .'/dba_handler.inc'); +require_once(__DIR__ .'/test.inc'); +require_once(__DIR__ .'/dba_handler.inc'); ?> ===DONE=== --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_001.phpt b/ext/dba/tests/dba_db4_001.phpt index 73b5da75c3..c7a851f3ef 100644 --- a/ext/dba/tests/dba_db4_001.phpt +++ b/ext/dba/tests/dba_db4_001.phpt @@ -3,14 +3,14 @@ DBA DB4 New File Creation open("c") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_open($db_filename, "c", $handler)) !== FALSE) { echo "database file created\n"; @@ -24,7 +24,7 @@ if (($db_file = dba_open($db_filename, "c", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_002.phpt b/ext/dba/tests/dba_db4_002.phpt index 1ab3117b6e..d37e55b855 100644 --- a/ext/dba/tests/dba_db4_002.phpt +++ b/ext/dba/tests/dba_db4_002.phpt @@ -3,14 +3,14 @@ DBA DB4 New File Creation open("n") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_open($db_filename, "n", $handler)) !== FALSE) { echo "database file created\n"; @@ -24,7 +24,7 @@ if (($db_file = dba_open($db_filename, "n", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_003.phpt b/ext/dba/tests/dba_db4_003.phpt index 5690bd9250..7bb664a9dc 100644 --- a/ext/dba/tests/dba_db4_003.phpt +++ b/ext/dba/tests/dba_db4_003.phpt @@ -3,14 +3,14 @@ DBA DB4 File Creation open("c") with existing file --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; var_dump(file_put_contents($db_filename, "Dummy contents")); @@ -33,7 +33,7 @@ echo "$s\n"; ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_004.phpt b/ext/dba/tests/dba_db4_004.phpt index dd89f2d062..7e0445fb74 100644 --- a/ext/dba/tests/dba_db4_004.phpt +++ b/ext/dba/tests/dba_db4_004.phpt @@ -3,14 +3,14 @@ DBA DB4 Truncate Existing File open("n") --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; var_dump(file_put_contents($db_filename, "Dummy contents")); @@ -31,7 +31,7 @@ if (($db_file = dba_open($db_filename, "n", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_005.phpt b/ext/dba/tests/dba_db4_005.phpt index f0cf858e9a..7240e6e56a 100644 --- a/ext/dba/tests/dba_db4_005.phpt +++ b/ext/dba/tests/dba_db4_005.phpt @@ -3,14 +3,14 @@ DBA DB4 New File Creation popen("c") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { echo "database file created\n"; @@ -24,7 +24,7 @@ if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_006.phpt b/ext/dba/tests/dba_db4_006.phpt index 7823922a9f..75694141d4 100644 --- a/ext/dba/tests/dba_db4_006.phpt +++ b/ext/dba/tests/dba_db4_006.phpt @@ -3,14 +3,14 @@ DBA DB4 New File Creation popen("n") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_popen($db_filename, "n", $handler)) !== FALSE) { echo "database file created\n"; @@ -24,7 +24,7 @@ if (($db_file = dba_popen($db_filename, "n", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_007.phpt b/ext/dba/tests/dba_db4_007.phpt index 193d2ed341..bfa67dd5d6 100644 --- a/ext/dba/tests/dba_db4_007.phpt +++ b/ext/dba/tests/dba_db4_007.phpt @@ -3,14 +3,14 @@ DBA DB4 File Creation popen("c") with existing invalid file --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; var_dump(file_put_contents($db_filename, "Dummy contents")); @@ -29,7 +29,7 @@ if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_008.phpt b/ext/dba/tests/dba_db4_008.phpt index e5a9467555..457818c929 100644 --- a/ext/dba/tests/dba_db4_008.phpt +++ b/ext/dba/tests/dba_db4_008.phpt @@ -3,14 +3,14 @@ DBA DB4 Truncate Existing File popen("n") --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; var_dump(file_put_contents($db_filename, "Dummy contents")); @@ -31,7 +31,7 @@ if (($db_file = dba_popen($db_filename, "n", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_009.phpt b/ext/dba/tests/dba_db4_009.phpt index 8069c84bf8..48d7f3a30f 100644 --- a/ext/dba/tests/dba_db4_009.phpt +++ b/ext/dba/tests/dba_db4_009.phpt @@ -3,16 +3,16 @@ DBA DB4 Multiple File Creation Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; -$db_file1 = $db_filename1 = dirname(__FILE__).'/test1.dbm'; -$db_file2 = $db_filename2 = dirname(__FILE__).'/test2.dbm'; +$db_file1 = $db_filename1 = __DIR__.'/test1.dbm'; +$db_file2 = $db_filename2 = __DIR__.'/test2.dbm'; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { echo "database file created\n"; } else { @@ -36,7 +36,7 @@ dba_close($db_file); ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_011.phpt b/ext/dba/tests/dba_db4_011.phpt index cdd57bc5ca..311bdf29f1 100644 --- a/ext/dba/tests/dba_db4_011.phpt +++ b/ext/dba/tests/dba_db4_011.phpt @@ -3,13 +3,13 @@ DBA DB4 with repeated key --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_filename, "c", $handler))!==FALSE) { var_dump(dba_insert("key1", "Content String 1", $db_file)); @@ -25,7 +25,7 @@ if (($db_file=dba_open($db_filename, "c", $handler))!==FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_012.phpt b/ext/dba/tests/dba_db4_012.phpt index e626ba0c11..09a9b0da1c 100644 --- a/ext/dba/tests/dba_db4_012.phpt +++ b/ext/dba/tests/dba_db4_012.phpt @@ -3,14 +3,14 @@ DBA DB4 New File Creation open("rl") --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_open($db_filename, "rl", $handler)) !== FALSE) { echo "database file created\n"; @@ -22,7 +22,7 @@ if (($db_file = dba_open($db_filename, "rl", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_013.phpt b/ext/dba/tests/dba_db4_013.phpt index 133f90f88a..f107dd8574 100644 --- a/ext/dba/tests/dba_db4_013.phpt +++ b/ext/dba/tests/dba_db4_013.phpt @@ -3,14 +3,14 @@ DBA DB4 File open("rl") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { @@ -30,7 +30,7 @@ if (($db_file = dba_popen($db_filename, "rl", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_014.phpt b/ext/dba/tests/dba_db4_014.phpt index 38d272dd28..6b6b9b2ed3 100644 --- a/ext/dba/tests/dba_db4_014.phpt +++ b/ext/dba/tests/dba_db4_014.phpt @@ -3,14 +3,14 @@ DBA DB4 File open("wl") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_open($db_filename, "wl", $handler)) !== FALSE) { @@ -23,7 +23,7 @@ if (($db_file = dba_open($db_filename, "wl", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_015.phpt b/ext/dba/tests/dba_db4_015.phpt index 0bd79ed7f5..a99b984cde 100644 --- a/ext/dba/tests/dba_db4_015.phpt +++ b/ext/dba/tests/dba_db4_015.phpt @@ -3,14 +3,14 @@ DBA DB4 File open("wl") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { @@ -30,7 +30,7 @@ if (($db_file = dba_popen($db_filename, "wl", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_016.phpt b/ext/dba/tests/dba_db4_016.phpt index 618fc868e5..3e1eb87262 100644 --- a/ext/dba/tests/dba_db4_016.phpt +++ b/ext/dba/tests/dba_db4_016.phpt @@ -3,14 +3,14 @@ DBA DB4 File Creation popen("c") with existing valid file --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { @@ -45,7 +45,7 @@ if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_017.phpt b/ext/dba/tests/dba_db4_017.phpt index 8a2dbdd9ff..04ad544a78 100644 --- a/ext/dba/tests/dba_db4_017.phpt +++ b/ext/dba/tests/dba_db4_017.phpt @@ -3,13 +3,13 @@ DBA DB4 file creation dba_open("cd") --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_open($db_filename, "cd", $handler)) !== FALSE) { @@ -28,7 +28,7 @@ if (($db_file = dba_open($db_filename, "cd", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_018.phpt b/ext/dba/tests/dba_db4_018.phpt index fb696e9f5f..e4b4cfcf27 100644 --- a/ext/dba/tests/dba_db4_018.phpt +++ b/ext/dba/tests/dba_db4_018.phpt @@ -3,14 +3,14 @@ DBA DB4 with persistent connections --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; echo "Test 1\n"; @@ -51,7 +51,7 @@ echo dba_fetch("key2", $db_file1), "\n"; ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --XFAIL-- Test 6 crashes with dba pointer of NULL, bug http://bugs.php.net/bug.php?id=51278 diff --git a/ext/dba/tests/dba_db4_handlers.phpt b/ext/dba/tests/dba_db4_handlers.phpt index 41c397bdf4..92f93ad4a6 100644 --- a/ext/dba/tests/dba_db4_handlers.phpt +++ b/ext/dba/tests/dba_db4_handlers.phpt @@ -3,13 +3,13 @@ DBA DB4 Handler Test --SKIPIF-- <?php $handler="db4"; -require(dirname(__FILE__) .'/skipif.inc'); +require(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler="db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; function check($h) @@ -40,7 +40,7 @@ foreach ($h as $key => $val) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTREGEX-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_optimize.phpt b/ext/dba/tests/dba_db4_optimize.phpt index e8b5d6bb65..8a039b7152 100644 --- a/ext/dba/tests/dba_db4_optimize.phpt +++ b/ext/dba/tests/dba_db4_optimize.phpt @@ -3,13 +3,13 @@ DBA DB4 Optimize Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -29,7 +29,7 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { <?php exit(0); ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_sync.phpt b/ext/dba/tests/dba_db4_sync.phpt index a72aed4e71..e659333907 100644 --- a/ext/dba/tests/dba_db4_sync.phpt +++ b/ext/dba/tests/dba_db4_sync.phpt @@ -3,13 +3,13 @@ DBA DB4 Sync Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -29,7 +29,7 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { <?php exit(0); ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_dbm.phpt b/ext/dba/tests/dba_dbm.phpt index 26ea91f9f2..39f0a99fae 100644 --- a/ext/dba/tests/dba_dbm.phpt +++ b/ext/dba/tests/dba_dbm.phpt @@ -3,18 +3,18 @@ DBA DBM handler test --SKIPIF-- <?php $handler = 'dbm'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'dbm'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/test.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: dbm diff --git a/ext/dba/tests/dba_flatfile.phpt b/ext/dba/tests/dba_flatfile.phpt index c6064239c6..4fcaafe32d 100644 --- a/ext/dba/tests/dba_flatfile.phpt +++ b/ext/dba/tests/dba_flatfile.phpt @@ -3,18 +3,18 @@ DBA FlatFile handler test --SKIPIF-- <?php $handler = 'flatfile'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php $handler = 'flatfile'; - require_once(dirname(__FILE__) .'/test.inc'); - require_once(dirname(__FILE__) .'/dba_handler.inc'); + require_once(__DIR__ .'/test.inc'); + require_once(__DIR__ .'/dba_handler.inc'); ?> ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: flatfile diff --git a/ext/dba/tests/dba_gdbm.phpt b/ext/dba/tests/dba_gdbm.phpt index 18ee455e4d..8ca2adfe04 100644 --- a/ext/dba/tests/dba_gdbm.phpt +++ b/ext/dba/tests/dba_gdbm.phpt @@ -3,14 +3,14 @@ DBA GDBM handler test --SKIPIF-- <?php $handler = 'gdbm'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'gdbm'; - require_once dirname(__FILE__) .'/test.inc'; + require_once __DIR__ .'/test.inc'; $lock_flag = ''; // lock in library - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/dba_handler.inc'; // Read during write is system dependent. Important is that there is no deadlock ?> diff --git a/ext/dba/tests/dba_handlers.phpt b/ext/dba/tests/dba_handlers.phpt index 41c23b5cf6..a6f104f16a 100644 --- a/ext/dba/tests/dba_handlers.phpt +++ b/ext/dba/tests/dba_handlers.phpt @@ -3,13 +3,13 @@ DBA Handler Test --SKIPIF-- <?php $handler="flatfile"; -require(dirname(__FILE__) .'/skipif.inc'); +require(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler="flatfile"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; function check($h) @@ -52,7 +52,7 @@ foreach ($h as $key => $val) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba_inifile.phpt b/ext/dba/tests/dba_inifile.phpt index ad7b72a82d..c21413f1ac 100644 --- a/ext/dba/tests/dba_inifile.phpt +++ b/ext/dba/tests/dba_inifile.phpt @@ -3,18 +3,18 @@ DBA INIFILE handler test --SKIPIF-- <?php $handler = 'inifile'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'inifile'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/test.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: inifile diff --git a/ext/dba/tests/dba_lmdb.phpt b/ext/dba/tests/dba_lmdb.phpt index b32cd58bbd..3ca8bfeb07 100644 --- a/ext/dba/tests/dba_lmdb.phpt +++ b/ext/dba/tests/dba_lmdb.phpt @@ -3,19 +3,19 @@ DBA LMDB handler test --SKIPIF-- <?php $handler = 'lmdb'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'lmdb'; - require_once dirname(__FILE__) .'/test.inc'; + require_once __DIR__ .'/test.inc'; $lock_flag = ''; // lock in library - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --CLEAN-- <?php - require_once dirname(__FILE__) .'/clean.inc'; + require_once __DIR__ .'/clean.inc'; ?> --EXPECTF-- database handler: lmdb diff --git a/ext/dba/tests/dba_ndbm.phpt b/ext/dba/tests/dba_ndbm.phpt index a3478862eb..616bcb2c6b 100644 --- a/ext/dba/tests/dba_ndbm.phpt +++ b/ext/dba/tests/dba_ndbm.phpt @@ -3,13 +3,13 @@ DBA NDBM handler test --SKIPIF-- <?php $handler = 'ndbm'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'ndbm'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/test.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --EXPECT-- diff --git a/ext/dba/tests/dba_optimize.phpt b/ext/dba/tests/dba_optimize.phpt index 6347d4983c..db258f5ff7 100644 --- a/ext/dba/tests/dba_optimize.phpt +++ b/ext/dba/tests/dba_optimize.phpt @@ -2,12 +2,12 @@ DBA Optimize Test --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; die("info $HND handler used"); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -36,7 +36,7 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { <?php exit(0); ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba_qdbm.phpt b/ext/dba/tests/dba_qdbm.phpt index 45fed53824..4f2a097c38 100644 --- a/ext/dba/tests/dba_qdbm.phpt +++ b/ext/dba/tests/dba_qdbm.phpt @@ -3,19 +3,19 @@ DBA QDBM handler test --SKIPIF-- <?php $handler = 'qdbm'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'qdbm'; - require_once dirname(__FILE__) .'/test.inc'; + require_once __DIR__ .'/test.inc'; $lock_flag = ''; // lock in library - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: qdbm diff --git a/ext/dba/tests/dba_split.phpt b/ext/dba/tests/dba_split.phpt index 0989f09feb..37a2157666 100644 --- a/ext/dba/tests/dba_split.phpt +++ b/ext/dba/tests/dba_split.phpt @@ -2,7 +2,7 @@ DBA Split Test --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; die("info $HND handler used"); ?> --FILE-- diff --git a/ext/dba/tests/dba_sync.phpt b/ext/dba/tests/dba_sync.phpt index 0e64ea2905..7210469cd5 100644 --- a/ext/dba/tests/dba_sync.phpt +++ b/ext/dba/tests/dba_sync.phpt @@ -2,12 +2,12 @@ DBA Sync Test --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; die("info $HND handler used"); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -36,7 +36,7 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { <?php exit(0); ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba_tcadb.phpt b/ext/dba/tests/dba_tcadb.phpt index bc21ee189a..04246a29f3 100644 --- a/ext/dba/tests/dba_tcadb.phpt +++ b/ext/dba/tests/dba_tcadb.phpt @@ -3,20 +3,20 @@ DBA TCADB handler test --SKIPIF-- <?php $handler = 'tcadb'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $lock_flag = 'l'; - $db_filename = $db_file = dirname(__FILE__) .'/test0.tch'; + $db_filename = $db_file = __DIR__ .'/test0.tch'; @unlink($db_filename); @unlink($db_filename.'.lck'); - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --CLEAN-- <?php -$db_filename = $db_file = dirname(__FILE__) .'/test0.tch'; +$db_filename = $db_file = __DIR__ .'/test0.tch'; @unlink($db_filename); @unlink($db_filename.'.lck'); ?> |