diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33e86dd69a0..1ee4df7c180 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -76,3 +76,128 @@ issues. Although not a formal channel, you can also find a number of core developers on the #php.pecl channel on [EFnet](http://www.efnet.org/). Similarly, many documentation writers can be found on #php.doc. + +## PHP source code directory structure + +PHP source code also includes several files generated during development and +several parts where maintenance is happening upstream in their respective +locations. + +```bash +/ + ├─ .git/ # Git configuration and source directory + └─ TSRM/ # Thread Safe Resource Manager + └─ m4/ # https://github.com/autoconf-archive/autoconf-archive + └─ ax_func_which_gethostbyname_r.m4 + └─ ... + └─ Zend/ # Zend Engine + ├─ zend_language_scanner.c # Generated by re2c + ├─ zend_language_scanner_defs.h # Generated by re2c + ├─ zend_ini_scanner.c # Generated by re2c + ├─ zend_ini_scanner_defs.h # Generated by re2c + ├─ zend_vm_execute.h # Generated by `Zend/zend_vm_gen.php` + ├─ zend_vm_opcodes.c # Generated by `Zend/zend_vm_gen.php` + ├─ zend_vm_opcodes.h # Generated by `Zend/zend_vm_gen.php` + └─ ... + ├─ appveyor/ # Appveyor CI service files + └─ build/ # *nix build system files + ├─ ax_check_compile_flag.m4 # https://github.com/autoconf-archive/autoconf-archive + ├─ ax_gcc_func_attribute.m4 # https://github.com/autoconf-archive/autoconf-archive + ├─ libtool.m4 # https://git.savannah.gnu.org/cgit/libtool.git + ├─ shtool # https://www.gnu.org/software/shtool/ + └─ ... + └─ ext/ # PHP core extensions + └─ bcmath/ + ├─ libbcmath/ # Forked and maintained in php-src + └─ ... + └─ curl/ + ├─ sync-constants.php # The curl symbols checker + └─ ... + └─ date/ + └─ lib/ # Bundled datetime library https://github.com/derickr/timelib + ├─ parse_date.c # Generated by re2c 0.15.3 + ├─ parse_iso_intervals.c # Generated by re2c 0.15.3 + └─ ... + └─ ... + └─ fileinfo/ + ├─ libmagic/ # Modified libmagic https://github.com/file/file + ├─ data_file.c # Generated by `ext/fileinfo/create_data_file.php` + ├─ libmagic.patch # Modifications patch from upstream libmagic + ├─ magicdata.patch # Modifications patch from upstream libmagic + └─ ... + └─ gd/ + ├─ libgd/ # Bundled and modified GD library https://github.com/libgd/libgd + └─ ... + └─ json/ + ├─ json_parser.tab.c # Generated by bison + ├─ json_parser.tab.h # Generated by bison + ├─ json_scanner.c # Generated by re2c + ├─ php_json_scanner_defs.h # Generated by re2c + └─ ... + └─ mbstring/ + ├─ libmbfl/ # Forked and maintained in php-src + ├─ oniguruma/ # Bundled https://github.com/kkos/oniguruma + ├─ oniguruma.patch # Modifications patch from upstream oniguruma + ├─ unicode_data.h # Generated by `ext/mbstring/ucgendat/ucgendat.php` + └─ ... + └─ pcre/ + ├─ pcre2lib/ # https://www.pcre.org/ + └─ ... + └─ pdo/ + ├─ pdo_sql_parser.c # Generated by re2c + └─ ... + └─ phar/ + ├─ phar_path_check.c # Generated by re2c + └─ ... + └─ skeleton/ # Skeleton for developing new extensions with `ext/ext_skel.php` + └─ ... + └─ sqlite3/ + ├─ libsqlite/ # https://www.sqlite.org mirror: https://github.com/mackyle/sqlite + └─ ... + └─ standard/ + └─ html_tables/ + ├─ mappings/ # https://www.unicode.org/Public/MAPPINGS/ + └─ ... + ├─ credits_ext.h # Generated by `scripts/dev/credits` + ├─ credits_sapi.h # Generated by `scripts/dev/credits` + ├─ html_tables.h # Generated by `ext/standard/html_tables/html_table_gen.php` + ├─ url_scanner_ex.c # Generated by re2c + ├─ var_unserializer.c # Generated by re2c + └─ ... + └─ tokenizer/ + ├─ tokenizer_data.c # Generated by `ext/tokenizer/tokenizer_data_gen.sh` + └─ ... + └─ xmlrpc/ + ├─ libxmlrpc/ # Forked and maintained in php-src + └─ ... + └─ zend_test # For testing internal APIs. Not needed for regular builds. + └─ ... + └─ zip/ # Bundled https://github.com/pierrejoye/php_zip + └─ ... + └─ ... + └─ main/ # Binding that ties extensions, SAPIs, and engine together + ├─ streams/ # Streams layer subsystem + ├─ php_version.h # Generated by release managers using `configure` + └─ ... + ├─ pear/ # PEAR installation + └─ sapi/ # PHP SAPI modules + └─ cli/ + ├─ mime_type_map.h # Generated by `sapi/cli/generate_mime_type_map.php` + └─ ... + └─ phpdbg/ + ├─ phpdbg_lexer.c # Generated by re2c + ├─ phpdbg_parser.c # Generated by bison + ├─ phpdbg_parser.h # Generated by bison + └─ ... + └─ ... + ├─ scripts/ # php-config, phpize and internal development scripts + ├─ tests/ # Core features tests + ├─ travis/ # Travis CI service files + └─ win32/ # Windows build system files + ├─ cp_enc_map.c # Generated by `win32/cp_enc_map_gen.exe` + └─ ... + ├─ config.guess # https://git.savannah.gnu.org/cgit/config.git + ├─ config.sub # https://git.savannah.gnu.org/cgit/config.git + ├─ ltmain.sh # https://git.savannah.gnu.org/cgit/libtool.git + └─ ... +``` diff --git a/NEWS b/NEWS index 0db3bdb234f..49d5716d876 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,9 @@ PHP NEWS . Changed default of $variant parameter of idn_to_ascii() and idn_to_utf8(). (cmb) +- PDO_SQLite: + . Implemented sqlite_stmt_readonly in PDO_SQLite. (BohwaZ) + - SQLite3: . Updated to SQLite 3.25.1. (cmb) diff --git a/UPGRADING b/UPGRADING index 9affb5b1297..0bb09c6bc46 100644 --- a/UPGRADING +++ b/UPGRADING @@ -27,6 +27,11 @@ PHP 7.4 UPGRADE NOTES 2. New Features ======================================== +- PDO_SQLite: + . PDOStatement::getAttribute(PDO::SQLITE_ATTR_READONLY_STATEMENT) allows to + check whether this statement is read-only, i.e. whether it doesn't modify + the database. + ======================================== 3. Changes in SAPI modules ======================================== @@ -58,6 +63,9 @@ PHP 7.4 UPGRADE NOTES - Intl: . The Intl extension now requires at least ICU 50.1. +- Libxml: + . All libxml based extensions now require libxml 2.7.6 or newer. + - Reflection: . Numeric value of class, property, function and constant modifiers was changed. Don't filter methods and properties through diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 29513f53887..0cbe2e21cdc 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -42,6 +42,10 @@ PHP 7.4 INTERNALS UPGRADE NOTES d. zend_check_private() is removed. Use (func->common.scope == scope) instead. + e. Pointers returned by php_win32_error_to_msg() have to be freed using + php_win32_error_msg_free(). Same regarding php_win_err() vs. + php_win_err_free(). + ======================== 2. Build system changes ======================== diff --git a/Zend/tests/bug39542.phpt b/Zend/tests/bug39542.phpt index 2008fe140a3..1409c4181c6 100644 --- a/Zend/tests/bug39542.phpt +++ b/Zend/tests/bug39542.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { } spl_autoload_register(function ($class) { - if (!require_once($class.'.php')) { + if (!require_once($class.'.inc')) { error_log('Error: Autoload class: '.$class.' not found!'); } }); diff --git a/Zend/tests/bug39542/bug39542.php b/Zend/tests/bug39542/bug39542.inc old mode 100755 new mode 100644 similarity index 100% rename from Zend/tests/bug39542/bug39542.php rename to Zend/tests/bug39542/bug39542.inc diff --git a/Zend/tests/bug67436/a.php b/Zend/tests/bug67436/a.inc similarity index 100% rename from Zend/tests/bug67436/a.php rename to Zend/tests/bug67436/a.inc diff --git a/Zend/tests/bug67436/b.php b/Zend/tests/bug67436/b.inc similarity index 100% rename from Zend/tests/bug67436/b.php rename to Zend/tests/bug67436/b.inc diff --git a/Zend/tests/bug67436/bug67436.phpt b/Zend/tests/bug67436/bug67436.phpt index 8a6b3f80270..2bd06a07459 100644 --- a/Zend/tests/bug67436/bug67436.phpt +++ b/Zend/tests/bug67436/bug67436.phpt @@ -9,7 +9,7 @@ error_reporting=-1 spl_autoload_register(function($classname) { if (in_array($classname, array('a','b','c'))) { - require_once __DIR__ . "/{$classname}.php"; + require_once __DIR__ . "/{$classname}.inc"; } }); diff --git a/Zend/tests/bug67436/bug67436_nohandler.phpt b/Zend/tests/bug67436/bug67436_nohandler.phpt index 232110797a6..088761e00b6 100644 --- a/Zend/tests/bug67436/bug67436_nohandler.phpt +++ b/Zend/tests/bug67436/bug67436_nohandler.phpt @@ -5,7 +5,7 @@ bug67436: E_STRICT instead of custom error handler spl_autoload_register(function($classname) { if (in_array($classname, array('a','b','c'))) { - require_once __DIR__ . "/{$classname}.php"; + require_once __DIR__ . "/{$classname}.inc"; } }); @@ -15,6 +15,6 @@ $b = new b(); $b->test(); --EXPECTF-- -Warning: Declaration of b::test() should be compatible with a::test($arg = c::TESTCONSTANT) in %s%ebug67436%eb.php on line %d +Warning: Declaration of b::test() should be compatible with a::test($arg = c::TESTCONSTANT) in %s%ebug67436%eb.inc on line %d b::test() a::test(c::TESTCONSTANT) diff --git a/Zend/tests/bug67436/c.php b/Zend/tests/bug67436/c.inc similarity index 100% rename from Zend/tests/bug67436/c.php rename to Zend/tests/bug67436/c.inc diff --git a/Zend/tests/constants/fixtures/folder1/fixture.inc b/Zend/tests/constants/fixtures/folder1/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder1/subfolder1/fixture.inc b/Zend/tests/constants/fixtures/folder1/subfolder1/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder1/subfolder2/fixture.inc b/Zend/tests/constants/fixtures/folder1/subfolder2/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder1/subfolder3/fixture.inc b/Zend/tests/constants/fixtures/folder1/subfolder3/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder1/subfolder4/fixture.inc b/Zend/tests/constants/fixtures/folder1/subfolder4/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder2/fixture.inc b/Zend/tests/constants/fixtures/folder2/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder2/subfolder1/fixture.inc b/Zend/tests/constants/fixtures/folder2/subfolder1/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder2/subfolder2/fixture.inc b/Zend/tests/constants/fixtures/folder2/subfolder2/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder2/subfolder3/fixture.inc b/Zend/tests/constants/fixtures/folder2/subfolder3/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder2/subfolder4/fixture.inc b/Zend/tests/constants/fixtures/folder2/subfolder4/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder3/fixture.inc b/Zend/tests/constants/fixtures/folder3/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder3/subfolder1/fixture.inc b/Zend/tests/constants/fixtures/folder3/subfolder1/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder3/subfolder2/fixture.inc b/Zend/tests/constants/fixtures/folder3/subfolder2/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder3/subfolder3/fixture.inc b/Zend/tests/constants/fixtures/folder3/subfolder3/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder3/subfolder4/fixture.inc b/Zend/tests/constants/fixtures/folder3/subfolder4/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder4/fixture.inc b/Zend/tests/constants/fixtures/folder4/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder4/subfolder1/fixture.inc b/Zend/tests/constants/fixtures/folder4/subfolder1/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder4/subfolder2/fixture.inc b/Zend/tests/constants/fixtures/folder4/subfolder2/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder4/subfolder3/fixture.inc b/Zend/tests/constants/fixtures/folder4/subfolder3/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/constants/fixtures/folder4/subfolder4/fixture.inc b/Zend/tests/constants/fixtures/folder4/subfolder4/fixture.inc old mode 100755 new mode 100644 diff --git a/Zend/tests/throwing_overloaded_compound_assign_op.phpt b/Zend/tests/throwing_overloaded_compound_assign_op.phpt new file mode 100644 index 00000000000..e6e79baf5dd --- /dev/null +++ b/Zend/tests/throwing_overloaded_compound_assign_op.phpt @@ -0,0 +1,44 @@ +--TEST-- +Exception in compound assign op should prevent call to overloaded object handlers +--FILE-- +$k = 42; + return 0; + } +} + +$test = new ArrayObject; +$test[0] = 42; +try { + $test[0] %= 0; +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +var_dump($test); + +$test2 = new Test; +try { + $test2->prop %= 0; +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +var_dump($test2); + +?> +--EXPECT-- +Modulo by zero +object(ArrayObject)#1 (1) { + ["storage":"ArrayObject":private]=> + array(1) { + [0]=> + int(42) + } +} +Modulo by zero +object(Test)#3 (1) { + ["prop"]=> + int(42) +} diff --git a/Zend/tests/use_const/includes/foo_bar.php b/Zend/tests/use_const/includes/foo_bar.inc similarity index 100% rename from Zend/tests/use_const/includes/foo_bar.php rename to Zend/tests/use_const/includes/foo_bar.inc diff --git a/Zend/tests/use_const/includes/foo_php_version.php b/Zend/tests/use_const/includes/foo_php_version.inc similarity index 100% rename from Zend/tests/use_const/includes/foo_php_version.php rename to Zend/tests/use_const/includes/foo_php_version.inc diff --git a/Zend/tests/use_const/includes/global_bar.php b/Zend/tests/use_const/includes/global_bar.inc similarity index 100% rename from Zend/tests/use_const/includes/global_bar.php rename to Zend/tests/use_const/includes/global_bar.inc diff --git a/Zend/tests/use_const/includes/global_baz.php b/Zend/tests/use_const/includes/global_baz.inc similarity index 100% rename from Zend/tests/use_const/includes/global_baz.php rename to Zend/tests/use_const/includes/global_baz.inc diff --git a/Zend/tests/use_const/no_global_fallback.phpt b/Zend/tests/use_const/no_global_fallback.phpt index 3adebd68f55..f9ee6055153 100644 --- a/Zend/tests/use_const/no_global_fallback.phpt +++ b/Zend/tests/use_const/no_global_fallback.phpt @@ -3,7 +3,7 @@ non-existent imported constants should not be looked up in the global table --FILE-- write_dimension(object, property, &res); + if (binary_op(&res, Z_ISREF_P(z) ? Z_REFVAL_P(z) : z, value) == SUCCESS) { + Z_OBJ_HT_P(object)->write_dimension(object, property, &res); + } if (z == &rv) { zval_ptr_dtor(&rv); } @@ -1538,8 +1539,9 @@ static zend_never_inline void zend_assign_op_overloaded_property(zval *object, z } ZVAL_COPY_VALUE(z, value); } - binary_op(&res, z, value); - Z_OBJ_HT(obj)->write_property(&obj, property, &res, cache_slot); + if (binary_op(&res, z, value) == SUCCESS) { + Z_OBJ_HT(obj)->write_property(&obj, property, &res, cache_slot); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), &res); } diff --git a/acinclude.m4 b/acinclude.m4 index 14dcb62b680..357cbcfb252 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -2471,12 +2471,12 @@ AC_DEFUN([PHP_SETUP_LIBXML], [ set $libxml_full_version IFS=$ac_IFS LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3` - if test "$LIBXML_VERSION" -ge "2006011"; then + if test "$LIBXML_VERSION" -ge "2007006"; then found_libxml=yes LIBXML_LIBS=`$XML2_CONFIG --libs` LIBXML_INCS=`$XML2_CONFIG --cflags` else - AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.]) + AC_MSG_ERROR([libxml2 version 2.7.6 or greater required.]) fi fi diff --git a/ext/dom/characterdata.c b/ext/dom/characterdata.c index 8965202c152..ccaaf20d272 100644 --- a/ext/dom/characterdata.c +++ b/ext/dom/characterdata.c @@ -210,19 +210,7 @@ PHP_FUNCTION(dom_characterdata_append_data) } DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); -#if LIBXML_VERSION < 20627 -/* Implement logic from libxml xmlTextConcat to add support for comments and PI */ - if ((nodep->content == (xmlChar *) &(nodep->properties)) || - ((nodep->doc != NULL) && (nodep->doc->dict != NULL) && - xmlDictOwns(nodep->doc->dict, nodep->content))) { - nodep->content = xmlStrncatNew(nodep->content, arg, arg_len); - } else { - nodep->content = xmlStrncat(nodep->content, arg, arg_len); - } - nodep->properties = NULL; -#else xmlTextConcat(nodep, (xmlChar *) arg, arg_len); -#endif RETURN_TRUE; } /* }}} end dom_characterdata_append_data */ diff --git a/ext/dom/document.c b/ext/dom/document.c index 9f9ce5e2f8f..201ce6d4b82 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1858,11 +1858,9 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type RETURN_FALSE; } -#if LIBXML_VERSION >= 20614 if (flags & XML_SCHEMA_VAL_VC_I_CREATE) { valid_opts |= XML_SCHEMA_VAL_VC_I_CREATE; } -#endif xmlSchemaSetValidOptions(vptr, valid_opts); xmlSchemaSetValidErrors(vptr, php_libxml_error_handler, php_libxml_error_handler, vptr); @@ -2213,11 +2211,7 @@ PHP_FUNCTION(dom_document_save_html) xmlBufferFree(buf); } else { int size = 0; -#if LIBXML_VERSION >= 20623 htmlDocDumpMemoryFormat(docp, &mem, &size, format); -#else - htmlDocDumpMemory(docp, &mem, &size); -#endif if (!size || !mem) { RETVAL_FALSE; } else { diff --git a/ext/dom/tests/DOMDocument_loadXML_basic.phpt b/ext/dom/tests/DOMDocument_loadXML_basic.phpt index 569593c0075..cf25c26d622 100644 --- a/ext/dom/tests/DOMDocument_loadXML_basic.phpt +++ b/ext/dom/tests/DOMDocument_loadXML_basic.phpt @@ -17,5 +17,5 @@ XML_FILE=/book.xml LOAD_OPTIONS=0 EXPECTED_RESULT=1 --FILE_EXTERNAL-- -domdocumentloadxml_test_method.php +domdocumentloadxml_test_method.inc --EXPECT-- diff --git a/ext/dom/tests/DOMDocument_loadXML_error1.phpt b/ext/dom/tests/DOMDocument_loadXML_error1.phpt index 52d44ea291d..5a2f46e2200 100644 --- a/ext/dom/tests/DOMDocument_loadXML_error1.phpt +++ b/ext/dom/tests/DOMDocument_loadXML_error1.phpt @@ -17,7 +17,7 @@ XML_FILE=/not_well_formed.xml LOAD_OPTIONS=0 EXPECTED_RESULT=0 --FILE_EXTERNAL-- -domdocumentloadxml_test_method.php +domdocumentloadxml_test_method.inc --EXPECTF-- Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: title line 5 and book %s diff --git a/ext/dom/tests/DOMDocument_loadXML_error2.phpt b/ext/dom/tests/DOMDocument_loadXML_error2.phpt index 6ac4193dafd..3b8e2b48b16 100644 --- a/ext/dom/tests/DOMDocument_loadXML_error2.phpt +++ b/ext/dom/tests/DOMDocument_loadXML_error2.phpt @@ -17,7 +17,7 @@ XML_FILE=/not_well_formed2.xml LOAD_OPTIONS=0 EXPECTED_RESULT=0 --FILE_EXTERNAL-- -domdocumentloadxml_test_method.php +domdocumentloadxml_test_method.inc --EXPECTF-- Warning: DOMDocument::load%r(XML){0,1}%r(): AttValue: " or ' expected %s diff --git a/ext/dom/tests/DOMDocument_loadXML_error3.phpt b/ext/dom/tests/DOMDocument_loadXML_error3.phpt index 07f7ca77383..be37b5552b8 100644 --- a/ext/dom/tests/DOMDocument_loadXML_error3.phpt +++ b/ext/dom/tests/DOMDocument_loadXML_error3.phpt @@ -17,6 +17,6 @@ XML_FILE=/not_well_formed3.xml LOAD_OPTIONS=0 EXPECTED_RESULT=0 --FILE_EXTERNAL-- -domdocumentloadxml_test_method.php +domdocumentloadxml_test_method.inc --EXPECTF-- Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: boOk line 8 and book %s diff --git a/ext/dom/tests/DOMDocument_loadXML_error4.phpt b/ext/dom/tests/DOMDocument_loadXML_error4.phpt index 1854a34de4d..d2cc3c5dd22 100644 --- a/ext/dom/tests/DOMDocument_loadXML_error4.phpt +++ b/ext/dom/tests/DOMDocument_loadXML_error4.phpt @@ -12,12 +12,11 @@ Antonio Diaz Ruiz assert.bail=true --SKIPIF-- - --ENV-- XML_FILE=/not_well_formed4.xml LOAD_OPTIONS=0 EXPECTED_RESULT=0 --FILE_EXTERNAL-- -domdocumentloadxml_test_method.php +domdocumentloadxml_test_method.inc --EXPECTF-- Warning: DOMDocument::load%r(XML){0,1}%r(): Unsupported version '3.1' %s diff --git a/ext/dom/tests/DOMDocument_loadXML_error5.phpt b/ext/dom/tests/DOMDocument_loadXML_error5.phpt index a4aa1858f58..d5eaadb06d9 100644 --- a/ext/dom/tests/DOMDocument_loadXML_error5.phpt +++ b/ext/dom/tests/DOMDocument_loadXML_error5.phpt @@ -17,6 +17,6 @@ XML_FILE=/not_well_formed5.xml LOAD_OPTIONS=0 EXPECTED_RESULT=0 --FILE_EXTERNAL-- -domdocumentloadxml_test_method.php +domdocumentloadxml_test_method.inc --EXPECTF-- Warning: DOMDocument::load%r(XML){0,1}%r(): Extra content at the end of the document %s diff --git a/ext/dom/tests/DOMDocument_loadXML_variation1.phpt b/ext/dom/tests/DOMDocument_loadXML_variation1.phpt index 558137526f2..e3a3d94d3b7 100644 --- a/ext/dom/tests/DOMDocument_loadXML_variation1.phpt +++ b/ext/dom/tests/DOMDocument_loadXML_variation1.phpt @@ -17,5 +17,5 @@ XML_FILE=/book_with_dtd2.xml LOAD_OPTIONS=LIBXML_DTDLOAD EXPECTED_RESULT=1 --FILE_EXTERNAL-- -domdocumentloadxml_test_method.php +domdocumentloadxml_test_method.inc --EXPECT-- diff --git a/ext/dom/tests/DOMDocument_loadXML_variation2.phpt b/ext/dom/tests/DOMDocument_loadXML_variation2.phpt index 71f638efc14..9f9a5edc07f 100644 --- a/ext/dom/tests/DOMDocument_loadXML_variation2.phpt +++ b/ext/dom/tests/DOMDocument_loadXML_variation2.phpt @@ -17,6 +17,6 @@ XML_FILE=/wrong_book_with_dtd2.xml LOAD_OPTIONS=LIBXML_DTDVALID EXPECTED_RESULT=1 --FILE_EXTERNAL-- -domdocumentloadxml_test_method.php +domdocumentloadxml_test_method.inc --EXPECTF-- Warning: DOMDocument::load%r(XML){0,1}%r(): Element book content does not follow the DTD, expecting (title , author), got (title author author ) %s diff --git a/ext/dom/tests/DOMDocument_loadXML_variation3.phpt b/ext/dom/tests/DOMDocument_loadXML_variation3.phpt index 8e61ec4dbcc..e0186c802da 100644 --- a/ext/dom/tests/DOMDocument_loadXML_variation3.phpt +++ b/ext/dom/tests/DOMDocument_loadXML_variation3.phpt @@ -18,5 +18,5 @@ XML_FILE=/wrong_book_with_dtd.xml LOAD_OPTIONS=LIBXML_DTDVALID | LIBXML_NOERROR EXPECTED_RESULT=1 --FILE_EXTERNAL-- -domdocumentloadxml_test_method.php +domdocumentloadxml_test_method.inc --EXPECT-- diff --git a/ext/dom/tests/DOMDocument_loadXML_variation4.phpt b/ext/dom/tests/DOMDocument_loadXML_variation4.phpt index 4f1ea37c192..ab150636425 100644 --- a/ext/dom/tests/DOMDocument_loadXML_variation4.phpt +++ b/ext/dom/tests/DOMDocument_loadXML_variation4.phpt @@ -18,7 +18,7 @@ XML_FILE=/book_with_dtd2.xml LOAD_OPTIONS=LIBXML_DTDATTR|LIBXML_NOCDATA|LIBXML_NOENT|LIBXML_NOBLANKS EXPECTED_RESULT=1 --FILE_EXTERNAL-- -domdocumentloadxml_test_method_savexml.php +domdocumentloadxml_test_method_savexml.inc --EXPECT-- assert.bail=true --SKIPIF-- - --ENV-- XML_FILE=/not_well_formed4.xml LOAD_OPTIONS=0 EXPECTED_RESULT=0 --FILE_EXTERNAL-- -domdocumentload_test_method.php +domdocumentload_test_method.inc --EXPECTF-- Warning: DOMDocument::load%r(XML){0,1}%r(): Unsupported version '3.1' %s diff --git a/ext/dom/tests/DOMDocument_load_error5.phpt b/ext/dom/tests/DOMDocument_load_error5.phpt index a374f9474d1..e9b89cb0bf1 100644 --- a/ext/dom/tests/DOMDocument_load_error5.phpt +++ b/ext/dom/tests/DOMDocument_load_error5.phpt @@ -17,6 +17,6 @@ XML_FILE=/not_well_formed5.xml LOAD_OPTIONS=0 EXPECTED_RESULT=0 --FILE_EXTERNAL-- -domdocumentload_test_method.php +domdocumentload_test_method.inc --EXPECTF-- Warning: DOMDocument::load%r(XML){0,1}%r(): Extra content at the end of the document %s diff --git a/ext/dom/tests/DOMDocument_load_variation1.phpt b/ext/dom/tests/DOMDocument_load_variation1.phpt index b2b99e74c77..f03920155ac 100644 --- a/ext/dom/tests/DOMDocument_load_variation1.phpt +++ b/ext/dom/tests/DOMDocument_load_variation1.phpt @@ -17,5 +17,5 @@ XML_FILE=/book_with_dtd.xml LOAD_OPTIONS=LIBXML_DTDLOAD EXPECTED_RESULT=1 --FILE_EXTERNAL-- -domdocumentload_test_method.php +domdocumentload_test_method.inc --EXPECT-- diff --git a/ext/dom/tests/DOMDocument_load_variation2.phpt b/ext/dom/tests/DOMDocument_load_variation2.phpt index c8460e55eb2..53aed7315ee 100644 --- a/ext/dom/tests/DOMDocument_load_variation2.phpt +++ b/ext/dom/tests/DOMDocument_load_variation2.phpt @@ -17,6 +17,6 @@ XML_FILE=/wrong_book_with_dtd.xml LOAD_OPTIONS=LIBXML_DTDVALID EXPECTED_RESULT=1 --FILE_EXTERNAL-- -domdocumentload_test_method.php +domdocumentload_test_method.inc --EXPECTF-- Warning: DOMDocument::load%r(XML){0,1}%r(): Element book content does not follow the DTD, expecting (title , author), got (title author author ) %s diff --git a/ext/dom/tests/DOMDocument_load_variation3.phpt b/ext/dom/tests/DOMDocument_load_variation3.phpt index 77801d475e0..54d44b8263c 100644 --- a/ext/dom/tests/DOMDocument_load_variation3.phpt +++ b/ext/dom/tests/DOMDocument_load_variation3.phpt @@ -18,5 +18,5 @@ XML_FILE=/wrong_book_with_dtd.xml LOAD_OPTIONS=LIBXML_DTDVALID | LIBXML_NOERROR EXPECTED_RESULT=1 --FILE_EXTERNAL-- -domdocumentload_test_method.php +domdocumentload_test_method.inc --EXPECT-- diff --git a/ext/dom/tests/DOMDocument_load_variation4.phpt b/ext/dom/tests/DOMDocument_load_variation4.phpt index 3bf7ccc04d8..3c7194ac563 100644 --- a/ext/dom/tests/DOMDocument_load_variation4.phpt +++ b/ext/dom/tests/DOMDocument_load_variation4.phpt @@ -18,7 +18,7 @@ XML_FILE=/book_with_dtd.xml LOAD_OPTIONS=LIBXML_DTDATTR|LIBXML_NOCDATA|LIBXML_NOENT|LIBXML_NOBLANKS EXPECTED_RESULT=1 --FILE_EXTERNAL-- -domdocumentload_test_method_savexml.php +domdocumentload_test_method_savexml.inc --EXPECT-- diff --git a/ext/dom/tests/book-non-conforming-schema.xsd b/ext/dom/tests/book-non-conforming-schema.xsd old mode 100755 new mode 100644 diff --git a/ext/dom/tests/book-not-a-schema.xsd b/ext/dom/tests/book-not-a-schema.xsd old mode 100755 new mode 100644 diff --git a/ext/dom/tests/book.xsd b/ext/dom/tests/book.xsd old mode 100755 new mode 100644 diff --git a/ext/dom/tests/domdocumentload_test_method.php b/ext/dom/tests/domdocumentload_test_method.inc similarity index 81% rename from ext/dom/tests/domdocumentload_test_method.php rename to ext/dom/tests/domdocumentload_test_method.inc index a15c9e53be8..a643b428d1b 100644 --- a/ext/dom/tests/domdocumentload_test_method.php +++ b/ext/dom/tests/domdocumentload_test_method.inc @@ -1,5 +1,5 @@ 0;) { + for (out_size = (char_cnt - 2); out_size > 0;) { #if !ICONV_SUPPORTS_ERRNO size_t prev_out_left; #endif @@ -1418,7 +1418,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn break; } - out_size -= ((nbytes_required - (char_cnt - 2)) + 1) / 3; + out_size -= ((nbytes_required - (char_cnt - 2)) + 2) / 3; in_left = ini_in_left; in_p = ini_in_p; } diff --git a/ext/iconv/tests/bug53891.phpt b/ext/iconv/tests/bug53891.phpt index 86ae9a91497..342b48e3a22 100644 --- a/ext/iconv/tests/bug53891.phpt +++ b/ext/iconv/tests/bug53891.phpt @@ -5,18 +5,17 @@ Bug #53891 (iconv_mime_encode() fails to Q-encode UTF-8 string) if (!extension_loaded('iconv')) die('skip iconv extension not available'); ?> --FILE-- - 'Q', - 'input-charset' => 'utf-8', - 'output-charset' => 'utf-8', - 'line-length' => 74, - 'line-break-chars' => "\r\n", -); -var_dump(iconv_mime_encode('subject', "d obeybiubrsfqllpdtpge…", $preferences)); + 'Q', + 'input-charset' => 'utf-8', + 'output-charset' => 'utf-8', + 'line-length' => 74, + 'line-break-chars' => "\r\n", +); +var_dump(iconv_mime_encode('subject', "d obeybiubrsfqllpdtpge…", $preferences)); ?> ===DONE=== --EXPECT-- -string(81) "subject: =?utf-8?Q?d=20obeybiubrsfqllp?==?utf-8?Q?dtpge?= - =?utf-8?Q?=E2=80=A6?=" +string(54) "subject: =?utf-8?Q?d=20obeybiubrsfqllpdtpge=E2=80=A6?=" ===DONE=== diff --git a/ext/iconv/tests/bug66828.phpt b/ext/iconv/tests/bug66828.phpt new file mode 100644 index 00000000000..9914b41b14d --- /dev/null +++ b/ext/iconv/tests/bug66828.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #66828 (iconv_mime_encode Q-encoding longer than it should be) +--SKIPIF-- + +--FILE-- + "ISO-8859-1", + "output-charset" => "UTF-8", + "line-length" => 76, + "line-break-chars" => "\n", + "scheme" => "Q" +); +var_dump(iconv_mime_encode("Subject", "Test Test Test Test Test Test Test Test", $preferences)); +?> +===DONE=== +--EXPECT-- +string(74) "Subject: =?UTF-8?Q?Test=20Test=20Test=20Test=20Test=20Test=20Test=20Test?=" +===DONE=== diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index c12b9a1d9c9..589fc434421 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -805,20 +805,16 @@ static PHP_MINIT_FUNCTION(libxml) REGISTER_LONG_CONSTANT("LIBXML_NOCDATA", XML_PARSE_NOCDATA, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_NONET", XML_PARSE_NONET, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_PEDANTIC", XML_PARSE_PEDANTIC, CONST_CS | CONST_PERSISTENT); -#if LIBXML_VERSION >= 20621 REGISTER_LONG_CONSTANT("LIBXML_COMPACT", XML_PARSE_COMPACT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_NOXMLDECL", XML_SAVE_NO_DECL, CONST_CS | CONST_PERSISTENT); -#endif -#if LIBXML_VERSION >= 20703 REGISTER_LONG_CONSTANT("LIBXML_PARSEHUGE", XML_PARSE_HUGE, CONST_CS | CONST_PERSISTENT); -#endif #if LIBXML_VERSION >= 20900 REGISTER_LONG_CONSTANT("LIBXML_BIGLINES", XML_PARSE_BIG_LINES, CONST_CS | CONST_PERSISTENT); #endif REGISTER_LONG_CONSTANT("LIBXML_NOEMPTYTAG", LIBXML_SAVE_NOEMPTYTAG, CONST_CS | CONST_PERSISTENT); /* Schema validation options */ -#if defined(LIBXML_SCHEMAS_ENABLED) && LIBXML_VERSION >= 20614 +#if defined(LIBXML_SCHEMAS_ENABLED) REGISTER_LONG_CONSTANT("LIBXML_SCHEMA_CREATE", XML_SCHEMA_VAL_VC_I_CREATE, CONST_CS | CONST_PERSISTENT); #endif diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c index f3fab43f0c0..09ef8fa9a38 100644 --- a/ext/mysqlnd/mysqlnd_ps.c +++ b/ext/mysqlnd/mysqlnd_ps.c @@ -641,39 +641,6 @@ MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, const enum_my UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); if (stmt->result && stmt->state >= MYSQLND_STMT_PREPARED && stmt->field_count) { - /* - We don need to copy the data from the buffers which we will clean. - Because it has already been copied. See - #ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF - */ -#ifdef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF - if (stmt->result_bind && - stmt->result_zvals_separated_once == TRUE && - stmt->state >= MYSQLND_STMT_USER_FETCHING) - { - /* - We need to copy the data from the buffers which we will clean. - The bound variables point to them only if the user has started - to fetch data (MYSQLND_STMT_USER_FETCHING). - We need to check 'result_zvals_separated_once' or we will leak - in the following scenario - prepare("select 1 from dual"); - execute(); - fetch(); <-- no binding, but that's not a problem - bind_result(); - execute(); <-- here we will leak because we separate without need - */ - unsigned int i; - for (i = 0; i < stmt->field_count; i++) { - if (stmt->result_bind[i].bound == TRUE) { - zval *result = &stmt->result_bind[i].zv; - ZVAL_DEREF(result); - Z_TRY_ADDREF_P(result); - } - } - } -#endif - s->m->flush(s); /* @@ -798,28 +765,11 @@ mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, void * param, const unsign ZVAL_DEREF(result); /* Clean what we copied last time */ -#ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF zval_ptr_dtor(result); -#endif /* copy the type */ if (stmt->result_bind[i].bound == TRUE) { DBG_INF_FMT("i=%u type=%u", i, Z_TYPE(current_row[i])); - if (Z_TYPE(current_row[i]) != IS_NULL) { - /* - Copy the value. - Pre-condition is that the zvals in the result_bind buffer - have been ZVAL_NULL()-ed or to another simple type - (int, double, bool but not string). Because of the reference - counting the user can't delete the strings the variables point to. - */ - - ZVAL_COPY_VALUE(result, ¤t_row[i]); -#ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF - Z_TRY_ADDREF_P(result); -#endif - } else { - ZVAL_NULL(result); - } + ZVAL_COPY(result, ¤t_row[i]); } } } @@ -903,24 +853,15 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, const unsi zval *data = &result->unbuf->last_row_data[i]; zval *result = &stmt->result_bind[i].zv; - ZVAL_DEREF(result); - /* - stmt->result_bind[i].zv has been already destructed - in result->unbuf->m.free_last_data() - */ -#ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF - zval_ptr_dtor(result); -#endif - if (!Z_ISNULL_P(data)) { - if ((Z_TYPE_P(data) == IS_STRING) && (meta->fields[i].max_length < (zend_ulong) Z_STRLEN_P(data))){ - meta->fields[i].max_length = Z_STRLEN_P(data); - } - ZVAL_COPY_VALUE(result, data); - /* copied data, thus also the ownership. Thus null data */ - ZVAL_NULL(data); - } else { - ZVAL_NULL(result); + if (Z_TYPE_P(data) == IS_STRING && (meta->fields[i].max_length < (zend_ulong) Z_STRLEN_P(data))){ + meta->fields[i].max_length = Z_STRLEN_P(data); } + + ZVAL_DEREF(result); + zval_ptr_dtor(result); + ZVAL_COPY_VALUE(result, data); + /* copied data, thus also the ownership. Thus null data */ + ZVAL_NULL(data); } } MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_PS_UNBUF); @@ -1089,28 +1030,19 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, const unsigned zval *result = &stmt->result_bind[i].zv; ZVAL_DEREF(result); - /* - stmt->result_bind[i].zv has been already destructed - in result->unbuf->m.free_last_data() - */ -#ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF zval_ptr_dtor(result); -#endif DBG_INF_FMT("i=%u bound_var=%p type=%u refc=%u", i, &stmt->result_bind[i].zv, Z_TYPE_P(data), Z_REFCOUNTED(stmt->result_bind[i].zv)? Z_REFCOUNT(stmt->result_bind[i].zv) : 0); - if (!Z_ISNULL_P(data)) { - if ((Z_TYPE_P(data) == IS_STRING) && - (meta->fields[i].max_length < (zend_ulong) Z_STRLEN_P(data))) { - meta->fields[i].max_length = Z_STRLEN_P(data); - } - ZVAL_COPY_VALUE(result, data); - /* copied data, thus also the ownership. Thus null data */ - ZVAL_NULL(data); - } else { - ZVAL_NULL(result); + if (Z_TYPE_P(data) == IS_STRING && + (meta->fields[i].max_length < (zend_ulong) Z_STRLEN_P(data))) { + meta->fields[i].max_length = Z_STRLEN_P(data); } + + ZVAL_COPY_VALUE(result, data); + /* copied data, thus also the ownership. Thus null data */ + ZVAL_NULL(data); } } } else { diff --git a/ext/oci8/LICENSE b/ext/oci8/LICENSE index 49c344f0936..5a3770885f1 100644 --- a/ext/oci8/LICENSE +++ b/ext/oci8/LICENSE @@ -1,7 +1,7 @@ --------------------------------------------------------------------- +-------------------------------------------------------------------- The PHP License, version 3.01 Copyright (c) 1999 - 2018 The PHP Group. All rights reserved. --------------------------------------------------------------------- +-------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, is permitted provided that the following conditions @@ -9,22 +9,22 @@ are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + 3. The name "PHP" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact group@php.net. - + 4. Products derived from this software may not be called "PHP", nor may "PHP" appear in their name, without prior written permission from group@php.net. You may indicate that your software works in conjunction with PHP by saying "Foo for PHP" instead of calling it "PHP Foo" or "phpfoo" - + 5. The PHP Group may publish revised and/or new versions of the license from time to time. Each version will be given a distinguishing version number. @@ -41,27 +41,27 @@ are met: "This product includes PHP software, freely available from ". -THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP -DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------- +-------------------------------------------------------------------- This software consists of voluntary contributions made by many individuals on behalf of the PHP Group. The PHP Group can be contacted via Email at group@php.net. -For more information on the PHP Group and the PHP project, +For more information on the PHP Group and the PHP project, please see . PHP includes the Zend Engine, freely available at diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 74c72d7bd98..aac2484d3e9 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -1454,8 +1454,13 @@ void php_oci_column_hash_dtor(zval *data) if (column->descid) { if (GC_REFCOUNT(column->descid) == 1) zend_list_close(column->descid); - else + else { +#if PHP_VERSION_ID < 70300 + GC_REFCOUNT(column->descid)--; +#else GC_DELREF(column->descid); +#endif + } } if (column->data) { @@ -1783,12 +1788,12 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char timestamp = time(NULL); smart_str_append_unsigned_ex(&hashed_details, session_mode, 0); - smart_str_0(&hashed_details); - if (persistent) { smart_str_appendl_ex(&hashed_details, "pc", sizeof("pc") - 1, 0); } + smart_str_0(&hashed_details); + /* make it lowercase */ php_strtolower(ZSTR_VAL(hashed_details.s), ZSTR_LEN(hashed_details.s)); @@ -1877,7 +1882,11 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char (memcmp(ZSTR_VAL(tmp->hash_key), ZSTR_VAL(hashed_details.s), ZSTR_LEN(tmp->hash_key)) == 0)) { connection = tmp; +#if PHP_VERSION_ID < 70300 + ++GC_REFCOUNT(connection->id); +#else GC_ADDREF(connection->id); +#endif } } else { PHP_OCI_REGISTER_RESOURCE(connection, le_pconnection); @@ -1887,7 +1896,11 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char * decremented in the persistent helper */ if (OCI_G(old_oci_close_semantics)) { +#if PHP_VERSION_ID < 70300 + ++GC_REFCOUNT(connection->id); +#else GC_ADDREF(connection->id); +#endif } } smart_str_free(&hashed_details); @@ -1898,7 +1911,11 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char } else { /* we do not ping non-persistent connections */ smart_str_free(&hashed_details); +#if PHP_VERSION_ID < 70300 + ++GC_REFCOUNT(connection->id); +#else GC_ADDREF(connection->id); +#endif return connection; } } /* is_open is true? */ @@ -2052,7 +2069,11 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char * refcount is decremented in the persistent helper */ if (OCI_G(old_oci_close_semantics)) { +#if PHP_VERSION_ID < 70300 + ++GC_REFCOUNT(connection->id); +#else GC_ADDREF(connection->id); +#endif } #if PHP_VERSION_ID < 70300 zend_hash_update_mem(&EG(persistent_list), connection->hash_key, (void *)&new_le, sizeof(zend_resource)); @@ -2453,7 +2474,11 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode) if (column->is_cursor) { /* REFCURSOR -> simply return the statement id */ ZVAL_RES(value, column->stmtid); +#if PHP_VERSION_ID < 70300 + ++GC_REFCOUNT(column->stmtid); +#else GC_ADDREF(column->stmtid); +#endif } else if (column->is_descr) { if (column->data_type != SQLT_RDD) { @@ -2497,7 +2522,11 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode) /* return the locator */ object_init_ex(value, oci_lob_class_entry_ptr); add_property_resource(value, "descriptor", column->descid); +#if PHP_VERSION_ID < 70300 + ++GC_REFCOUNT(column->descid); +#else GC_ADDREF(column->descid); +#endif } } else { switch (column->retcode) { diff --git a/ext/oci8/oci8_collection.c b/ext/oci8/oci8_collection.c index 0837761a4f7..7ddda06bb28 100644 --- a/ext/oci8/oci8_collection.c +++ b/ext/oci8/oci8_collection.c @@ -52,7 +52,11 @@ php_oci_collection *php_oci_collection_create(php_oci_connection *connection, ch collection->connection = connection; collection->collection = NULL; +#if PHP_VERSION_ID < 70300 + ++GC_REFCOUNT(collection->connection->id); +#else GC_ADDREF(collection->connection->id); +#endif /* get type handle by name */ PHP_OCI_CALL_RETURN(errstatus, OCITypeByName, diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index ceeaefeb778..82cb30bfbfe 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -60,16 +60,28 @@ PHP_FUNCTION(oci_register_taf_callback) if (!zend_is_callable(callback, 0, 0)) { callback_name = zend_get_callable_name(callback); php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(callback_name)); +#if PHP_VERSION_ID < 70300 + zend_string_release(callback_name); +#else zend_string_release_ex(callback_name, 0); +#endif RETURN_FALSE; } #else if (!zend_is_callable(callback, 0, &callback_name)) { php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(callback_name)); +#if PHP_VERSION_ID < 70300 + zend_string_release(callback_name); +#else zend_string_release_ex(callback_name, 0); +#endif RETURN_FALSE; } +#if PHP_VERSION_ID < 70300 + zend_string_release(callback_name); +#else zend_string_release_ex(callback_name, 0); +#endif #endif } @@ -141,10 +153,18 @@ PHP_FUNCTION(oci_define_by_name) /* if (zend_hash_add(statement->defines, name, name_len, define, sizeof(php_oci_define), (void **)&tmp_define) == SUCCESS) { */ zvtmp = zend_string_init(name, name_len, 0); if ((define = zend_hash_add_new_ptr(statement->defines, zvtmp, define)) != NULL) { +#if PHP_VERSION_ID < 70300 + zend_string_release(zvtmp); +#else zend_string_release_ex(zvtmp, 0); +#endif } else { efree(define); +#if PHP_VERSION_ID < 70300 + zend_string_release(zvtmp); +#else zend_string_release_ex(zvtmp, 0); +#endif RETURN_FALSE; } @@ -1472,7 +1492,11 @@ PHP_FUNCTION(oci_fetch_all) zend_string *zvtmp; zvtmp = zend_string_init(columns[ i ]->name, columns[ i ]->name_len, 0); zend_symtable_update(Z_ARRVAL(row), zvtmp, &element); +#if PHP_VERSION_ID < 70300 + zend_string_release(zvtmp); +#else zend_string_release_ex(zvtmp, 0); +#endif } } @@ -1507,7 +1531,11 @@ PHP_FUNCTION(oci_fetch_all) array_init(&tmp); zvtmp = zend_string_init(columns[ i ]->name, columns[ i ]->name_len, 0); outarrs[ i ] = zend_symtable_update(Z_ARRVAL_P(array), zvtmp, &tmp); +#if PHP_VERSION_ID < 70300 + zend_string_release(zvtmp); +#else zend_string_release_ex(zvtmp, 0); +#endif } } diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c index 7320bca899a..1a443899513 100644 --- a/ext/oci8/oci8_lob.c +++ b/ext/oci8/oci8_lob.c @@ -67,7 +67,11 @@ php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, zend_lon descriptor = ecalloc(1, sizeof(php_oci_descriptor)); descriptor->type = (ub4) type; descriptor->connection = connection; +#if PHP_VERSION_ID < 70300 + ++GC_REFCOUNT(descriptor->connection->id); +#else GC_ADDREF(descriptor->connection->id); +#endif PHP_OCI_CALL_RETURN(errstatus, OCIDescriptorAlloc, (connection->env, (dvoid*)&(descriptor->descriptor), descriptor->type, (size_t) 0, (dvoid **) 0)); diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index 469930fbb44..31b5a48cb8e 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -111,7 +111,11 @@ php_oci_statement *php_oci_statement_create(php_oci_connection *connection, char statement->impres_child_stmt = NULL; statement->impres_count = 0; statement->impres_flag = PHP_OCI_IMPRES_UNKNOWN; /* may or may not have Implicit Result Set children */ +#if PHP_VERSION_ID < 70300 + ++GC_REFCOUNT(statement->connection->id); +#else GC_ADDREF(statement->connection->id); +#endif if (OCI_G(default_prefetch) >= 0) { php_oci_statement_set_prefetch(statement, (ub4)OCI_G(default_prefetch)); @@ -171,8 +175,13 @@ php_oci_statement *php_oci_get_implicit_resultset(php_oci_statement *statement) statement2->has_descr = 0; statement2->stmttype = 0; +#if PHP_VERSION_ID < 70300 + GC_REFCOUNT(statement->id)++; + GC_REFCOUNT(statement2->connection->id)++; +#else GC_ADDREF(statement->id); GC_ADDREF(statement2->connection->id); +#endif php_oci_statement_set_prefetch(statement2, statement->prefetch_count); @@ -433,7 +442,11 @@ sb4 php_oci_define_callback(dvoid *ctx, OCIDefine *define, ub4 iter, dvoid **buf return OCI_ERROR; } nested_stmt->parent_stmtid = outcol->statement->id; +#if PHP_VERSION_ID < 70300 + ++GC_REFCOUNT(outcol->statement->id); +#else GC_ADDREF(outcol->statement->id); +#endif outcol->nested_statement = nested_stmt; outcol->stmtid = nested_stmt->id; @@ -595,7 +608,15 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode) for (counter = 1; counter <= colcount; counter++) { outcol = (php_oci_out_column *) ecalloc(1, sizeof(php_oci_out_column)); +#if PHP_VERSION_ID < 70300 + if ((outcol = zend_hash_index_update_ptr(statement->columns, counter, outcol)) == NULL) { + FREE_HASHTABLE(statement->columns); + /* out of memory */ + return 1; + } +#else outcol = zend_hash_index_update_ptr(statement->columns, counter, outcol); +#endif /* get column */ PHP_OCI_CALL_RETURN(errstatus, OCIParamGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, statement->err, (dvoid**)¶m, counter)); @@ -989,7 +1010,12 @@ int php_oci_bind_post_exec(zval *data) * binds, php_oci_bind_out_callback() should have allocated a * new string that we can modify here. */ +#if PHP_VERSION_ID < 70300 + SEPARATE_STRING(zv); + Z_STR_P(zv) = zend_string_extend(Z_STR_P(zv), Z_STRLEN_P(zv)+1, 0); +#else ZVAL_NEW_STR(zv, zend_string_extend(Z_STR_P(zv), Z_STRLEN_P(zv)+1, 0)); +#endif Z_STRVAL_P(zv)[ Z_STRLEN_P(zv) ] = '\0'; } else if (Z_TYPE_P(zv) == IS_ARRAY) { int i; @@ -1252,7 +1278,11 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l zvtmp = zend_string_init(name, name_len, 0); bindp = (php_oci_bind *) ecalloc(1, sizeof(php_oci_bind)); bindp = zend_hash_update_ptr(statement->binds, zvtmp, bindp); +#if PHP_VERSION_ID < 70300 + zend_string_release(zvtmp); +#else zend_string_release_ex(zvtmp, 0); +#endif } /* Make sure the minimum of value_sz is 1 to avoid ORA-3149 @@ -1523,6 +1553,20 @@ php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME return NULL; } } else { +#if PHP_VERSION_ID < 70300 + zval tmp; + /* NB: for PHP4 compat only, it should be using 'Z' instead */ + tmp = *column_index; + zval_copy_ctor(&tmp); + convert_to_long(&tmp); + column = php_oci_statement_get_column(statement, Z_LVAL(tmp), NULL, 0); + if (!column) { + php_error_docref(NULL, E_WARNING, "Invalid column index \"" ZEND_LONG_FMT "\"", Z_LVAL(tmp)); + zval_ptr_dtor(&tmp); + return NULL; + } + zval_ptr_dtor(&tmp); +#else zend_long tmp; /* NB: for PHP4 compat only, it should be using 'Z' instead */ @@ -1532,6 +1576,7 @@ php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME php_error_docref(NULL, E_WARNING, "Invalid column index \"" ZEND_LONG_FMT "\"", tmp); return NULL; } +#endif } return column; } @@ -1594,8 +1639,13 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t ZEND_ASSERT(Z_ISREF_P(var)); val = Z_REFVAL_P(var); +#if PHP_VERSION_ID < 70300 + SEPARATE_ZVAL_NOREF(val); + convert_to_array(val); +#else convert_to_array(val); SEPARATE_ARRAY(val); +#endif if (maxlength < -1) { php_error_docref(NULL, E_WARNING, "Invalid max length value (" ZEND_LONG_FMT ")", maxlength); @@ -1698,7 +1748,11 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t zvtmp = zend_string_init(name, name_len, 0); zend_hash_update_ptr(statement->binds, zvtmp, bind); +#if PHP_VERSION_ID < 70300 + zend_string_release(zvtmp); +#else zend_string_release_ex(zvtmp, 0); +#endif statement->errcode = 0; /* retain backwards compat with OCI8 1.4 */ return 0; diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml index 45e6eb5b173..07a56800bb1 100644 --- a/ext/oci8/package.xml +++ b/ext/oci8/package.xml @@ -508,7 +508,7 @@ Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge) - + 2.1.5 2.1.5 @@ -520,9 +520,9 @@ Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge) PHP This version is for PHP 7 only. -Added TAF callback support (PR #2459, KoenigsKind) +Added TAF callback support (PR #2459, KoenigsKind) - + @@ -555,7 +555,7 @@ This version is for PHP 7 only. Fixed bug #71148 (Bind reference overwritten on PHP 7) - + 2.1.2 @@ -588,7 +588,7 @@ This version is for PHP 7 only. Fixed bug #71600 (oci_fetch_all segfaults when selecting more than 8 columns) - + 2.1.0 @@ -601,7 +601,7 @@ Fixed bug #71600 (oci_fetch_all segfaults when selecting more than 8 columns) PHP This version is for PHP 7 only. -Updated driver name format. +Updated driver name format. @@ -661,7 +661,7 @@ Enhancement - Improve performance of multi-row OCI_RETURN_LOB queries (Bug #6687 PHP -Added oci_bind_by_name() support for PL/SQL BOOLEAN type +Added oci_bind_by_name() support for PL/SQL BOOLEAN type Build change: Fix source variable definition for C89 compatibility @@ -763,7 +763,7 @@ Add the connection handle to several DTrace probes. devel PHP - + Fixed --enable-maintainer-zts mode. Allow Implicit Result Set statement resources to inherit the parent's current prefetch count. Allow OCI8 to be DTrace-enabled independently from core PHP. @@ -781,7 +781,7 @@ Require OCI8 to be configured 'shared' when enabling DTrace support. devel PHP - + - NEW FUNCTIONALITY: - Added Implicit Result Set support for Oracle Database 12c. @@ -844,7 +844,7 @@ Require OCI8 to be configured 'shared' when enabling DTrace support. - Regularized code prototypes and fixed some in-line documentation prototypes. - - Fixed code folding. + - Fixed code folding. diff --git a/ext/oci8/tests/array_bind_001.phpt b/ext/oci8/tests/array_bind_001.phpt index 0c1644152c2..15a86477794 100644 --- a/ext/oci8/tests/array_bind_001.phpt +++ b/ext/oci8/tests/array_bind_001.phpt @@ -1,5 +1,5 @@ --TEST-- -oci_bind_array_by_name() and invalid values 1 +oci_bind_array_by_name() and invalid values 1 --SKIPIF-- --FILE-- @@ -16,15 +16,15 @@ $statement = oci_parse($c, $create); oci_execute($statement); $create_pkg = " -CREATE OR REPLACE PACKAGE ARRAY_BIND_001_PKG AS - TYPE ARRTYPE IS TABLE OF DATE INDEX BY BINARY_INTEGER; - PROCEDURE iobind(c1 IN OUT ARRTYPE); +CREATE OR REPLACE PACKAGE ARRAY_BIND_001_PKG AS + TYPE ARRTYPE IS TABLE OF DATE INDEX BY BINARY_INTEGER; + PROCEDURE iobind(c1 IN OUT ARRTYPE); END ARRAY_BIND_001_PKG;"; $statement = oci_parse($c, $create_pkg); oci_execute($statement); $create_pkg_body = " -CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_001_PKG AS +CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_001_PKG AS CURSOR CUR IS SELECT name FROM bind_test; PROCEDURE iobind(c1 IN OUT ARRTYPE) IS BEGIN @@ -58,7 +58,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): OCI-21560: argument 3 is null, invalid, or out of range in %s on line %d Warning: oci_execute(): ORA-%r(01008|57000)%r: %s in %s on line %d diff --git a/ext/oci8/tests/array_bind_002.phpt b/ext/oci8/tests/array_bind_002.phpt index d2b520c78eb..2bf39b58658 100644 --- a/ext/oci8/tests/array_bind_002.phpt +++ b/ext/oci8/tests/array_bind_002.phpt @@ -16,15 +16,15 @@ $statement = oci_parse($c, $create); oci_execute($statement); $create_pkg = " -CREATE OR REPLACE PACKAGE ARRAY_BIND_002_PKG AS - TYPE ARRTYPE IS TABLE OF DATE INDEX BY BINARY_INTEGER; - PROCEDURE iobind(c1 IN OUT ARRTYPE); +CREATE OR REPLACE PACKAGE ARRAY_BIND_002_PKG AS + TYPE ARRTYPE IS TABLE OF DATE INDEX BY BINARY_INTEGER; + PROCEDURE iobind(c1 IN OUT ARRTYPE); END ARRAY_BIND_002_PKG;"; $statement = oci_parse($c, $create_pkg); oci_execute($statement); $create_pkg_body = " -CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_002_PKG AS +CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_002_PKG AS CURSOR CUR IS SELECT name FROM bind_test; PROCEDURE iobind(c1 IN OUT ARRTYPE) IS BEGIN @@ -58,7 +58,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): Maximum array length must be greater than zero in %s on line %d Warning: oci_execute(): ORA-%r(01008|57000)%r: %s in %s on line %d diff --git a/ext/oci8/tests/array_bind_003.phpt b/ext/oci8/tests/array_bind_003.phpt index bd391db93f1..0979f4340f0 100644 --- a/ext/oci8/tests/array_bind_003.phpt +++ b/ext/oci8/tests/array_bind_003.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name() and invalid values 3 true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECTF-- +--EXPECTF-- Warning: oci_execute(): ORA-01403: %s ORA-06512: at "%s.ARRAY_BIND_003_PKG", line %d ORA-06512: at line %d in %sarray_bind_003.php on line %d diff --git a/ext/oci8/tests/array_bind_004.phpt b/ext/oci8/tests/array_bind_004.phpt index 7373903b6fb..d9dfb01548e 100644 --- a/ext/oci8/tests/array_bind_004.phpt +++ b/ext/oci8/tests/array_bind_004.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name() and invalid values 4 true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECTF-- +--EXPECTF-- Warning: oci_execute(): ORA-01403: %s ORA-06512: at "%s.ARRAY_BIND_004_PKG", line %d ORA-06512: at line %d in %sarray_bind_004.php on line %d diff --git a/ext/oci8/tests/array_bind_005.phpt b/ext/oci8/tests/array_bind_005.phpt index c1d7c21b193..b9a8b8c8203 100644 --- a/ext/oci8/tests/array_bind_005.phpt +++ b/ext/oci8/tests/array_bind_005.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name() and invalid values 5 true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(0) "" diff --git a/ext/oci8/tests/array_bind_006.phpt b/ext/oci8/tests/array_bind_006.phpt index cc24c2bd809..56db1aea619 100644 --- a/ext/oci8/tests/array_bind_006.phpt +++ b/ext/oci8/tests/array_bind_006.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name(), SQLT_CHR and default max_length true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(4) "five" diff --git a/ext/oci8/tests/array_bind_007.phpt b/ext/oci8/tests/array_bind_007.phpt index 6c9101b685d..7cde333aadd 100644 --- a/ext/oci8/tests/array_bind_007.phpt +++ b/ext/oci8/tests/array_bind_007.phpt @@ -16,15 +16,15 @@ $statement = oci_parse($c, $create); oci_execute($statement); $create_pkg = " -CREATE OR REPLACE PACKAGE ARRAY_BIND_007_PKG AS - TYPE ARRTYPE IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; - PROCEDURE iobind(c1 IN OUT ARRTYPE); +CREATE OR REPLACE PACKAGE ARRAY_BIND_007_PKG AS + TYPE ARRTYPE IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; + PROCEDURE iobind(c1 IN OUT ARRTYPE); END ARRAY_BIND_007_PKG;"; $statement = oci_parse($c, $create_pkg); oci_execute($statement); $create_pkg_body = " -CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_007_PKG AS +CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_007_PKG AS CURSOR CUR IS SELECT name FROM bind_test; PROCEDURE iobind(c1 IN OUT ARRTYPE) IS BEGIN @@ -58,7 +58,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: -1 in %s on line %d Warning: oci_execute(): ORA-%r(01008|57000)%r: %s in %s on line %d diff --git a/ext/oci8/tests/array_bind_008.phpt b/ext/oci8/tests/array_bind_008.phpt index 393316c22b4..5b1975cd184 100644 --- a/ext/oci8/tests/array_bind_008.phpt +++ b/ext/oci8/tests/array_bind_008.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name() and invalid values 8 true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECTF-- +--EXPECTF-- Warning: oci_execute(): ORA-06550: line %d, column %d: PLS-00418: %s ORA-06550: %s diff --git a/ext/oci8/tests/array_bind_009.phpt b/ext/oci8/tests/array_bind_009.phpt index 8e83b0982c4..64b2e8cded2 100644 --- a/ext/oci8/tests/array_bind_009.phpt +++ b/ext/oci8/tests/array_bind_009.phpt @@ -11,7 +11,7 @@ var_dump(oci_bind_array_by_name($c, ":c1", $array, 5, 5, SQLT_CHR)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): supplied resource is not a valid oci8 statement resource in %s on line %d bool(false) Done diff --git a/ext/oci8/tests/array_bind_010.phpt b/ext/oci8/tests/array_bind_010.phpt index ede82c97fce..b5ba85938c5 100644 --- a/ext/oci8/tests/array_bind_010.phpt +++ b/ext/oci8/tests/array_bind_010.phpt @@ -19,7 +19,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): ORA-01036: illegal variable name/number in %s on line %d array(5) { [0]=> diff --git a/ext/oci8/tests/array_bind_011.phpt b/ext/oci8/tests/array_bind_011.phpt index 4c27bd06e21..164821c221a 100644 --- a/ext/oci8/tests/array_bind_011.phpt +++ b/ext/oci8/tests/array_bind_011.phpt @@ -16,15 +16,15 @@ $statement = oci_parse($c, $create); oci_execute($statement); $create_pkg = " -CREATE OR REPLACE PACKAGE ARRAY_BIND_011_PKG AS - TYPE ARRTYPE IS TABLE OF VARCHAR(20) INDEX BY BINARY_INTEGER; - PROCEDURE iobind(c1 IN OUT ARRTYPE); +CREATE OR REPLACE PACKAGE ARRAY_BIND_011_PKG AS + TYPE ARRTYPE IS TABLE OF VARCHAR(20) INDEX BY BINARY_INTEGER; + PROCEDURE iobind(c1 IN OUT ARRTYPE); END ARRAY_BIND_011_PKG;"; $statement = oci_parse($c, $create_pkg); oci_execute($statement); $create_pkg_body = " -CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_011_PKG AS +CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_011_PKG AS CURSOR CUR IS SELECT name FROM bind_test; PROCEDURE iobind(c1 IN OUT ARRTYPE) IS BEGIN @@ -58,7 +58,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): You must provide max length value for empty arrays in %s on line %d Warning: oci_execute(): ORA-%r(01008|57000)%r: %s in %s on line %d diff --git a/ext/oci8/tests/array_bind_012.phpt b/ext/oci8/tests/array_bind_012.phpt index 38e1701a4b8..e2b74a9ce98 100644 --- a/ext/oci8/tests/array_bind_012.phpt +++ b/ext/oci8/tests/array_bind_012.phpt @@ -19,7 +19,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): Invalid max length value (-10) in %s on line %d array(0) { } diff --git a/ext/oci8/tests/array_bind_013.phpt b/ext/oci8/tests/array_bind_013.phpt index 4da9d8bbed8..44d4bd1e6de 100644 --- a/ext/oci8/tests/array_bind_013.phpt +++ b/ext/oci8/tests/array_bind_013.phpt @@ -22,7 +22,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name() expects at most 6 parameters, 7 given in %s on line %d NULL diff --git a/ext/oci8/tests/array_bind_014.phpt b/ext/oci8/tests/array_bind_014.phpt index fe73d0e7974..51224bc3e07 100644 --- a/ext/oci8/tests/array_bind_014.phpt +++ b/ext/oci8/tests/array_bind_014.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name() and NUMBERs true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- array(5) { [0]=> int(5) diff --git a/ext/oci8/tests/array_bind_bdouble.phpt b/ext/oci8/tests/array_bind_bdouble.phpt index ba8ffe978e4..d3f34903566 100644 --- a/ext/oci8/tests/array_bind_bdouble.phpt +++ b/ext/oci8/tests/array_bind_bdouble.phpt @@ -5,7 +5,7 @@ Unsupported type: oci_bind_array_by_name() and SQLT_BDOUBLE $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (!defined('SQLT_BDOUBLE')) die('skip SQLT_BDOUBLE type not available on older Oracle clients'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (!defined('SQLT_BFLOAT')) die('skip SQLT_BFLOAT type not available on older Oracle clients'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(9) "05-NOV-05" diff --git a/ext/oci8/tests/array_bind_date1.phpt b/ext/oci8/tests/array_bind_date1.phpt index d8ecdb5a406..c0228539a19 100644 --- a/ext/oci8/tests/array_bind_date1.phpt +++ b/ext/oci8/tests/array_bind_date1.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name() and SQLT_ODT true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(9) "05-NOV-05" diff --git a/ext/oci8/tests/array_bind_float.phpt b/ext/oci8/tests/array_bind_float.phpt index b35ca3de0ee..dbd1437696b 100644 --- a/ext/oci8/tests/array_bind_float.phpt +++ b/ext/oci8/tests/array_bind_float.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name() and SQLT_FLT true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- array(5) { [0]=> float(5.9999) diff --git a/ext/oci8/tests/array_bind_float1.phpt b/ext/oci8/tests/array_bind_float1.phpt index 7f755aa8469..c342c0eb58f 100644 --- a/ext/oci8/tests/array_bind_float1.phpt +++ b/ext/oci8/tests/array_bind_float1.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name() and SQLT_FLT true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- array(5) { [0]=> float(5.9999) diff --git a/ext/oci8/tests/array_bind_int.phpt b/ext/oci8/tests/array_bind_int.phpt index e4fc6676d0c..19fa3bf2ac1 100644 --- a/ext/oci8/tests/array_bind_int.phpt +++ b/ext/oci8/tests/array_bind_int.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name() and SQLT_INT true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- array(5) { [0]=> int(5) diff --git a/ext/oci8/tests/array_bind_int1.phpt b/ext/oci8/tests/array_bind_int1.phpt index 6590e2fb3f6..b730cb2f204 100644 --- a/ext/oci8/tests/array_bind_int1.phpt +++ b/ext/oci8/tests/array_bind_int1.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name() and SQLT_INT true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- array(5) { [0]=> int(5) diff --git a/ext/oci8/tests/array_bind_str.phpt b/ext/oci8/tests/array_bind_str.phpt index 84bcb487509..70c148afcf3 100644 --- a/ext/oci8/tests/array_bind_str.phpt +++ b/ext/oci8/tests/array_bind_str.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name() and SQLT_CHR true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(4) "five" diff --git a/ext/oci8/tests/array_bind_str1.phpt b/ext/oci8/tests/array_bind_str1.phpt index ab35ad79bdb..aabed16d4fb 100644 --- a/ext/oci8/tests/array_bind_str1.phpt +++ b/ext/oci8/tests/array_bind_str1.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name() and SQLT_CHR true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(4) "five" diff --git a/ext/oci8/tests/array_bind_uin.phpt b/ext/oci8/tests/array_bind_uin.phpt index 0b9e982590c..2542ee27dfc 100644 --- a/ext/oci8/tests/array_bind_uin.phpt +++ b/ext/oci8/tests/array_bind_uin.phpt @@ -4,7 +4,7 @@ Unsupported type: oci_bind_array_by_name() and SQLT_UIN true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- = 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> @@ -46,7 +46,7 @@ var_dump($b); echo "Test 3\n"; -$sql = +$sql = "begin if (:input < 10) then :output := true; @@ -64,7 +64,7 @@ for ($input = 5; $input < 15; ++$input) { echo "Test 4\n"; -$sql = +$sql = "begin if (mod(:userid,2) = 0) then :b := true; @@ -82,7 +82,7 @@ for ($userid = 1; $userid <= 10; ++$userid) { echo "Test 5\n"; -$sql = +$sql = "declare l boolean; begin diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt index bb368fc7da9..477bb1422f3 100644 --- a/ext/oci8/tests/bind_char_1.phpt +++ b/ext/oci8/tests/bind_char_1.phpt @@ -26,7 +26,7 @@ $stmtarray = array( "insert into bind_char_tab values (2, NULL, 'abc')", "insert into bind_char_tab values (3, NULL, 'abc ')" ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test @@ -196,7 +196,7 @@ function do_e_q($s) $stmtarray = array( "drop table bind_char_tab" ); - + oci8_test_sql_execute($c, $stmtarray); echo "Done\n"; diff --git a/ext/oci8/tests/bind_char_1_11gR1.phpt b/ext/oci8/tests/bind_char_1_11gR1.phpt index 5b22cdc8c4e..7a97213cad4 100644 --- a/ext/oci8/tests/bind_char_1_11gR1.phpt +++ b/ext/oci8/tests/bind_char_1_11gR1.phpt @@ -28,7 +28,7 @@ $stmtarray = array( "insert into bind_char_tab values (2, NULL, 'abc')", "insert into bind_char_tab values (3, NULL, 'abc ')" ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test @@ -198,7 +198,7 @@ function do_e_q($s) $stmtarray = array( "drop table bind_char_tab" ); - + oci8_test_sql_execute($c, $stmtarray); echo "Done\n"; diff --git a/ext/oci8/tests/bind_char_2.phpt b/ext/oci8/tests/bind_char_2.phpt index 57b0c610f1d..5ab03553b79 100644 --- a/ext/oci8/tests/bind_char_2.phpt +++ b/ext/oci8/tests/bind_char_2.phpt @@ -25,7 +25,7 @@ $stmtarray = array( "create table bind_char_tab (id number, c1 date)", "insert into bind_char_tab values (1, '2008-04-20')", ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test @@ -85,7 +85,7 @@ function do_e_q($s) $stmtarray = array( "drop table bind_char_tab" ); - + oci8_test_sql_execute($c, $stmtarray); echo "Done\n"; diff --git a/ext/oci8/tests/bind_char_2_11gR1.phpt b/ext/oci8/tests/bind_char_2_11gR1.phpt index 438885e12a6..00831111b6e 100644 --- a/ext/oci8/tests/bind_char_2_11gR1.phpt +++ b/ext/oci8/tests/bind_char_2_11gR1.phpt @@ -25,7 +25,7 @@ $stmtarray = array( "create table bind_char_tab (id number, c1 date)", "insert into bind_char_tab values (1, '2008-04-20')", ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test @@ -85,7 +85,7 @@ function do_e_q($s) $stmtarray = array( "drop table bind_char_tab" ); - + oci8_test_sql_execute($c, $stmtarray); echo "Done\n"; diff --git a/ext/oci8/tests/bind_char_3_11gR1.phpt b/ext/oci8/tests/bind_char_3_11gR1.phpt index e967767d6e8..3c3d3b36dc5 100644 --- a/ext/oci8/tests/bind_char_3_11gR1.phpt +++ b/ext/oci8/tests/bind_char_3_11gR1.phpt @@ -22,7 +22,7 @@ require(dirname(__FILE__).'/connect.inc'); $stmtarray = array( "create or replace function bind_char_3_fn(p1 char) return char as begin return p1; end;", ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test diff --git a/ext/oci8/tests/bind_char_4.phpt b/ext/oci8/tests/bind_char_4.phpt index 161f87440e6..60d7ac6c9f6 100644 --- a/ext/oci8/tests/bind_char_4.phpt +++ b/ext/oci8/tests/bind_char_4.phpt @@ -24,7 +24,7 @@ require(dirname(__FILE__).'/connect.inc'); $stmtarray = array( "create or replace function bind_char_3_fn(p1 varchar2) return varchar2 as begin return p1; end;", ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test diff --git a/ext/oci8/tests/bind_char_4_11gR1.phpt b/ext/oci8/tests/bind_char_4_11gR1.phpt index e3ea6c20c92..9bc0ddf428d 100644 --- a/ext/oci8/tests/bind_char_4_11gR1.phpt +++ b/ext/oci8/tests/bind_char_4_11gR1.phpt @@ -24,7 +24,7 @@ require(dirname(__FILE__).'/connect.inc'); $stmtarray = array( "create or replace function bind_char_3_fn(p1 varchar2) return varchar2 as begin return p1; end;", ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test diff --git a/ext/oci8/tests/bind_long.phpt b/ext/oci8/tests/bind_long.phpt index cbd83128cb7..ca19e7edfd2 100644 --- a/ext/oci8/tests/bind_long.phpt +++ b/ext/oci8/tests/bind_long.phpt @@ -4,7 +4,7 @@ bind LONG field true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- --EXPECTF-- -Test 1 insert numbers +Test 1 insert numbers Warning: oci_execute(): ORA-01438: %s in %sbind_misccoltypes_errs.php on line %d array(1) { @@ -128,7 +128,7 @@ array(1) { } } -Test 2 insert numbers +Test 2 insert numbers Warning: oci_execute(): ORA-01722: %s in %sbind_misccoltypes_errs.php on line %d array(1) { diff --git a/ext/oci8/tests/bind_raw.phpt b/ext/oci8/tests/bind_raw.phpt index c2e8e08768a..a6e6259eef3 100644 --- a/ext/oci8/tests/bind_raw.phpt +++ b/ext/oci8/tests/bind_raw.phpt @@ -4,7 +4,7 @@ bind RAW field true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- = 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/bind_sqltnum_11g.phpt b/ext/oci8/tests/bind_sqltnum_11g.phpt index 1969893604c..3f4a1411a89 100644 --- a/ext/oci8/tests/bind_sqltnum_11g.phpt +++ b/ext/oci8/tests/bind_sqltnum_11g.phpt @@ -4,7 +4,7 @@ Bind with SQLT_NUM diff --git a/ext/oci8/tests/bind_unsupported_1.phpt b/ext/oci8/tests/bind_unsupported_1.phpt index 544b446788e..ba125d99fcb 100644 --- a/ext/oci8/tests/bind_unsupported_1.phpt +++ b/ext/oci8/tests/bind_unsupported_1.phpt @@ -27,7 +27,7 @@ foreach ($types as $t => $v) { $s = oci_parse($c, "select * from dual where dummy = :c1"); $c1 = "Doug"; - oci_bind_by_name($s, ":c1", $c1, -1, $v); + oci_bind_by_name($s, ":c1", $c1, -1, $v); } ?> diff --git a/ext/oci8/tests/bind_unsupported_2.phpt b/ext/oci8/tests/bind_unsupported_2.phpt index b4e2c9b43de..9d0a33df6a5 100644 --- a/ext/oci8/tests/bind_unsupported_2.phpt +++ b/ext/oci8/tests/bind_unsupported_2.phpt @@ -1,8 +1,8 @@ --TEST-- Bind with various unsupported 10g+ bind types --SKIPIF-- - --FILE-- $v) { $s = oci_parse($c, "select * from dual where dummy = :c1"); $c1 = "Doug"; - oci_bind_by_name($s, ":c1", $c1, -1, $v); + oci_bind_by_name($s, ":c1", $c1, -1, $v); } ?> diff --git a/ext/oci8/tests/bind_unsupported_3.phpt b/ext/oci8/tests/bind_unsupported_3.phpt index 5c9dec37295..48b719aa54f 100644 --- a/ext/oci8/tests/bind_unsupported_3.phpt +++ b/ext/oci8/tests/bind_unsupported_3.phpt @@ -1,10 +1,10 @@ --TEST-- -Bind with various bind types not supported by TimesTen +Bind with various bind types not supported by TimesTen --SKIPIF-- false, 'timesten' => true); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- $v) { $s = oci_parse($c, "select * from dual where dummy = :c1"); $c1 = "Doug"; - oci_bind_by_name($s, ":c1", $c1, -1, $v); + oci_bind_by_name($s, ":c1", $c1, -1, $v); } ?> diff --git a/ext/oci8/tests/bug26133.phpt b/ext/oci8/tests/bug26133.phpt index 59f8a17f38d..2da5d483d0f 100644 --- a/ext/oci8/tests/bug26133.phpt +++ b/ext/oci8/tests/bug26133.phpt @@ -36,7 +36,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/bug27303_1.phpt b/ext/oci8/tests/bug27303_1.phpt index 0b9d2b99e0e..3058c1bcaec 100644 --- a/ext/oci8/tests/bug27303_1.phpt +++ b/ext/oci8/tests/bug27303_1.phpt @@ -16,7 +16,7 @@ NLS_LANG= ---EXPECT-- +--EXPECT-- string(1) "1" string(1) "2" string(1) "3" diff --git a/ext/oci8/tests/bug27303_1_11gR1.phpt b/ext/oci8/tests/bug27303_1_11gR1.phpt index d2018783bc9..f7e224f45c1 100644 --- a/ext/oci8/tests/bug27303_1_11gR1.phpt +++ b/ext/oci8/tests/bug27303_1_11gR1.phpt @@ -51,7 +51,7 @@ oci8_test_sql_execute($c, $stmtarray); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(1) "1" string(1) "2" string(1) "3" diff --git a/ext/oci8/tests/bug27303_2.phpt b/ext/oci8/tests/bug27303_2.phpt index ee2f7b52aa5..76188153e58 100644 --- a/ext/oci8/tests/bug27303_2.phpt +++ b/ext/oci8/tests/bug27303_2.phpt @@ -16,7 +16,7 @@ NLS_LANG= ---EXPECT-- +--EXPECT-- string(1) "1" string(1) "2" string(1) "3" diff --git a/ext/oci8/tests/bug27303_2_11gR1.phpt b/ext/oci8/tests/bug27303_2_11gR1.phpt index a50b3e26132..0a0cc44845c 100644 --- a/ext/oci8/tests/bug27303_2_11gR1.phpt +++ b/ext/oci8/tests/bug27303_2_11gR1.phpt @@ -16,7 +16,7 @@ NLS_LANG= ---EXPECT-- +--EXPECT-- string(1) "1" string(1) "2" string(1) "3" diff --git a/ext/oci8/tests/bug27303_3.phpt b/ext/oci8/tests/bug27303_3.phpt index e2910670886..aafdf61e731 100644 --- a/ext/oci8/tests/bug27303_3.phpt +++ b/ext/oci8/tests/bug27303_3.phpt @@ -6,7 +6,7 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) ---EXPECT-- +--EXPECT-- int(1) int(2) int(3) diff --git a/ext/oci8/tests/bug27303_4.phpt b/ext/oci8/tests/bug27303_4.phpt index ed9d5a1fe6d..a88f29807d2 100644 --- a/ext/oci8/tests/bug27303_4.phpt +++ b/ext/oci8/tests/bug27303_4.phpt @@ -16,7 +16,7 @@ NLS_LANG= ---EXPECT-- +--EXPECT-- string(1) "1" string(1) "2" string(1) "3" diff --git a/ext/oci8/tests/bug27303_4_11gR1.phpt b/ext/oci8/tests/bug27303_4_11gR1.phpt index 550d89fdcc5..ff21d23a2a9 100644 --- a/ext/oci8/tests/bug27303_4_11gR1.phpt +++ b/ext/oci8/tests/bug27303_4_11gR1.phpt @@ -14,7 +14,7 @@ if (!(isset($matches[0]) && $matches[1] < 12)) { ---EXPECT-- +--EXPECT-- string(1) "1" string(1) "2" string(1) "3" diff --git a/ext/oci8/tests/bug32325.phpt b/ext/oci8/tests/bug32325.phpt index 854e5c15909..925433659b4 100644 --- a/ext/oci8/tests/bug32325.phpt +++ b/ext/oci8/tests/bug32325.phpt @@ -4,12 +4,12 @@ Bug #32325 (Cannot retrieve collection using OCI8) true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- int(4) float(2) float(3) diff --git a/ext/oci8/tests/bug35973.phpt b/ext/oci8/tests/bug35973.phpt index 3f4299ea29e..4c000d022b6 100644 --- a/ext/oci8/tests/bug35973.phpt +++ b/ext/oci8/tests/bug35973.phpt @@ -4,7 +4,7 @@ Bug #35973 (Error ORA-24806 occurs when trying to fetch a NCLOB field) true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECTF-- +--EXPECTF-- array(1) { ["NC"]=> object(OCI-Lob)#%d (1) { diff --git a/ext/oci8/tests/bug36010.phpt b/ext/oci8/tests/bug36010.phpt index 3ad49ecad80..cd68b66f34d 100644 --- a/ext/oci8/tests/bug36010.phpt +++ b/ext/oci8/tests/bug36010.phpt @@ -4,10 +4,10 @@ Bug #36010 (Crash when executing SQL statement with lob parameter twice) true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- writetemporary("", OCI_TEMP_CLOB); -$success = oci_execute($stmt, OCI_COMMIT_ON_SUCCESS); -oci_free_statement($stmt); -$clob->close(); +$query = "UPDATE bug37220_tab + SET bug37220_tab.mycolumn = updateXML(bug37220_tab.mycolumn,'/THETAG',xmltype.createXML(:data)) + WHERE existsNode(bug37220_tab.mycolumn,'/THETAG[@myID=\"1234\"]') = 1"; +$stmt = oci_parse ($c, $query); +$clob = oci_new_descriptor($c, OCI_D_LOB); +oci_bind_by_name($stmt, ':data', $clob, -1, OCI_B_CLOB); +$clob->writetemporary("", OCI_TEMP_CLOB); +$success = oci_execute($stmt, OCI_COMMIT_ON_SUCCESS); +oci_free_statement($stmt); +$clob->close(); // Query back the change $query = "select * from bug37220_tab"; -$stmt = oci_parse ($c, $query); +$stmt = oci_parse ($c, $query); oci_execute($stmt); diff --git a/ext/oci8/tests/bug37581.phpt b/ext/oci8/tests/bug37581.phpt index aba25579ccd..642414f9a35 100644 --- a/ext/oci8/tests/bug37581.phpt +++ b/ext/oci8/tests/bug37581.phpt @@ -4,7 +4,7 @@ Bug #37581 (oci_bind_array_by_name clobbers input array when using SQLT_AFC, AVC true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(1) "A" diff --git a/ext/oci8/tests/bug38161.phpt b/ext/oci8/tests/bug38161.phpt index 0664510146e..4187de8fed1 100644 --- a/ext/oci8/tests/bug38161.phpt +++ b/ext/oci8/tests/bug38161.phpt @@ -24,7 +24,7 @@ var_dump($bv); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- NULL int(0) Done diff --git a/ext/oci8/tests/bug38173.phpt b/ext/oci8/tests/bug38173.phpt index 901f6f7bfc3..dd11315b673 100644 --- a/ext/oci8/tests/bug38173.phpt +++ b/ext/oci8/tests/bug38173.phpt @@ -4,7 +4,7 @@ Bug #38173 (Freeing nested cursors causes OCI8 to segfault) true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(3) "one" diff --git a/ext/oci8/tests/bug40415.phpt b/ext/oci8/tests/bug40415.phpt index fcccfe716f6..0530c9c593b 100644 --- a/ext/oci8/tests/bug40415.phpt +++ b/ext/oci8/tests/bug40415.phpt @@ -4,9 +4,9 @@ Bug #40415 (Using oci_fetchall with nested cursors) true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (empty($dbase)) die ("skip requires network connection alias for DB link loopback"); @@ -51,7 +51,7 @@ $stmtarray = array( "insert into bug41069_tab (c1, c2, c3, c4, c5, c6, c7, c9, c10, c12, c15) values (113, 'aaaaaaa', 'bbbbbbbbbb', 'cccccc', 'e', 'f', 'dddd', '12/04/2006', '12/04/2006', 2224, 'zzzzzzz')" ); - + oci8_test_sql_execute($c, $stmtarray); diff --git a/ext/oci8/tests/bug42134.phpt b/ext/oci8/tests/bug42134.phpt index 10b7ef160d2..63091100a1f 100644 --- a/ext/oci8/tests/bug42134.phpt +++ b/ext/oci8/tests/bug42134.phpt @@ -4,7 +4,7 @@ Bug #42134 (Collection error for invalid collection name) true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --INI-- oci8.statement_cache_size=20 --FILE-- @@ -24,10 +24,10 @@ $stmtarray = array( end bug42841_proc;", "create or replace package bug43449_pkg is - type cursortype is ref Cursor; + type cursortype is ref Cursor; function testcursor return cursortype; end bug43449_pkg;", - + "create or replace package body bug43449_pkg is function testcursor return cursortype is retCursor cursorType; @@ -50,32 +50,32 @@ function do_bug42841($c) $stmt = oci_parse($c, $sql); $cursor = oci_new_cursor($c); oci_bind_by_name($stmt, ":cursor", $cursor, -1, OCI_B_CURSOR); - + oci_execute($stmt, OCI_DEFAULT); oci_execute($cursor); - + while($row = oci_fetch_array($cursor, OCI_ASSOC + OCI_RETURN_LOBS)) { $data1[] = $row; } - + oci_free_statement($stmt); oci_free_statement($cursor); var_dump($data1); - + echo "Second attempt\n"; - + $sql = "BEGIN bug42841_proc(:cursor); END;"; $stmt = oci_parse($c, $sql); $cursor = oci_new_cursor($c); oci_bind_by_name($stmt, ":cursor", $cursor, -1, OCI_B_CURSOR); - + oci_execute($stmt, OCI_DEFAULT); oci_execute($cursor); - + while($row = oci_fetch_array($cursor, OCI_ASSOC + OCI_RETURN_LOBS)) { $data2[] = $row; } - + oci_free_statement($stmt); oci_free_statement($cursor); var_dump($data2); @@ -90,19 +90,19 @@ function do_bug43449($c) } function bug43449_getCur($c) -{ +{ $cur = oci_new_cursor($c); $stmt = oci_parse($c, 'begin :cur := bug43449_pkg.testcursor; end;'); oci_bind_by_name($stmt, ':cur', $cur, -1, OCI_B_CURSOR); oci_execute($stmt, OCI_DEFAULT); oci_execute($cur, OCI_DEFAULT); - + $ret = array(); - + while (ocifetchinto($cur, $row, OCI_ASSOC)) { $ret[] = $row; } - + oci_free_statement($cur); oci_free_statement($stmt); return $ret; diff --git a/ext/oci8/tests/bug43492.phpt b/ext/oci8/tests/bug43492.phpt index e84fa42556c..7c91ea22b64 100644 --- a/ext/oci8/tests/bug43492.phpt +++ b/ext/oci8/tests/bug43492.phpt @@ -4,7 +4,7 @@ Bug #43492 (Nested cursor leaks) true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); @@ -102,27 +102,27 @@ function dropxmltab($c) // delete table function fillxmltab($c) { for ($id = 1; $id <= 100; $id++) { - - // create an XML element string with random data + + // create an XML element string with random data $s = ""; for ($j = 0; $j < 128; $j++) { - $s .= rand(); + $s .= rand(); } - $s .= "\n"; + $s .= "\n"; for ($j = 0; $j < 4; $j++) { $s .= $s; - } + } $data = "" . $s . ""; - + // insert XML data into database - + $stmt = oci_parse($c, "insert into bug43497_tab(id, xml) values (:id, sys.xmltype.createxml(:xml))"); oci_bind_by_name($stmt, ":id", $id); $clob = oci_new_descriptor($c, OCI_D_LOB); oci_bind_by_name($stmt, ":xml", $clob, -1, OCI_B_CLOB); $clob->writetemporary($data); oci_execute($stmt); - + $clob->close(); $clob->free(); } diff --git a/ext/oci8/tests/bug44008.phpt b/ext/oci8/tests/bug44008.phpt index faacdc62540..c9930f24398 100644 --- a/ext/oci8/tests/bug44008.phpt +++ b/ext/oci8/tests/bug44008.phpt @@ -4,7 +4,7 @@ Bug #44008 (Incorrect usage of OCI-Lob->close crashes PHP) true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); diff --git a/ext/oci8/tests/bug44206.phpt b/ext/oci8/tests/bug44206.phpt index 63805bf6e3a..20c92b0f64c 100644 --- a/ext/oci8/tests/bug44206.phpt +++ b/ext/oci8/tests/bug44206.phpt @@ -4,7 +4,7 @@ Bug #44206 (Test if selecting ref cursors leads to ORA-1000 maximum open cursors true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs: different error handling for this undefined behavior require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ===DONE=== diff --git a/ext/oci8/tests/bug47281.phpt b/ext/oci8/tests/bug47281.phpt index 3fc1702da53..e7b6dc43ccc 100644 --- a/ext/oci8/tests/bug47281.phpt +++ b/ext/oci8/tests/bug47281.phpt @@ -12,7 +12,7 @@ if (!isset($matches[0]) || )) { die("skip test works only with Oracle 11.2.0.2 or earlier Oracle client libraries"); } -?> +?> --ENV-- NLS_LANG=.AL32UTF8 --FILE-- @@ -25,7 +25,7 @@ require(dirname(__FILE__).'/connect.inc'); $stmtarray = array( "create or replace procedure bug47281_sp as begin - raise_application_error(-20000, + raise_application_error(-20000, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccDeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeFggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhIjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjKlllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllM'); end;" ); diff --git a/ext/oci8/tests/bug51253.phpt b/ext/oci8/tests/bug51253.phpt index b38bc7606b7..21a0cf8a3f9 100644 --- a/ext/oci8/tests/bug51253.phpt +++ b/ext/oci8/tests/bug51253.phpt @@ -4,7 +4,7 @@ Bug #51253 (oci_bind_array_by_name() array references) true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- Test 1 array(5) { [0]=> diff --git a/ext/oci8/tests/bug51291_1.phpt b/ext/oci8/tests/bug51291_1.phpt index c47a19fce6a..4fa2e239959 100644 --- a/ext/oci8/tests/bug51291_1.phpt +++ b/ext/oci8/tests/bug51291_1.phpt @@ -29,7 +29,7 @@ echo "\nTest 3 - Execute\n"; $s = @oci_parse($c, 'select doesnotexist from dual'); $r = @oci_execute($s, OCI_DEFAULT); -if (!$r) { +if (!$r) { var_dump(oci_error($s)); echo "2nd call\n"; var_dump(oci_error($s)); @@ -39,7 +39,7 @@ echo "\nTest 4 - Execute - consecutive oci_error calls of different kinds\n"; $s = @oci_parse($c, 'select doesnotexist from dual'); $r = @oci_execute($s, OCI_DEFAULT); -if (!$r) { +if (!$r) { var_dump(oci_error(), oci_error($c), oci_error($s)); echo "2nd call\n"; var_dump(oci_error(), oci_error($c), oci_error($s)); @@ -50,7 +50,7 @@ echo "\nTest 5 - Execute - after oci_rollback\n"; $s = @oci_parse($c, 'select doesnotexist from dual'); $r = @oci_execute($s, OCI_DEFAULT); -if (!$r) { +if (!$r) { var_dump(oci_error(), oci_error($c), oci_error($s)); $r = oci_rollback($c); echo "Rollback status is "; @@ -68,7 +68,7 @@ echo "\nTest 6 - Execute - after successful 2nd query with new handle\n"; $s = @oci_parse($c, 'select doesnotexist from dual'); $r = @oci_execute($s, OCI_DEFAULT); -if (!$r) { +if (!$r) { var_dump(oci_error(), oci_error($c), oci_error($s)); $s2 = oci_parse($c, 'select 1 from dual'); $r = oci_execute($s2, OCI_DEFAULT); @@ -87,7 +87,7 @@ echo "\nTest 7 - Execute - after successful 2nd query with same handle\n"; $s = @oci_parse($c, 'select doesnotexist from dual'); $r = @oci_execute($s, OCI_DEFAULT); -if (!$r) { +if (!$r) { var_dump(oci_error(), oci_error($c), oci_error($s)); $s = oci_parse($c, 'select 1 from dual'); $r = oci_execute($s, OCI_DEFAULT); @@ -106,7 +106,7 @@ echo "\nTest 8 - Execute - after unsuccessful 2nd query with new handle\n"; $s = @oci_parse($c, 'select doesnotexist from dual'); $r = @oci_execute($s, OCI_DEFAULT); -if (!$r) { +if (!$r) { var_dump(oci_error(), oci_error($c), oci_error($s)); $s2 = oci_parse($c, 'select reallynothere from dual'); $r = oci_execute($s2, OCI_DEFAULT); @@ -124,7 +124,7 @@ echo "\nTest 9 - Execute - after unsuccessful 2nd query with same handle\n"; $s = @oci_parse($c, 'select doesnotexist from dual'); $r = @oci_execute($s, OCI_DEFAULT); -if (!$r) { +if (!$r) { var_dump(oci_error(), oci_error($c), oci_error($s)); $s = oci_parse($c, 'select reallynothere from dual'); $r = oci_execute($s, OCI_DEFAULT); @@ -167,7 +167,7 @@ array(4) { Test 2 - Parse -Warning: oci_error() expects parameter 1 to be resource, bool given in %sbug51291_1.php on line %d +Warning: oci_error() expects parameter 1 to be resource, bool%sgiven in %sbug51291_1.php on line %d bool(false) array(4) { ["code"]=> @@ -182,7 +182,7 @@ array(4) { NULL 2nd call -Warning: oci_error() expects parameter 1 to be resource, bool given in %sbug51291_1.php on line %d +Warning: oci_error() expects parameter 1 to be resource, bool%sgiven in %sbug51291_1.php on line %d bool(false) array(4) { ["code"]=> diff --git a/ext/oci8/tests/bug51291_2.phpt b/ext/oci8/tests/bug51291_2.phpt index d5dbf6f82b5..d2c84af2c4b 100644 --- a/ext/oci8/tests/bug51291_2.phpt +++ b/ext/oci8/tests/bug51291_2.phpt @@ -4,7 +4,7 @@ Bug #51291 (oci_error() doesn't report last error when called two times) true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --ENV-- NLS_LANG=.AL32UTF8 --FILE-- diff --git a/ext/oci8/tests/bug71148.phpt b/ext/oci8/tests/bug71148.phpt index 44bd0e80078..204aab3c808 100644 --- a/ext/oci8/tests/bug71148.phpt +++ b/ext/oci8/tests/bug71148.phpt @@ -127,7 +127,7 @@ var_dump($cache3); oci_free_statement($stmt); -// Test 6: Bind IN OUT parameter within the same scope of execute +// Test 6: Bind IN OUT parameter within the same scope of execute $sql = "call bindproc(:var1, :var2, :var3)"; $cache1 = 'STR1'; diff --git a/ext/oci8/tests/bug71600.phpt b/ext/oci8/tests/bug71600.phpt index 102c59f81a5..fc548d26c1d 100644 --- a/ext/oci8/tests/bug71600.phpt +++ b/ext/oci8/tests/bug71600.phpt @@ -4,17 +4,17 @@ Bug #71600 (oci_fetch_all result in segfault when select more than 8 columns) true, 'timesten' => true); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ===DONE=== ---EXPECT-- +--EXPECT-- Test 1 Executing SELECT statament... Fetching data by columns... diff --git a/ext/oci8/tests/close.phpt b/ext/oci8/tests/close.phpt index aed90fcaa71..6f9d2b84736 100644 --- a/ext/oci8/tests/close.phpt +++ b/ext/oci8/tests/close.phpt @@ -10,8 +10,8 @@ require dirname(__FILE__).'/connect.inc'; oci_close($c); oci_connect($user, $password, $dbase); - + echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- Done diff --git a/ext/oci8/tests/coll_001.phpt b/ext/oci8/tests/coll_001.phpt index 625d71a2950..0b9ddcccc20 100644 --- a/ext/oci8/tests/coll_001.phpt +++ b/ext/oci8/tests/coll_001.phpt @@ -4,7 +4,7 @@ oci_new_collection() true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- --EXPECT-- diff --git a/ext/oci8/tests/commit_002.phpt b/ext/oci8/tests/commit_002.phpt index 4079ac0c307..ade5fb09bb1 100644 --- a/ext/oci8/tests/commit_002.phpt +++ b/ext/oci8/tests/commit_002.phpt @@ -4,7 +4,7 @@ Test oci_commit failure true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- --EXPECT-- diff --git a/ext/oci8/tests/conn_attr_1.phpt b/ext/oci8/tests/conn_attr_1.phpt index 745b1cd93f9..d16e10f61cb 100644 --- a/ext/oci8/tests/conn_attr_1.phpt +++ b/ext/oci8/tests/conn_attr_1.phpt @@ -1,7 +1,7 @@ --TEST-- Set and get of connection attributes with all types of connections. --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); @@ -18,7 +18,7 @@ if (!(isset($matches[0]) && $matches[1] >= 10)) { true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); @@ -20,7 +20,7 @@ oci8.privileged_connect = On = 10)) { = 2) || ($matches[1] >= 12) ))) { @@ -22,7 +22,7 @@ if (!(isset($matches[0]) && = 10)) { diff --git a/ext/oci8/tests/connect_old.phpt b/ext/oci8/tests/connect_old.phpt index 55f1734a5a2..390c418a11f 100644 --- a/ext/oci8/tests/connect_old.phpt +++ b/ext/oci8/tests/connect_old.phpt @@ -13,7 +13,7 @@ if (!empty($dbase)) { else { var_dump(ocilogon($user, $password)); } - + echo "Done\n"; ?> diff --git a/ext/oci8/tests/connect_scope1.phpt b/ext/oci8/tests/connect_scope1.phpt index ae0f8f45192..55cc1710470 100644 --- a/ext/oci8/tests/connect_scope1.phpt +++ b/ext/oci8/tests/connect_scope1.phpt @@ -18,7 +18,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope2.phpt b/ext/oci8/tests/connect_scope2.phpt index e9d205e0c54..76ed42ca178 100644 --- a/ext/oci8/tests/connect_scope2.phpt +++ b/ext/oci8/tests/connect_scope2.phpt @@ -18,7 +18,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope_try1.phpt b/ext/oci8/tests/connect_scope_try1.phpt index 2832b863eaf..6dc94792db7 100644 --- a/ext/oci8/tests/connect_scope_try1.phpt +++ b/ext/oci8/tests/connect_scope_try1.phpt @@ -20,7 +20,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope_try2.phpt b/ext/oci8/tests/connect_scope_try2.phpt index 29daa9d4039..47e2b384b44 100644 --- a/ext/oci8/tests/connect_scope_try2.phpt +++ b/ext/oci8/tests/connect_scope_try2.phpt @@ -20,7 +20,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope_try3.phpt b/ext/oci8/tests/connect_scope_try3.phpt index 1af08137270..6e1c652ad5e 100644 --- a/ext/oci8/tests/connect_scope_try3.phpt +++ b/ext/oci8/tests/connect_scope_try3.phpt @@ -20,7 +20,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope_try4.phpt b/ext/oci8/tests/connect_scope_try4.phpt index 5a2c9f07275..f35f4e68b52 100644 --- a/ext/oci8/tests/connect_scope_try4.phpt +++ b/ext/oci8/tests/connect_scope_try4.phpt @@ -20,7 +20,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope_try5.phpt b/ext/oci8/tests/connect_scope_try5.phpt index 112ec6ce978..325ce2fb99c 100644 --- a/ext/oci8/tests/connect_scope_try5.phpt +++ b/ext/oci8/tests/connect_scope_try5.phpt @@ -20,7 +20,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope_try6.phpt b/ext/oci8/tests/connect_scope_try6.phpt index 96bd5560928..6cc54a21bbe 100644 --- a/ext/oci8/tests/connect_scope_try6.phpt +++ b/ext/oci8/tests/connect_scope_try6.phpt @@ -20,7 +20,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_with_charset_001.phpt b/ext/oci8/tests/connect_with_charset_001.phpt index 9149747cdbb..36963ab5a0f 100644 --- a/ext/oci8/tests/connect_with_charset_001.phpt +++ b/ext/oci8/tests/connect_with_charset_001.phpt @@ -21,7 +21,7 @@ var_dump($c5 == $c6); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- resource(%d) of type (oci8 connection) resource(%d) of type (oci8 connection) diff --git a/ext/oci8/tests/connect_without_oracle_home.phpt b/ext/oci8/tests/connect_without_oracle_home.phpt index 831fc23d610..0e4a37ca3a2 100644 --- a/ext/oci8/tests/connect_without_oracle_home.phpt +++ b/ext/oci8/tests/connect_without_oracle_home.phpt @@ -1,8 +1,8 @@ --TEST-- oci_connect() without ORACLE_HOME set (OCIServerAttach() segfaults) --SKIPIF-- - ===DONE=== diff --git a/ext/oci8/tests/connect_without_oracle_home_11.phpt b/ext/oci8/tests/connect_without_oracle_home_11.phpt index 42c45644567..09f778362c1 100644 --- a/ext/oci8/tests/connect_without_oracle_home_11.phpt +++ b/ext/oci8/tests/connect_without_oracle_home_11.phpt @@ -1,8 +1,8 @@ --TEST-- oci_connect() without ORACLE_HOME set (OCIServerAttach() segfaults) --SKIPIF-- - ===DONE=== diff --git a/ext/oci8/tests/connect_without_oracle_home_old.phpt b/ext/oci8/tests/connect_without_oracle_home_old.phpt index d6d12b47ba3..1bc7b37c236 100644 --- a/ext/oci8/tests/connect_without_oracle_home_old.phpt +++ b/ext/oci8/tests/connect_without_oracle_home_old.phpt @@ -1,8 +1,8 @@ --TEST-- ocilogon() without ORACLE_HOME set (OCIServerAttach() segfaults) --SKIPIF-- - ===DONE=== diff --git a/ext/oci8/tests/connect_without_oracle_home_old_11.phpt b/ext/oci8/tests/connect_without_oracle_home_old_11.phpt index eb5fb0cc4d3..07803b99965 100644 --- a/ext/oci8/tests/connect_without_oracle_home_old_11.phpt +++ b/ext/oci8/tests/connect_without_oracle_home_old_11.phpt @@ -1,8 +1,8 @@ --TEST-- ocilogon() without ORACLE_HOME set (OCIServerAttach() segfaults) --SKIPIF-- - ===DONE=== diff --git a/ext/oci8/tests/cursor_bind.phpt b/ext/oci8/tests/cursor_bind.phpt index 740402e7e0f..6de593a17d8 100644 --- a/ext/oci8/tests/cursor_bind.phpt +++ b/ext/oci8/tests/cursor_bind.phpt @@ -4,7 +4,7 @@ bind and fetch cursor from a statement true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ===DONE=== ---EXPECT-- +--EXPECT-- array(2) { [0]=> string(1) "1" diff --git a/ext/oci8/tests/cursor_bind_err.phpt b/ext/oci8/tests/cursor_bind_err.phpt index 197aad1d197..3ee539f3d32 100644 --- a/ext/oci8/tests/cursor_bind_err.phpt +++ b/ext/oci8/tests/cursor_bind_err.phpt @@ -4,7 +4,7 @@ binding a cursor (with errors) true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { @@ -13,11 +13,11 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } if (!function_exists('oci_set_db_operation')) -{ +{ die("skip function oci_set_db_operation() does not exist"); } ?> @@ -58,4 +58,4 @@ array(1) { string(7) "db_op_1" } ===DONE=== - + diff --git a/ext/oci8/tests/db_op_2.phpt b/ext/oci8/tests/db_op_2.phpt index 74028f794e1..1878347123b 100644 --- a/ext/oci8/tests/db_op_2.phpt +++ b/ext/oci8/tests/db_op_2.phpt @@ -1,8 +1,8 @@ --TEST-- oci_set_db_operation: basic test for end-to-end tracing --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { @@ -13,11 +13,11 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } if (!function_exists('oci_set_db_operation')) -{ +{ die("skip function oci_set_db_operation() does not exist"); } ?> @@ -66,4 +66,4 @@ array(2) { string(7) "db_op_2a" } ===DONE=== - + diff --git a/ext/oci8/tests/dbmsoutput.phpt b/ext/oci8/tests/dbmsoutput.phpt index b69b6a03fd9..6a8a718c8aa 100644 --- a/ext/oci8/tests/dbmsoutput.phpt +++ b/ext/oci8/tests/dbmsoutput.phpt @@ -4,7 +4,7 @@ PL/SQL: dbms_output true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- diff --git a/ext/oci8/tests/default_prefetch0.phpt b/ext/oci8/tests/default_prefetch0.phpt index cc70c6ecb3c..5d2934e4cb4 100644 --- a/ext/oci8/tests/default_prefetch0.phpt +++ b/ext/oci8/tests/default_prefetch0.phpt @@ -44,7 +44,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/default_prefetch1.phpt b/ext/oci8/tests/default_prefetch1.phpt index bc788293657..04fbd1a5a51 100644 --- a/ext/oci8/tests/default_prefetch1.phpt +++ b/ext/oci8/tests/default_prefetch1.phpt @@ -44,7 +44,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/default_prefetch2.phpt b/ext/oci8/tests/default_prefetch2.phpt index d8a76dbb079..33e91150b6a 100644 --- a/ext/oci8/tests/default_prefetch2.phpt +++ b/ext/oci8/tests/default_prefetch2.phpt @@ -45,7 +45,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/define2.phpt b/ext/oci8/tests/define2.phpt index c53bebd2e1f..67cff225c19 100644 --- a/ext/oci8/tests/define2.phpt +++ b/ext/oci8/tests/define2.phpt @@ -4,7 +4,7 @@ Test oci_define_by_name types true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECTF-- +--EXPECTF-- array(1) { ["BLOB"]=> object(OCI-Lob)#%d (1) { diff --git a/ext/oci8/tests/drcp_cclass1.phpt b/ext/oci8/tests/drcp_cclass1.phpt index 0a929317bb2..d004f1f1121 100644 --- a/ext/oci8/tests/drcp_cclass1.phpt +++ b/ext/oci8/tests/drcp_cclass1.phpt @@ -1,14 +1,14 @@ --TEST-- DRCP: Test setting connection class inline --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs (Calling PL/SQL from SQL is not supported in TimesTen) require(dirname(__FILE__).'/skipif.inc'); -?> +?> --INI-- oci8.connection_class=test oci8.old_oci_close_semantics=0 @@ -24,7 +24,7 @@ var_dump($conn1 = oci_connect($user,$password,$dbase)); // Create the package drcp_create_package($conn1); -echo "Test 1b\n"; +echo "Test 1b\n"; // OCI_CONNECT echo " This is with OCI_CONNECT.....\n"; drcp_select_packagevar($conn1); // Returns 0 @@ -35,7 +35,7 @@ echo " Connection conn1 closed....\n"; echo "Test 2\n"; // Second connection should return 0 for the package variable. var_dump($conn2 = oci_connect($user,$password,$dbase)); -echo " Select with connection 2 \n"; +echo " Select with connection 2\n"; drcp_select_packagevar($conn2); // Returns 0 drcp_set_packagevar($conn2,100); @@ -43,7 +43,7 @@ echo "Test 3\n"; // Third connection. There is no oci_close() for conn2 hence this should // return the value set by conn2. var_dump($conn3 = oci_connect($user,$password,$dbase)); -echo " Select with connection 3 \n"; +echo " Select with connection 3\n"; drcp_select_packagevar($conn3); // Returns 100 // Close all the connections @@ -63,7 +63,7 @@ echo " Connection pconn1 closed....\n"; echo "Test 5\n"; var_dump($pconn2 = oci_pconnect($user,$password,$dbase)); -echo " Select with persistent connection 2 \n"; +echo " Select with persistent connection 2\n"; drcp_select_packagevar($pconn2); // Returns 1000 oci_close($pconn2); @@ -80,12 +80,12 @@ Test 1b Connection conn1 closed.... Test 2 resource(%d) of type (oci8 connection) - Select with connection 2 + Select with connection 2 The value of the package variable is 0 Package variable value set to 100 Test 3 resource(%d) of type (oci8 connection) - Select with connection 3 + Select with connection 3 The value of the package variable is 100 Test 4 This is with oci_pconnect()..... @@ -94,7 +94,7 @@ resource(%d) of type (oci8 persistent connection) Connection pconn1 closed.... Test 5 resource(%d) of type (oci8 persistent connection) - Select with persistent connection 2 + Select with persistent connection 2 The value of the package variable is 1000 Done diff --git a/ext/oci8/tests/drcp_connection_class.phpt b/ext/oci8/tests/drcp_connection_class.phpt index 1db9ef10a6e..8544b99fc8f 100644 --- a/ext/oci8/tests/drcp_connection_class.phpt +++ b/ext/oci8/tests/drcp_connection_class.phpt @@ -2,9 +2,9 @@ DRCP: oci8.connection_class with ini_get() and ini_set() --SKIPIF-- = 11)) { +if (!(isset($matches[0]) && $matches[0] >= 11)) { die("skip works only with Oracle 11g or greater version of Oracle client libraries"); } ?> @@ -16,15 +16,15 @@ oci8.connection_class=test echo "Setting a new connection class now\n"; ini_set('oci8.connection_class',"New cc"); -// Get the New connection class name .Should return New CC +// Get the New connection class name. Should return New CC $new_cc = ini_get('oci8.connection_class'); -echo "The New oci8.connection_class is $new_cc \n"; +echo "The New oci8.connection_class is $new_cc\n"; echo "Done\n"; ?> --EXPECT-- Setting a new connection class now -The New oci8.connection_class is New cc +The New oci8.connection_class is New cc Done diff --git a/ext/oci8/tests/drcp_pconn_close1.phpt b/ext/oci8/tests/drcp_pconn_close1.phpt index a9b912b26fe..53e7b1e3ef1 100644 --- a/ext/oci8/tests/drcp_pconn_close1.phpt +++ b/ext/oci8/tests/drcp_pconn_close1.phpt @@ -29,9 +29,9 @@ oci_close($conn2); // Compare the resource numbers if ($rn1 === $rn2) - echo "Both connections share a resource : OK \n"; + echo "Both connections share a resource : OK\n"; else - echo "Both connections are different : NOT OK \n"; + echo "Both connections are different : NOT OK\n"; echo "Done\n"; @@ -40,5 +40,5 @@ echo "Done\n"; This is with a OCI_PCONNECT resource(%d) of type (oci8 persistent connection) resource(%d) of type (oci8 persistent connection) -Both connections share a resource : OK +Both connections share a resource : OK Done diff --git a/ext/oci8/tests/drcp_pconn_close2.phpt b/ext/oci8/tests/drcp_pconn_close2.phpt index 5fd2c2355f6..1c64762018c 100644 --- a/ext/oci8/tests/drcp_pconn_close2.phpt +++ b/ext/oci8/tests/drcp_pconn_close2.phpt @@ -31,9 +31,9 @@ oci_close($conn2); // Compare the resource numbers if ($rn1 === $rn2) - echo "Both connections share a resource : NOT OK \n"; + echo "Both connections share a resource : NOT OK\n"; else - echo "Both connections are different : OK \n"; + echo "Both connections are different : OK\n"; echo "Done\n"; @@ -42,5 +42,5 @@ echo "Done\n"; This is with a OCI_PCONNECT resource(%d) of type (oci8 persistent connection) resource(%d) of type (oci8 persistent connection) -Both connections are different : OK +Both connections are different : OK Done diff --git a/ext/oci8/tests/driver_name.phpt b/ext/oci8/tests/driver_name.phpt index a5be162e40e..bc42ad234d2 100644 --- a/ext/oci8/tests/driver_name.phpt +++ b/ext/oci8/tests/driver_name.phpt @@ -1,7 +1,7 @@ --TEST-- Verify that the Driver Name attribute is set --SKIPIF-- -= 2) || ($matches[1] >= 12) ))) { @@ -30,11 +30,11 @@ if (!(isset($matches[0]) && /* In 11.2, there can only be one child edition. So this test will * fail to create the necessary editions if a child edition exists - * already + * already */ $testuser = 'testuser_attr_1'; // Used in conn_attr.inc -$testpassword = 'testuser'; +$testpassword = 'testuser'; require(dirname(__FILE__)."/conn_attr.inc"); @@ -45,18 +45,18 @@ function select_fn($conn) { var_dump($row); } } -/* Create a editon MYEDITION +/* Create a editon MYEDITION create a view view_ed in MYEDITION1. create the same view 'view_ed' with a different definition in MYEDITION. select from both the editions and verify the contents. */ set_edit_attr('MYEDITION'); -$conn = oci_connect($testuser,$testpassword,$dbase); +$conn = oci_connect($testuser,$testpassword,$dbase); if ($conn === false) { $m = oci_error(); die("Error:" . $m['message']); } - + $stmtarray = array( "drop table edit_tab", "create table edit_tab (name varchar2(10),age number,job varchar2(50), salary number)", @@ -73,7 +73,7 @@ select_fn($conn); // Create a different version of view_ed in MYEDITION1. set_edit_attr('MYEDITION1'); -$conn2 = oci_new_connect($testuser,$testpassword,$dbase); +$conn2 = oci_new_connect($testuser,$testpassword,$dbase); $stmt = "create or replace editioning view view_ed as select name,age,job,salary from edit_tab"; $s = oci_parse($conn2, $stmt); oci_execute($s); @@ -83,7 +83,7 @@ get_edit_attr($conn2); select_fn($conn2); // Verify the contents in MYEDITION EDITION. -echo "version of view_ed in MYEDITION \n"; +echo "version of view_ed in MYEDITION\n"; get_edit_attr($conn); select_fn($conn); @@ -135,7 +135,7 @@ array(4) { [3]=> string(%d) "100" } -version of view_ed in MYEDITION +version of view_ed in MYEDITION The value of current EDITION is MYEDITION array(3) { [0]=> diff --git a/ext/oci8/tests/edition_2.phpt b/ext/oci8/tests/edition_2.phpt index 12e902667e6..9ec5f4b96de 100644 --- a/ext/oci8/tests/edition_2.phpt +++ b/ext/oci8/tests/edition_2.phpt @@ -2,14 +2,14 @@ Set and check Oracle 11gR2 "edition" attribute --SKIPIF-- = 2) || ($matches[1] >= 12) ))) { @@ -33,7 +33,7 @@ if (!(isset($matches[0]) && */ $testuser = 'testuser_ed_2'; // Used in conn_attr.inc -$testpassword = 'testuser'; +$testpassword = 'testuser'; require(dirname(__FILE__)."/conn_attr.inc"); @@ -92,7 +92,7 @@ foreach ($values_array as $val ) { if ($c1) { get_edit_attr($c1); oci_close($c1); - } + } } echo "\n\n**Test 1.5 - Negative case with an invalid string value. *********\n"; @@ -113,7 +113,7 @@ echo "\n\n**Test 1.7 - Test with ALTER SESSION statement to change the edition * set_edit_attr('MYEDITION'); $c1 = get_conn(3); -echo "get the value set to MYEDITION with oci_set_edition \n"; +echo "get the value set to MYEDITION with oci_set_edition\n"; get_edit_attr($c1); $alter_stmt = "alter session set edition = MYEDITION1"; @@ -123,7 +123,7 @@ oci_commit($c1); echo "Get the value set to MYEDITION1 with alter session\n"; get_edit_attr($c1); -echo " Get the value with a new connection \n"; +echo " Get the value with a new connection\n"; $c2 = get_conn(1); get_edit_attr($c2); @@ -131,7 +131,7 @@ echo " Set the value back using oci-set_edition\n"; set_edit_attr('MYEDITION'); get_edit_attr($c2); -echo " Get the value with a new conenction \n"; +echo " Get the value with a new conenction\n"; $c3 = get_conn(1); get_edit_attr($c3); @@ -225,17 +225,17 @@ The value of current EDITION is MYEDITION1 **Test 1.7 - Test with ALTER SESSION statement to change the edition ******* The value of edition has been successfully set Testing with oci_new_connect() -get the value set to MYEDITION with oci_set_edition +get the value set to MYEDITION with oci_set_edition The value of current EDITION is MYEDITION Get the value set to MYEDITION1 with alter session The value of current EDITION is MYEDITION1 - Get the value with a new connection + Get the value with a new connection Testing with oci_connect() The value of current EDITION is MYEDITION Set the value back using oci-set_edition The value of edition has been successfully set The value of current EDITION is MYEDITION - Get the value with a new conenction + Get the value with a new conenction Testing with oci_connect() The value of current EDITION is MYEDITION diff --git a/ext/oci8/tests/error.phpt b/ext/oci8/tests/error.phpt index 7fedd0ddad6..c3fb2de6640 100644 --- a/ext/oci8/tests/error.phpt +++ b/ext/oci8/tests/error.phpt @@ -4,7 +4,7 @@ oci_error() error message for parsing error true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); diff --git a/ext/oci8/tests/error3.phpt b/ext/oci8/tests/error3.phpt index 8540db250a5..29650439e2b 100644 --- a/ext/oci8/tests/error3.phpt +++ b/ext/oci8/tests/error3.phpt @@ -1,7 +1,7 @@ --TEST-- Maximum Oracle error length --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); // Assume runtime client version is >= compile time client version @@ -21,11 +21,11 @@ echo "Test 1\n"; error_reporting(E_ALL); -$s = oci_parse($c, "declare -s varchar2(4000); -begin +$s = oci_parse($c, "declare +s varchar2(4000); +begin s := 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBabcdefghBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC'; -raise_application_error(-20333, s); +raise_application_error(-20333, s); end;"); oci_execute($s); diff --git a/ext/oci8/tests/error_bind.phpt b/ext/oci8/tests/error_bind.phpt index 6ee26ee8250..0b039a16d96 100644 --- a/ext/oci8/tests/error_bind.phpt +++ b/ext/oci8/tests/error_bind.phpt @@ -23,7 +23,7 @@ $stmt = oci_parse($c, "insert into bind_test values (:name)"); oci_bind_by_name($stmt, ":name", $name, 10, SQLT_CHR); var_dump(oci_execute($stmt)); -echo "Test 1 - Assign a resource to the bind variable and execute \n"; +echo "Test 1 - Assign a resource to the bind variable and execute\n"; $name=$c; var_dump(oci_execute($stmt)); @@ -50,7 +50,7 @@ echo "Done\n"; --EXPECTF-- Insert value bool(true) -Test 1 - Assign a resource to the bind variable and execute +Test 1 - Assign a resource to the bind variable and execute Warning: oci_execute(): Invalid variable used for bind in %s on line %d bool(false) diff --git a/ext/oci8/tests/error_bind_2.phpt b/ext/oci8/tests/error_bind_2.phpt index 642716887ea..592702b9319 100644 --- a/ext/oci8/tests/error_bind_2.phpt +++ b/ext/oci8/tests/error_bind_2.phpt @@ -1,8 +1,8 @@ --TEST-- Test some more oci_bind_by_name error conditions --SKIPIF-- - true, 'timesten' => true); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/error_bind_3.phpt b/ext/oci8/tests/error_bind_3.phpt index 7522dfe60a5..47ca71dcd13 100644 --- a/ext/oci8/tests/error_bind_3.phpt +++ b/ext/oci8/tests/error_bind_3.phpt @@ -1,8 +1,8 @@ --TEST-- Test some more oci_bind_by_name error conditions --SKIPIF-- - true, 'timesten' => true); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/error_old.phpt b/ext/oci8/tests/error_old.phpt index c6f9cd300d3..8df1ee5df2f 100644 --- a/ext/oci8/tests/error_old.phpt +++ b/ext/oci8/tests/error_old.phpt @@ -4,7 +4,7 @@ ocierror() true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECTF-- +--EXPECTF-- Warning: oci_execute(): ORA-00942: %s in %s on line %d bool(false) diff --git a/ext/oci8/tests/execute_mode.phpt b/ext/oci8/tests/execute_mode.phpt index 90570cae80a..ffa97f0f2fe 100644 --- a/ext/oci8/tests/execute_mode.phpt +++ b/ext/oci8/tests/execute_mode.phpt @@ -14,6 +14,6 @@ oci_execute($stmt, -1); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_execute(): Invalid execute mode given: -1 in %s on line %d Done diff --git a/ext/oci8/tests/fetch.phpt b/ext/oci8/tests/fetch.phpt index 6fdec313f18..a2906034874 100644 --- a/ext/oci8/tests/fetch.phpt +++ b/ext/oci8/tests/fetch.phpt @@ -43,7 +43,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/fetch_all1.phpt b/ext/oci8/tests/fetch_all1.phpt index 00e747cc357..20afe5967cd 100644 --- a/ext/oci8/tests/fetch_all1.phpt +++ b/ext/oci8/tests/fetch_all1.phpt @@ -45,7 +45,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/fetch_all2.phpt b/ext/oci8/tests/fetch_all2.phpt index 483e51573d3..ca43348c2b4 100644 --- a/ext/oci8/tests/fetch_all2.phpt +++ b/ext/oci8/tests/fetch_all2.phpt @@ -1,10 +1,10 @@ --TEST-- -oci_fetch_all() - 2 +oci_fetch_all() - 2 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- --EXPECT-- diff --git a/ext/oci8/tests/fetch_all3.phpt b/ext/oci8/tests/fetch_all3.phpt index de35c017c94..728dc7e3ebc 100644 --- a/ext/oci8/tests/fetch_all3.phpt +++ b/ext/oci8/tests/fetch_all3.phpt @@ -122,7 +122,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/fetch_array.phpt b/ext/oci8/tests/fetch_array.phpt index db5c6c554b9..9b67f27e8f5 100644 --- a/ext/oci8/tests/fetch_array.phpt +++ b/ext/oci8/tests/fetch_array.phpt @@ -4,7 +4,7 @@ oci_fetch_array() true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- --EXPECT-- diff --git a/ext/oci8/tests/fetch_into1.phpt b/ext/oci8/tests/fetch_into1.phpt index 8f7a6bdeb86..68e5f9cfaec 100644 --- a/ext/oci8/tests/fetch_into1.phpt +++ b/ext/oci8/tests/fetch_into1.phpt @@ -4,7 +4,7 @@ various ocifetchinto() tests true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- --EXPECT-- diff --git a/ext/oci8/tests/fetch_into2.phpt b/ext/oci8/tests/fetch_into2.phpt index 7bef2c08211..2d725415807 100644 --- a/ext/oci8/tests/fetch_into2.phpt +++ b/ext/oci8/tests/fetch_into2.phpt @@ -4,7 +4,7 @@ ocifetchinto() & wrong number of params true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- --EXPECTF-- diff --git a/ext/oci8/tests/fetch_object.phpt b/ext/oci8/tests/fetch_object.phpt index 73711baa188..bd49c5ed472 100644 --- a/ext/oci8/tests/fetch_object.phpt +++ b/ext/oci8/tests/fetch_object.phpt @@ -4,7 +4,7 @@ oci_fetch_object() true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_2.phpt b/ext/oci8/tests/imp_res_2.phpt index 16dff5fc665..567cefb2bae 100644 --- a/ext/oci8/tests/imp_res_2.phpt +++ b/ext/oci8/tests/imp_res_2.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: Zero Rows --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_3.phpt b/ext/oci8/tests/imp_res_3.phpt index 9f1cb07829f..965edb12240 100644 --- a/ext/oci8/tests/imp_res_3.phpt +++ b/ext/oci8/tests/imp_res_3.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: bigger data size --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_4.phpt b/ext/oci8/tests/imp_res_4.phpt index 762ae772249..d938f9f4cea 100644 --- a/ext/oci8/tests/imp_res_4.phpt +++ b/ext/oci8/tests/imp_res_4.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_fetch --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_5.phpt b/ext/oci8/tests/imp_res_5.phpt index 564a7a37404..7c06dee78f4 100644 --- a/ext/oci8/tests/imp_res_5.phpt +++ b/ext/oci8/tests/imp_res_5.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_fetch_all --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_6.phpt b/ext/oci8/tests/imp_res_6.phpt index f94efe70db9..278c47b3118 100644 --- a/ext/oci8/tests/imp_res_6.phpt +++ b/ext/oci8/tests/imp_res_6.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: alternating oci_fetch_* calls --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_7.phpt b/ext/oci8/tests/imp_res_7.phpt index c1babc94557..8502ab2488b 100644 --- a/ext/oci8/tests/imp_res_7.phpt +++ b/ext/oci8/tests/imp_res_7.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: bigger data size --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_call_error.phpt b/ext/oci8/tests/imp_res_call_error.phpt index bae2c47e9ef..774131ee00c 100644 --- a/ext/oci8/tests/imp_res_call_error.phpt +++ b/ext/oci8/tests/imp_res_call_error.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: using SQL 'CALL' --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_cancel.phpt b/ext/oci8/tests/imp_res_cancel.phpt index 578dc7f49ff..7c503c3cb98 100644 --- a/ext/oci8/tests/imp_res_cancel.phpt +++ b/ext/oci8/tests/imp_res_cancel.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_cancel --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_close.phpt b/ext/oci8/tests/imp_res_close.phpt index f01205dc48e..de85a3d1ca9 100644 --- a/ext/oci8/tests/imp_res_close.phpt +++ b/ext/oci8/tests/imp_res_close.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_free_statement #1 --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_cursor.phpt b/ext/oci8/tests/imp_res_cursor.phpt index 6533ba0a042..57bdddeab20 100644 --- a/ext/oci8/tests/imp_res_cursor.phpt +++ b/ext/oci8/tests/imp_res_cursor.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: nested cursor --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_dbmsoutput.phpt b/ext/oci8/tests/imp_res_dbmsoutput.phpt index 188201f4258..cb6fae095f3 100644 --- a/ext/oci8/tests/imp_res_dbmsoutput.phpt +++ b/ext/oci8/tests/imp_res_dbmsoutput.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: interleaved with DBMS_OUTPUT --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_field.phpt b/ext/oci8/tests/imp_res_field.phpt index 1e82745967d..3d10e15dacf 100644 --- a/ext/oci8/tests/imp_res_field.phpt +++ b/ext/oci8/tests/imp_res_field.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: field tests --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_func_error.phpt b/ext/oci8/tests/imp_res_func_error.phpt index 73c0557930c..a5c7e84241d 100644 --- a/ext/oci8/tests/imp_res_func_error.phpt +++ b/ext/oci8/tests/imp_res_func_error.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: test with a PL/SQL function --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_get_1.phpt b/ext/oci8/tests/imp_res_get_1.phpt index ab82423e472..79ad8711ffc 100644 --- a/ext/oci8/tests/imp_res_get_1.phpt +++ b/ext/oci8/tests/imp_res_get_1.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: basic test --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_get_2.phpt b/ext/oci8/tests/imp_res_get_2.phpt index 0eafa00aa52..3ed3036f6ba 100644 --- a/ext/oci8/tests/imp_res_get_2.phpt +++ b/ext/oci8/tests/imp_res_get_2.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: similar to imp_res_get_1 but with unrolled loop --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_get_3.phpt b/ext/oci8/tests/imp_res_get_3.phpt index 393ff2fb0fb..f0f0b164da4 100644 --- a/ext/oci8/tests/imp_res_get_3.phpt +++ b/ext/oci8/tests/imp_res_get_3.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: basic test 3 --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_get_4.phpt b/ext/oci8/tests/imp_res_get_4.phpt index ea7fb8775a7..658ec9c050e 100644 --- a/ext/oci8/tests/imp_res_get_4.phpt +++ b/ext/oci8/tests/imp_res_get_4.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: interleaved fetches --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_get_5.phpt b/ext/oci8/tests/imp_res_get_5.phpt index faaed0b18e2..eabc7867e98 100644 --- a/ext/oci8/tests/imp_res_get_5.phpt +++ b/ext/oci8/tests/imp_res_get_5.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: get from wrong statement --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> @@ -27,7 +27,7 @@ function print_row($row) echo "\n"; } -$plsql = +$plsql = "declare c1 sys_refcursor; begin diff --git a/ext/oci8/tests/imp_res_get_all.phpt b/ext/oci8/tests/imp_res_get_all.phpt index 92965130bce..98bb8c08d2b 100644 --- a/ext/oci8/tests/imp_res_get_all.phpt +++ b/ext/oci8/tests/imp_res_get_all.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_fetch_all --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_get_cancel.phpt b/ext/oci8/tests/imp_res_get_cancel.phpt index 5f668f6f01a..1ea6beaf606 100644 --- a/ext/oci8/tests/imp_res_get_cancel.phpt +++ b/ext/oci8/tests/imp_res_get_cancel.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_cancel --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> @@ -53,4 +53,4 @@ Test 1 1 3 ===DONE=== - + diff --git a/ext/oci8/tests/imp_res_get_close_1.phpt b/ext/oci8/tests/imp_res_get_close_1.phpt index 0e3b3b0c13d..20f46b4f1cf 100644 --- a/ext/oci8/tests/imp_res_get_close_1.phpt +++ b/ext/oci8/tests/imp_res_get_close_1.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_free_statement #1 --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> @@ -21,7 +21,7 @@ require(dirname(__FILE__).'/connect.inc'); // Initialization -$plsql = +$plsql = "declare c1 sys_refcursor; begin diff --git a/ext/oci8/tests/imp_res_get_close_2.phpt b/ext/oci8/tests/imp_res_get_close_2.phpt index 419a4f4f053..efc0e6da607 100644 --- a/ext/oci8/tests/imp_res_get_close_2.phpt +++ b/ext/oci8/tests/imp_res_get_close_2.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_free_statement #2 --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_get_close_3.phpt b/ext/oci8/tests/imp_res_get_close_3.phpt index bdd352154b3..d57644c924b 100644 --- a/ext/oci8/tests/imp_res_get_close_3.phpt +++ b/ext/oci8/tests/imp_res_get_close_3.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_free_statement #3 --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_get_cursor.phpt b/ext/oci8/tests/imp_res_get_cursor.phpt index ce44b00a332..417c1124196 100644 --- a/ext/oci8/tests/imp_res_get_cursor.phpt +++ b/ext/oci8/tests/imp_res_get_cursor.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: nested cursor --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_get_dbmsoutput.phpt b/ext/oci8/tests/imp_res_get_dbmsoutput.phpt index b89d399ab45..32732163d85 100644 --- a/ext/oci8/tests/imp_res_get_dbmsoutput.phpt +++ b/ext/oci8/tests/imp_res_get_dbmsoutput.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: interleaved with DBMS_OUTPUT --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> @@ -153,4 +153,4 @@ array(3) { string(6) "Line 3" } ===DONE=== - + diff --git a/ext/oci8/tests/imp_res_get_exec.phpt b/ext/oci8/tests/imp_res_get_exec.phpt index 82548d42d45..6f5a503ec3b 100644 --- a/ext/oci8/tests/imp_res_get_exec.phpt +++ b/ext/oci8/tests/imp_res_get_exec.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: Execute twice --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_get_none.phpt b/ext/oci8/tests/imp_res_get_none.phpt index e925f8ca991..73d2913884f 100644 --- a/ext/oci8/tests/imp_res_get_none.phpt +++ b/ext/oci8/tests/imp_res_get_none.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: no implicit results --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_insert.phpt b/ext/oci8/tests/imp_res_insert.phpt index 107a2c4adcb..317d4def66f 100644 --- a/ext/oci8/tests/imp_res_insert.phpt +++ b/ext/oci8/tests/imp_res_insert.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: Commit modes --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/imp_res_lob.phpt b/ext/oci8/tests/imp_res_lob.phpt index 7e4aaadd92d..16f0701e72c 100644 --- a/ext/oci8/tests/imp_res_lob.phpt +++ b/ext/oci8/tests/imp_res_lob.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: LOBs --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> @@ -35,7 +35,7 @@ $stmtarray = array( open c1 for select * from imp_res_lob_tab order by 1; dbms_sql.return_result(c1); open c1 for select * from dual; - dbms_sql.return_result(c1); + dbms_sql.return_result(c1); open c1 for select c2 from imp_res_lob_tab order by c1; dbms_sql.return_result(c1); end;" @@ -50,7 +50,7 @@ $s = oci_parse($c, "begin imp_res_lob_proc(); end;"); oci_execute($s); while (($row = oci_fetch_row($s)) != false) { foreach ($row as $item) { - if (is_object($item)) { + if (is_object($item)) { echo " " . $item->load(); } else { echo " " . $item; @@ -64,7 +64,7 @@ $s = oci_parse($c, "begin imp_res_lob_proc(); end;"); oci_execute($s); $row = oci_fetch_row($s); foreach ($row as $item) { - if (is_object($item)) { + if (is_object($item)) { echo " " . $item->load(); } else { echo " " . $item; diff --git a/ext/oci8/tests/imp_res_prefetch.phpt b/ext/oci8/tests/imp_res_prefetch.phpt index 4a1b1e0a458..c00e4be2979 100644 --- a/ext/oci8/tests/imp_res_prefetch.phpt +++ b/ext/oci8/tests/imp_res_prefetch.phpt @@ -1,8 +1,8 @@ --TEST-- Oracle Database 12c Implicit Result Sets: basic test --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); @@ -10,7 +10,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); } preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 12)) { +if (!(isset($matches[0]) && $matches[0] >= 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/ini_1.phpt b/ext/oci8/tests/ini_1.phpt index f11e7821950..9c9b378e7bb 100644 --- a/ext/oci8/tests/ini_1.phpt +++ b/ext/oci8/tests/ini_1.phpt @@ -1,10 +1,10 @@ --TEST-- Test OCI8 php.ini settings --SKIPIF-- -= 11)) { +if (!(isset($matches[0]) && $matches[0] >= 11)) { die("skip works only with Oracle 11g or greater version of Oracle client libraries"); } ?> diff --git a/ext/oci8/tests/lob_001.phpt b/ext/oci8/tests/lob_001.phpt index cb94bfae132..432239d1299 100644 Binary files a/ext/oci8/tests/lob_001.phpt and b/ext/oci8/tests/lob_001.phpt differ diff --git a/ext/oci8/tests/lob_002.phpt b/ext/oci8/tests/lob_002.phpt index bb377a90d86..188f83ddd38 100644 --- a/ext/oci8/tests/lob_002.phpt +++ b/ext/oci8/tests/lob_002.phpt @@ -4,7 +4,7 @@ oci_lob_write() and friends (with errors) true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- = 0; $i--) { $row = oci_fetch_array($s); var_dump($row['BLOB']->load()); var_dump($row['BLOB']->truncate(($i-1)*10)); - + oci_commit($c); } diff --git a/ext/oci8/tests/lob_028.phpt b/ext/oci8/tests/lob_028.phpt index 8da7a8af8ff..e48d33fff12 100644 --- a/ext/oci8/tests/lob_028.phpt +++ b/ext/oci8/tests/lob_028.phpt @@ -4,7 +4,7 @@ Test descriptor types for oci_new_descriptor() true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- ---EXPECT-- +--EXPECT-- Test 1. Check how many rows in the table array(1) { ["NUMROWS"]=> diff --git a/ext/oci8/tests/lob_030.phpt b/ext/oci8/tests/lob_030.phpt index ec7ff750665..014d40a2a58 100644 --- a/ext/oci8/tests/lob_030.phpt +++ b/ext/oci8/tests/lob_030.phpt @@ -4,7 +4,7 @@ Test piecewise fetch of CLOBs equal to, and larger than PHP_OCI_LOB_BUFFER_SIZE true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- read(), LOB->seek() and LOB->tell() with nul bytes in data true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- write() for multiple inserts true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- tell() . "\n"; echo "Data: " . $row[$i][0]->read(12) . "\n"; } - + echo "Done\n"; ?> diff --git a/ext/oci8/tests/lob_041.phpt b/ext/oci8/tests/lob_041.phpt index c5c0a209f3c..944952982fb 100644 --- a/ext/oci8/tests/lob_041.phpt +++ b/ext/oci8/tests/lob_041.phpt @@ -4,7 +4,7 @@ Check LOBS are valid after statement free true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- import("does_not_exist")); var_dump($blob->saveFile("does_not_exist")); require(dirname(__FILE__).'/drop_table.inc'); - + echo "Done\n"; - + ?> --EXPECTF-- object(OCI-Lob)#%d (1) { diff --git a/ext/oci8/tests/lob_043.phpt b/ext/oci8/tests/lob_043.phpt index 7f0d233e076..b4ac8d240b1 100644 --- a/ext/oci8/tests/lob_043.phpt +++ b/ext/oci8/tests/lob_043.phpt @@ -16,7 +16,7 @@ require(dirname(__FILE__).'/connect.inc'); $stmtarray = array( "drop table lob_043_tab", "create table lob_043_tab(id number, c1 clob)", - "begin + "begin for i in 1..50000 loop insert into lob_043_tab (id, c1) values (i, i || ' abcdefghijklmnopq'); end loop; diff --git a/ext/oci8/tests/lob_044.phpt b/ext/oci8/tests/lob_044.phpt index 6adbb6fa64a..4ed661c0e61 100644 --- a/ext/oci8/tests/lob_044.phpt +++ b/ext/oci8/tests/lob_044.phpt @@ -4,10 +4,10 @@ oci_lob_truncate() with default parameter value true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- close(); } @@ -57,7 +57,7 @@ $r = @oci_execute($s); if (!$r) { $m = oci_error($s); echo $m['message'], "\n"; -} +} else { $lob->close(); } @@ -71,7 +71,7 @@ $r = @oci_execute($s); if (!$r) { $m = oci_error($s); echo $m['message'], "\n"; -} +} else { $lob->close(); } @@ -87,7 +87,7 @@ $r = @oci_execute($s); if (!$r) { $m = oci_error($s); echo $m['message'], "\n"; -} +} else { $lob->close(); } @@ -101,7 +101,7 @@ $r = @oci_execute($s); if (!$r) { $m = oci_error($s); echo $m['message'], "\n"; -} +} else { $lob->close(); } @@ -115,7 +115,7 @@ $r = @oci_execute($s); if (!$r) { $m = oci_error($s); echo $m['message'], "\n"; -} +} else { $lob->close(); } @@ -188,7 +188,7 @@ $s = oci_parse($c, 'drop table lob_null_tab'); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- Temporary CLOB: NULL Temporary CLOB: '' Temporary CLOB: text @@ -265,4 +265,4 @@ Fetch via the procedure parameter 7 is an object: string(0) "" 8 is an object: string(0) "" 9 is an object: string(28) "Inserted with RETURNING INTO" -Done \ No newline at end of file +Done diff --git a/ext/oci8/tests/lob_temp.phpt b/ext/oci8/tests/lob_temp.phpt index d43a8c9f439..59db20fc130 100644 --- a/ext/oci8/tests/lob_temp.phpt +++ b/ext/oci8/tests/lob_temp.phpt @@ -4,10 +4,10 @@ temporary lobs true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --INI-- display_errors = On error_reporting = E_WARNING @@ -28,7 +28,7 @@ $s = oci_parse($c, "select * from dual where :bv = 1"); $bv = 1; oci_bind_by_name($s, ":bv\0:bv", $bv); oci_execute($s); - + ?> ===DONE=== diff --git a/ext/oci8/tests/oci_execute_segfault.phpt b/ext/oci8/tests/oci_execute_segfault.phpt index 59eb8013e9a..08a41a82eca 100644 --- a/ext/oci8/tests/oci_execute_segfault.phpt +++ b/ext/oci8/tests/oci_execute_segfault.phpt @@ -4,7 +4,7 @@ oci_execute() segfault after repeated bind of LOB descriptor true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- --FILE-- @@ -35,7 +35,7 @@ var_dump($c2); $rn2 = (int)$c2; // Despite using the old password this connect should succeed and return the original resource -$c3 = oci_connect("testuser_pw", "testuserpwd", $dbase); +$c3 = oci_connect("testuser_pw", "testuserpwd", $dbase); var_dump($c3); $rn3 = (int)$c3; diff --git a/ext/oci8/tests/password_2.phpt b/ext/oci8/tests/password_2.phpt index 13da9ff7b26..62fddb4c362 100644 --- a/ext/oci8/tests/password_2.phpt +++ b/ext/oci8/tests/password_2.phpt @@ -1,11 +1,11 @@ --TEST-- oci_password_change() for persistent connections --SKIPIF-- - --FILE-- @@ -34,7 +34,7 @@ var_dump($c2); $rn2 = (int)$c2; // Despite using the old password this connect should succeed and return the original resource -$c3 = oci_pconnect("testuser_pw2", "testuserpwd", $dbase); +$c3 = oci_pconnect("testuser_pw2", "testuserpwd", $dbase); var_dump($c3); $rn3 = (int)$c3; diff --git a/ext/oci8/tests/pecl_bug10194.phpt b/ext/oci8/tests/pecl_bug10194.phpt index 3c1c7887c2f..9ec102ad0d1 100644 --- a/ext/oci8/tests/pecl_bug10194.phpt +++ b/ext/oci8/tests/pecl_bug10194.phpt @@ -1,5 +1,5 @@ --TEST-- -PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside the callback) +PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside the callback) --SKIPIF-- true, 'timesten' => false); // test runs on these DBs @@ -8,12 +8,12 @@ if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (getenv("USE_ZEND_ALLOC") === "0") { die("skip Zend MM disabled"); } -?> +?> --INI-- memory_limit=10M --FILE-- ---EXPECTF-- +--EXPECTF-- Fatal error: Allowed memory size of 10485760 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d diff --git a/ext/oci8/tests/pecl_bug10194_blob.phpt b/ext/oci8/tests/pecl_bug10194_blob.phpt index 96f94bcf4c1..aab1cf88821 100644 --- a/ext/oci8/tests/pecl_bug10194_blob.phpt +++ b/ext/oci8/tests/pecl_bug10194_blob.phpt @@ -1,5 +1,5 @@ --TEST-- -PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside the callback) +PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside the callback) --SKIPIF-- true, 'timesten' => false); // test runs on these DBs @@ -9,14 +9,14 @@ if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (getenv("USE_ZEND_ALLOC") === "0") { die("skip Zend MM disabled"); } -?> +?> --INI-- memory_limit=3M --FILE-- ---EXPECTF-- +--EXPECTF-- Before load() Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d diff --git a/ext/oci8/tests/pecl_bug10194_blob_64.phpt b/ext/oci8/tests/pecl_bug10194_blob_64.phpt index e1a4cc034e2..ca5e568be37 100644 --- a/ext/oci8/tests/pecl_bug10194_blob_64.phpt +++ b/ext/oci8/tests/pecl_bug10194_blob_64.phpt @@ -1,7 +1,7 @@ --TEST-- -PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside the callback) +PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside the callback) --SKIPIF-- - true, 'timesten' => false); // test runs on thes require(dirname(__FILE__).'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); @@ -16,7 +16,7 @@ memory_limit=6M ---EXPECTF-- +--EXPECTF-- Before load() Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d diff --git a/ext/oci8/tests/pecl_bug16035.phpt b/ext/oci8/tests/pecl_bug16035.phpt index 29ff6439d1c..d557e0a5c03 100644 --- a/ext/oci8/tests/pecl_bug16035.phpt +++ b/ext/oci8/tests/pecl_bug16035.phpt @@ -1,8 +1,8 @@ --TEST-- PECL Bug #16035 (Crash with Oracle 10.2 connecting with a character set but ORACLE_HOME is not set) --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --INI-- error_reporting = E_WARNING --FILE-- diff --git a/ext/oci8/tests/pecl_bug8816.phpt b/ext/oci8/tests/pecl_bug8816.phpt index 71771b21004..9e151f6a8c6 100644 --- a/ext/oci8/tests/pecl_bug8816.phpt +++ b/ext/oci8/tests/pecl_bug8816.phpt @@ -4,7 +4,7 @@ PECL Bug #8816 (issue in php_oci_statement_fetch with more than one piecewise co true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -?> +?> --FILE-- --FILE-- ---EXPECTF-- +--EXPECTF-- resource(%d) of type (oci8 persistent connection) resource(%d) of type (oci8 persistent connection) resource(%d) of type (oci8 persistent connection) diff --git a/ext/oci8/tests/prefetch_old.phpt b/ext/oci8/tests/prefetch_old.phpt index ac43771c6be..7f50993a648 100644 --- a/ext/oci8/tests/prefetch_old.phpt +++ b/ext/oci8/tests/prefetch_old.phpt @@ -46,7 +46,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/privileged_connect.phpt b/ext/oci8/tests/privileged_connect.phpt index 45e236178ec..cb19d739076 100644 --- a/ext/oci8/tests/privileged_connect.phpt +++ b/ext/oci8/tests/privileged_connect.phpt @@ -4,7 +4,7 @@ privileged connect tests --FILE-- ---EXPECTF-- +--EXPECTF-- Warning: oci_connect(): Privileged connect is disabled. Enable oci8.privileged_connect to be able to connect as SYSOPER or SYSDBA in %s on line %d Warning: oci_connect(): Privileged connect is disabled. Enable oci8.privileged_connect to be able to connect as SYSOPER or SYSDBA in %s on line %d Warning: oci_connect(): Invalid session mode specified (-1) in %s on line %d -Warning: oci_connect() expects parameter 5 to be int, string given in %s on line %d +Warning: oci_connect() expects parameter 5 to be int%s string given in %s on line %d Done diff --git a/ext/oci8/tests/privileged_connect1.phpt b/ext/oci8/tests/privileged_connect1.phpt index 849505b7228..a4b8b76ba7d 100644 --- a/ext/oci8/tests/privileged_connect1.phpt +++ b/ext/oci8/tests/privileged_connect1.phpt @@ -6,7 +6,7 @@ privileged connect tests oci8.privileged_connect=1 --FILE-- ---EXPECTF-- +--EXPECTF-- Warning: oci_connect(): ORA-%d: %s in %s on line %d Warning: oci_connect(): ORA-%d: %s in %s on line %d Warning: oci_connect(): Invalid session mode specified (-1) in %s on line %d -Warning: oci_connect() expects parameter 5 to be int, string given in %s on line %d +Warning: oci_connect() expects parameter 5 to be int%s string given in %s on line %d Done diff --git a/ext/oci8/tests/refcur_prefetch_1.phpt b/ext/oci8/tests/refcur_prefetch_1.phpt index c7e200932ae..97fc7dce20e 100644 --- a/ext/oci8/tests/refcur_prefetch_1.phpt +++ b/ext/oci8/tests/refcur_prefetch_1.phpt @@ -5,7 +5,7 @@ Prefetch with REF cursor. Test different values for prefetch with oci_set_prefet if (!extension_loaded('oci8')) die("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); -if (!(isset($matches[0]) && +if (!(isset($matches[0]) && ($matches[1] >= 10))) { die("skip expected output only valid when using Oracle 10g or greater database server"); } @@ -21,7 +21,7 @@ if (!(isset($matches[0]) && = 10))) { die("skip expected output only valid when using Oracle 10g or greater database server"); } @@ -21,7 +21,7 @@ if (!(isset($matches[0]) && = 2) || ($matches[1] >= 12) ))) { @@ -57,7 +57,7 @@ oci_execute($s); $data = oci_fetch_array($s); oci_execute($data['CURS1']); -// Calculate round-trips +// Calculate round-trips $initial_rt = print_roundtrips($c); for ($i = 0;$i<10;$i++) { echo "Fetch Row using Nested cursor Query\n"; diff --git a/ext/oci8/tests/refcur_prefetch_4.phpt b/ext/oci8/tests/refcur_prefetch_4.phpt index 131ae6ad6b0..8ec4c983a30 100644 --- a/ext/oci8/tests/refcur_prefetch_4.phpt +++ b/ext/oci8/tests/refcur_prefetch_4.phpt @@ -5,7 +5,7 @@ Prefetch with REF cursor. Test No 4 if (!extension_loaded('oci8')) die("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); -if (!(isset($matches[0]) && +if (!(isset($matches[0]) && ($matches[1] >= 10))) { die("skip expected output only valid when using Oracle 10g or greater database server"); } @@ -21,7 +21,7 @@ if (!(isset($matches[0]) && ---EXPECTF-- +--EXPECTF-- array(2) { [0]=> NULL diff --git a/ext/oci8/tests/serverversion.phpt b/ext/oci8/tests/serverversion.phpt index 6cbb5aaad00..1c4b7d7d268 100644 --- a/ext/oci8/tests/serverversion.phpt +++ b/ext/oci8/tests/serverversion.phpt @@ -13,7 +13,7 @@ if (!empty($dbase)) { else { var_dump($c = oci_connect($user, $password)); } - + $v = oci_server_version($c); var_dump(str_replace("\n", "", $v)); diff --git a/ext/oci8/tests/statement_cache.phpt b/ext/oci8/tests/statement_cache.phpt index 4c48d3f1dde..8ab9ddc8c10 100644 --- a/ext/oci8/tests/statement_cache.phpt +++ b/ext/oci8/tests/statement_cache.phpt @@ -1,7 +1,7 @@ --TEST-- statement cache --SKIPIF-- - true, 'timesten' => true); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); ?> @@ -24,7 +24,7 @@ var_dump(oci_fetch_array($stmt)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- array(2) { [0]=> string(1) "4" diff --git a/ext/oci8/tests/uncommitted.phpt b/ext/oci8/tests/uncommitted.phpt index a779bba3408..cb90e4a5143 100644 --- a/ext/oci8/tests/uncommitted.phpt +++ b/ext/oci8/tests/uncommitted.phpt @@ -4,7 +4,7 @@ uncommitted connection --FILE-- ---EXPECT-- +--EXPECT-- Done diff --git a/ext/oci8/tests/xmltype_01.phpt b/ext/oci8/tests/xmltype_01.phpt index 1855ed08873..8fb6206f26d 100644 --- a/ext/oci8/tests/xmltype_01.phpt +++ b/ext/oci8/tests/xmltype_01.phpt @@ -1,7 +1,7 @@ --TEST-- Basic XMLType test --SKIPIF-- - true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); diff --git a/ext/oci8/tests/xmltype_02.phpt b/ext/oci8/tests/xmltype_02.phpt index 9a17f5db180..a21e5e47ef0 100644 --- a/ext/oci8/tests/xmltype_02.phpt +++ b/ext/oci8/tests/xmltype_02.phpt @@ -5,7 +5,7 @@ Basic XMLType test #2 $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (!extension_loaded("simplexml")) die ("skip no simplexml extension"); -?> +?> --FILE-- +--FILE-- + +--EXPECT-- +int(0) +int(0) +int(0) +int(0) + diff --git a/ext/pdo_sqlite/config.m4 b/ext/pdo_sqlite/config.m4 index fcaef27eecb..b5aa342eaf5 100644 --- a/ext/pdo_sqlite/config.m4 +++ b/ext/pdo_sqlite/config.m4 @@ -102,7 +102,6 @@ if test "$PHP_PDO_SQLITE" != "no"; then PHP_ADD_INCLUDE($abs_srcdir/ext/sqlite3/libsqlite) AC_CHECK_FUNCS(usleep nanosleep) - AC_CHECK_HEADERS(time.h) fi dnl Solaris fix diff --git a/ext/pgsql/tests/29nb_async_connect.phpt b/ext/pgsql/tests/29nb_async_connect.phpt old mode 100755 new mode 100644 diff --git a/ext/pgsql/tests/30nb_async_query_params.phpt b/ext/pgsql/tests/30nb_async_query_params.phpt old mode 100755 new mode 100644 diff --git a/ext/pgsql/tests/31nb_async_query_prepared.phpt b/ext/pgsql/tests/31nb_async_query_prepared.phpt old mode 100755 new mode 100644 diff --git a/ext/phar/tests/bug70433.zip b/ext/phar/tests/bug70433.zip old mode 100755 new mode 100644 diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 0a073420e39..c82e29702a2 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -75,29 +75,28 @@ PHPAPI zend_class_entry *reflection_extension_ptr; PHPAPI zend_class_entry *reflection_zend_extension_ptr; /* Exception throwing macro */ -#define _DO_THROW(msg) \ - zend_throw_exception(reflection_exception_ptr, msg, 0); \ - return; \ +#define _DO_THROW(msg) \ + zend_throw_exception(reflection_exception_ptr, msg, 0); \ + return; -#define RETURN_ON_EXCEPTION \ - if (EG(exception) && EG(exception)->ce == reflection_exception_ptr) { \ - return; \ - } +#define GET_REFLECTION_OBJECT() do { \ + intern = Z_REFLECTION_P(getThis()); \ + if (intern->ptr == NULL) { \ + if (EG(exception) && EG(exception)->ce == reflection_exception_ptr) { \ + return; \ + } \ + zend_throw_error(NULL, "Internal error: Failed to retrieve the reflection object"); \ + return; \ + } \ +} while (0) -#define GET_REFLECTION_OBJECT() \ - intern = Z_REFLECTION_P(getThis()); \ - if (intern->ptr == NULL) { \ - RETURN_ON_EXCEPTION \ - zend_throw_error(NULL, "Internal error: Failed to retrieve the reflection object"); \ - return; \ - } \ - -#define GET_REFLECTION_OBJECT_PTR(target) \ - GET_REFLECTION_OBJECT() \ - target = intern->ptr; \ +#define GET_REFLECTION_OBJECT_PTR(target) do { \ + GET_REFLECTION_OBJECT(); \ + target = intern->ptr; \ +} while (0) /* Class constants */ -#define REGISTER_REFLECTION_CLASS_CONST_LONG(class_name, const_name, value) \ +#define REGISTER_REFLECTION_CLASS_CONST_LONG(class_name, const_name, value) \ zend_declare_class_constant_long(reflection_ ## class_name ## _ptr, const_name, sizeof(const_name)-1, (zend_long)value); /* {{{ Object structure */ @@ -136,7 +135,6 @@ typedef enum { /* Struct for reflection objects */ typedef struct { - zval dummy; /* holder for the second property */ zval obj; void *ptr; zend_class_entry *ce; diff --git a/ext/session/mod_files.sh b/ext/session/mod_files.sh old mode 100644 new mode 100755 diff --git a/ext/simplexml/tests/000.xml b/ext/simplexml/tests/000.xml old mode 100755 new mode 100644 diff --git a/ext/simplexml/tests/sxe.dtd b/ext/simplexml/tests/sxe.dtd old mode 100755 new mode 100644 diff --git a/ext/simplexml/tests/sxe.ent b/ext/simplexml/tests/sxe.ent old mode 100755 new mode 100644 diff --git a/ext/simplexml/tests/sxe.xml b/ext/simplexml/tests/sxe.xml old mode 100755 new mode 100644 diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 41b704897c3..144851f2e6e 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -2158,16 +2158,6 @@ static void add_xml_array_elements(xmlNodePtr xmlParam, } } -static inline int array_num_elements(HashTable* ht) -{ - if (ht->nNumUsed && - Z_TYPE(ht->arData[ht->nNumUsed-1].val) != IS_UNDEF && - ht->arData[ht->nNumUsed-1].key == NULL) { - return ht->arData[ht->nNumUsed-1].h - 1; - } - return 0; -} - static xmlNodePtr to_xml_array(encodeTypePtr type, zval *data, int style, xmlNodePtr parent) { sdlTypePtr sdl_type = type->sdl_type; diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c index 2bb6f2f50bc..0035a70f94b 100644 --- a/ext/soap/php_xml.c +++ b/ext/soap/php_xml.c @@ -99,9 +99,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename) ctxt->sax->warning = NULL; ctxt->sax->error = NULL; /*ctxt->sax->fatalError = NULL;*/ -#if LIBXML_VERSION >= 20703 ctxt->options |= XML_PARSE_HUGE; -#endif old = php_libxml_disable_entity_loader(1); xmlParseDocument(ctxt); php_libxml_disable_entity_loader(old); @@ -148,9 +146,7 @@ xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size) ctxt->sax->warning = NULL; ctxt->sax->error = NULL; /*ctxt->sax->fatalError = NULL;*/ -#if LIBXML_VERSION >= 20703 ctxt->options |= XML_PARSE_HUGE; -#endif old = php_libxml_disable_entity_loader(1); xmlParseDocument(ctxt); php_libxml_disable_entity_loader(old); diff --git a/ext/soap/tests/bugs/bug32941.wsdl b/ext/soap/tests/bugs/bug32941.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug34453.wsdl b/ext/soap/tests/bugs/bug34453.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug34643.wsdl b/ext/soap/tests/bugs/bug34643.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug35142.wsdl b/ext/soap/tests/bugs/bug35142.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug36226-2.wsdl b/ext/soap/tests/bugs/bug36226-2.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug36575.wsdl b/ext/soap/tests/bugs/bug36575.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug36614.wsdl b/ext/soap/tests/bugs/bug36614.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug36908.wsdl b/ext/soap/tests/bugs/bug36908.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug36999.wsdl b/ext/soap/tests/bugs/bug36999.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug37013.wsdl b/ext/soap/tests/bugs/bug37013.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug37083.wsdl b/ext/soap/tests/bugs/bug37083.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug38004.wsdl b/ext/soap/tests/bugs/bug38004.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug38055.wsdl b/ext/soap/tests/bugs/bug38055.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug38067.wsdl b/ext/soap/tests/bugs/bug38067.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug38536.wsdl b/ext/soap/tests/bugs/bug38536.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug39832.wsdl b/ext/soap/tests/bugs/bug39832.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug40609.wsdl b/ext/soap/tests/bugs/bug40609.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug41004.wsdl b/ext/soap/tests/bugs/bug41004.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug41337.wsdl b/ext/soap/tests/bugs/bug41337.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug41337_2.wsdl b/ext/soap/tests/bugs/bug41337_2.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug41337_2_1.wsdl b/ext/soap/tests/bugs/bug41337_2_1.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug42086.wsdl b/ext/soap/tests/bugs/bug42086.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug42326.wsdl b/ext/soap/tests/bugs/bug42326.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug42359.wsdl b/ext/soap/tests/bugs/bug42359.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/bug42692.wsdl b/ext/soap/tests/bugs/bug42692.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/bugs/xml2.xsd b/ext/soap/tests/bugs/xml2.xsd old mode 100755 new mode 100644 diff --git a/ext/soap/tests/classmap003.wsdl b/ext/soap/tests/classmap003.wsdl old mode 100755 new mode 100644 diff --git a/ext/soap/tests/server025.wsdl b/ext/soap/tests/server025.wsdl old mode 100755 new mode 100644 diff --git a/ext/spl/README b/ext/spl/README index 28373a3eda5..f946f837f85 100644 --- a/ext/spl/README +++ b/ext/spl/README @@ -1,7 +1,7 @@ -This is an extension that aims to implement some efficient data access +This is an extension that aims to implement some efficient data access interfaces and classes. You'll find the classes documented using php -code in the file spl.php or in the corresponding .inc file in the examples -subdirectory. Based on the internal implementations or the files in the -examples subdirectory there are also some .php files to experiment with. +code in the corresponding .inc files in the examples subdirectory. Based +on the internal implementations or the files in the examples subdirectory +there are also some .php files to experiment with. For more information look at: http://php.net/manual/en/book.spl.php diff --git a/ext/spl/spl.php b/ext/spl/spl.php deleted file mode 100755 index adbcef6e8a1..00000000000 --- a/ext/spl/spl.php +++ /dev/null @@ -1,1160 +0,0 @@ -Introduction to Standard PHP Library (SPL) - * - Introducing PHP 5's Standard Library - * - Iterators in PHP5 - * - Advanced OOP with SPL in PHP 5 - * - The Standard PHP Library, Part 1 - * - The Standard PHP Library, Part 2 - * - Die Standard PHP Library (SPL) [german] - * - * 11) Talks on SPL: - * - SPL Update [pps], [pdf] - * - Happy SPLing [pps], [pdf] - * - From engine overloading to SPL [pps], [pdf] - * - SPL for the masses [pps], [pdf] - * - * 12) Debug sessions: - * - Debug session 1 [pps], [pdf] - * - Debug session 2 [pps], [pdf], [swf] - * - Debug session 3 [pps], [pdf] - * - * (c) Marcus Boerger, 2003 - 2007 - */ - -/** @defgroup ZendEngine Zend engine classes - * - * The classes and interfaces in this group are contained in the c-code of - * PHP's Zend engine. - */ - -/** @defgroup SPL Internal classes - * - * The classes and interfaces in this group are contained in the c-code of - * ext/SPL. - */ - -/** @defgroup Examples Example classes - * - * The classes and interfaces in this group are contained as PHP code in the - * examples subdirectory of ext/SPL. Sooner or later they will be moved to - * c-code. - */ - -/** @ingroup SPL - * @brief Default implementation for __autoload() - * @since PHP 5.1 - * - * @param class_name name of class to load - * @param file_extensions file extensions (use defaults if NULL) - */ -function spl_autoload(string $class_name, string $file_extensions = NULL) {/**/}; - -/** @ingroup SPL - * @brief Manual invocation of all registered autoload functions - * @since PHP 5.1 - * - * @param class_name name of class to load - */ -function spl_autoload_call(string $class_name) {/**/}; - -/** @ingroup SPL - * @brief Register and return default file extensions for spl_autoload - * @since PHP 5.1 - * - * @param file_extensions optional comma separated list of extensions to use in - * default autoload function. If not given just return the current list. - * @return comma separated list of file extensions to use in default autoload - * function. - */ -function spl_autoload_extensions($file_extensions) {/**/}; - -/** @ingroup SPL - * @brief Return all registered autoload functionns - * @since PHP 5.1 - * - * @return array of all registered autoload functions or false - */ -function spl_autoload_functions() {/**/}; - -/** @ingroup SPL - * @brief Register given function as autoload implementation - * @since PHP 5.1 - * - * @param autoload_function name of function or array of object/class and - * function name to register as autoload function. - * @param throw whether to throw or issue an error on failure. - */ -function spl_autoload_register(string $autoload_function = "spl_autoload", $throw = true) {/**/}; - -/** @ingroup SPL - * @brief Unregister given function as autoload implementation - * @since PHP 5.1 - * - * @param autoload_function name of function or array of object/class and - * function name to unregister as autoload function. - */ -function spl_autoload_unregister(string $autoload_function = "spl_autoload") {/**/}; - -/** @ingroup SPL - * @brief Return an array of classes and interfaces in SPL - * - * @return array containing the names of all clsses and interfaces defined in - * extension SPL - */ -function spl_classes() {/**/}; - -/** @ingroup SPL - * @brief Count the elements in an iterator - * @since PHP 5.1 - * - * @return number of elements in an iterator - */ -function iterator_count(Traversable $it) {/**/}; - -/** @ingroup SPL - * @brief Copy iterator elements into an array - * @since PHP 5.1 - * - * @param it iterator to copy - * @param use_keys whether touse the keys - * @return array with elements copied from the iterator - */ -function iterator_to_array(Traversable $it, $use_keys = true) {/**/}; - -/** @ingroup ZendEngine - * @brief Basic Exception class. - * @since PHP 5.0 - */ -class Exception -{ - /** The exception message */ - protected $message; - - /** The string representations as generated during construction */ - private $string; - - /** The code passed to the constructor */ - protected $code; - - /** The file name where the exception was instantiated */ - protected $file; - - /** The line number where the exception was instantiated */ - protected $line; - - /** The stack trace */ - private $trace; - - /** Prevent clone - */ - final private function __clone() {} - - /** Construct an exception - * - * @param $message Some text describing the exception - * @param $code Some code describing the exception - */ - function __construct($message = NULL, $code = 0) { - if (func_num_args()) { - $this->message = $message; - } - $this->code = $code; - $this->file = __FILE__; // of throw clause - $this->line = __LINE__; // of throw clause - $this->trace = debug_backtrace(); - $this->string = StringFormat($this); - } - - /** @return the message passed to the constructor - */ - final public function getMessage() - { - return $this->message; - } - - /** @return the code passed to the constructor - */ - final public function getCode() - { - return $this->code; - } - - /** @return the name of the file where the exception was thrown - */ - final public function getFile() - { - return $this->file; - } - - /** @return the line number where the exception was thrown - */ - final public function getLine() - { - return $this->line; - } - - /** @return the stack trace as array - */ - final public function getTrace() - { - return $this->trace; - } - - /** @return the stack trace as string - */ - final public function getTraceAsString() - { - } - - /** @return string representation of exception - */ - public function __toString() - { - return $this->string; - } -} - -/** @ingroup SPL - * @brief Exception that represents error in the program logic. - * @since PHP 5.1 - * - * This kind of exceptions should directly leed to a fix in your code. - */ -class LogicException extends Exception -{ -} - -/** @ingroup SPL - * @brief Exception thrown when a function call was illegal. - * @since PHP 5.1 - */ -class BadFunctionCallException extends LogicException -{ -} - -/** @ingroup SPL - * @brief Exception thrown when a method call was illegal. - * @since PHP 5.1 - */ -class BadMethodCallException extends BadFunctionCallException -{ -} - -/** @ingroup SPL - * @brief Exception that denotes a value not in the valid domain was used. - * @since PHP 5.1 - * - * This kind of exception should be used to inform about domain errors in - * mathematical sense. - * - * @see RangeException - */ -class DomainException extends LogicException -{ -} - -/** @ingroup SPL - * @brief Exception that denotes invalid arguments were passed. - * @since PHP 5.1 - * - * @see UnexpectedValueException - */ -class InvalidArgumentException extends LogicException -{ -} - -/** @ingroup SPL - * @brief Exception thrown when a parameter exceeds the allowed length. - * @since PHP 5.1 - * - * This can be used for strings length, array size, file size, number of - * elements read from an Iterator and so on. - */ -class LengthException extends LogicException -{ -} - -/** @ingroup SPL - * @brief Exception thrown when an illegal index was requested. - * @since PHP 5.1 - * - * This represents errors that should be detected at compile time. - * - * @see OutOfBoundsException - */ -class OutOfRangeException extends LogicException -{ -} - -/** @ingroup SPL - * @brief Exception thrown for errors that are only detectable at runtime. - * @since PHP 5.1 - */ -class RuntimeException extends Exception -{ -} - -/** @ingroup SPL - * @brief Exception thrown when an illegal index was requested. - * @since PHP 5.1 - * - * This represents errors that cannot be detected at compile time. - * - * @see OutOfRangeException - */ -class OutOfBoundsException extends RuntimeException -{ -} - -/** @ingroup SPL - * @brief Exception thrown to indicate arithmetic/buffer overflow. - * @since PHP 5.1 - */ -class OverflowException extends RuntimeException -{ -} - -/** @ingroup SPL - * @brief Exception thrown to indicate range errors during program execution. - * @since PHP 5.1 - * - * Normally this means there was an arithmetic error other than under/overflow. - * This is the runtime version of DomainException. - * - * @see DomainException - */ -class RangeException extends RuntimeException -{ -} - -/** @ingroup SPL - * @brief Exception thrown to indicate arithmetic/buffer underflow. - * @since PHP 5.1 - */ -class UnderflowException extends RuntimeException -{ -} - -/** @ingroup SPL - * @brief Exception thrown to indicate an unexpected value. - * @since PHP 5.1 - * - * Typically this happens when a function calls another function and espects - * the return value to be of a certain type or value not including arithmetic - * or buffer related errors. - * - * @see InvalidArgumentException - */ -class UnexpectedValueException extends RuntimeException -{ -} - -/** @ingroup ZendEngine - * @brief Interface to override array access of objects. - * @since PHP 5.0 - */ -interface ArrayAccess -{ - /** @param $offset to modify - * @param $value new value - */ - function offsetSet($offset, $value); - - /** @param $offset to retrieve - * @return value at given offset - */ - function offsetGet($offset); - - /** @param $offset to delete - */ - function offsetUnset($offset); - - /** @param $offset to check - * @return whether the offset exists. - */ - function offsetExists($offset); -} - -/** @ingroup ZendEngine - * @brief Interface to detect a class is traversable using foreach. - * @since PHP 5.0 - * - * Abstract base interface that cannot be implemented alone. Instead it - * must be implemented by either IteratorAggregate or Iterator. - * - * @note Internal classes that implement this interface can be used in a - * foreach construct and do not need to implement IteratorAggregate or - * Iterator. - * - * @note This is an engine internal interface which cannot be implemented - * in PHP scripts. Either IteratorAggregate or Iterator must be used - * instead. - */ -interface Traversable -{ -} - -/** @ingroup ZendEngine - * @brief Interface to create an external Iterator. - * @since PHP 5.0 - * - * @note This is an engine internal interface. - */ -interface IteratorAggregate extends Traversable -{ - /** @return an Iterator for the implementing object. - */ - function getIterator(); -} - -/** @ingroup ZendEngine - * @brief Basic iterator - * @since PHP 5.0 - * - * Interface for external iterators or objects that can be iterated - * themselves internally. - * - * @note This is an engine internal interface. - */ -interface Iterator extends Traversable -{ - /** Rewind the Iterator to the first element. - */ - function rewind(); - - /** Return the current element. - */ - function current(); - - /** Return the key of the current element. - */ - function key(); - - /** Move forward to next element. - */ - function next(); - - /** Check if there is a current element after calls to rewind() or next(). - */ - function valid(); -} - -/** @ingroup ZendEngine - * @brief This Interface allows to hook into the global count() function. - * @since PHP 5.1 - */ -interface Countable -{ - /** @return the number the global function count() should show - */ - function count(); -} - -/** @ingroup ZendEngine - * @brief Interface for customized serializing - * @since 5.1 - * - * Classes that implement this interface no longer support __sleep() and - * __wakeup(). The method serialized is called whenever an instance needs to - * be serialized. This does not invoke __destruct() or has any other side - * effect unless programmed inside the method. When the data is unserialized - * the class is known and the appropriate unserialize() method is called as a - * constructor instead of calling __construct(). If you need to execute the - * standard constructor you may do so in the method. - */ -interface Serializable -{ - /** - * @return string representation of the instance - */ - function serialize(); - - /** - * @note This is a constructor - * - * @param $serialized data read from stream to construct the instance - */ - function unserialize($serialized); -} - -/** @ingroup SPL - * @brief An Array wrapper - * @since PHP 5.0 - * @version 1.2 - * - * This array wrapper allows to recursively iterate over Arrays and public - * Object properties. - * - * @see ArrayIterator - */ -class ArrayObject implements IteratorAggregate, ArrayAccess, Countable -{ - /** Properties of the object have their normal functionality - * when accessed as list (var_dump, foreach, etc.) */ - const STD_PROP_LIST = 0x00000001; - /** Array indices can be accessed as properties in read/write */ - const ARRAY_AS_PROPS = 0x00000002; - - /** Construct a new array iterator from anything that has a hash table. - * That is any Array or Object. - * - * @param $array the array to use. - * @param $flags see setFlags(). - * @param $iterator_class class used in getIterator() - */ - function __construct($array, $flags = 0, $iterator_class = "ArrayIterator") {/**/} - - /** Set behavior flags. - * - * @param $flags bitmask as follows: - * 0 set: properties of the object have their normal functionality - * when accessed as list (var_dump, foreach, etc.) - * 1 set: array indices can be accessed as properties in read/write - */ - function setFlags($flags) {/**/} - - /** @return current flags - */ - function getFlags() {/**/} - - /** Sort the entries by values. - */ - function asort() {/**/} - - /** Sort the entries by key. - */ - function ksort() {/**/} - - /** Sort the entries by values using user defined function. - */ - function uasort(mixed cmp_function) {/**/} - - /** Sort the entries by key using user defined function. - */ - function uksort(mixed cmp_function) {/**/} - - /** Sort the entries by values using "natural order" algorithm. - */ - function natsort() {/**/} - - /** Sort the entries by values using case insensitive "natural order" algorithm. - */ - function natcasesort() {/**/} - - /** @param $array new array or object - */ - function exchangeArray($array) {/**/} - - /** @return the iterator which is an ArrayIterator object connected to - * this object. - */ - function getIterator() {/**/} - - /** @param $index offset to inspect - * @return whetehr offset $index esists - */ - function offsetExists($index) {/**/} - - /** @param $index offset to return value for - * @return value at offset $index - */ - function offsetGet($index) {/**/} - - /** @param $index index to set - * @param $newval new value to store at offset $index - */ - function offsetSet($index, $newval) {/**/} - - /** @param $index offset to unset - */ - function offsetUnset($index) {/**/} - - /** @param $value is appended as last element - * @warning this method cannot be called when the ArrayObject refers to - * an object. - */ - function append($value) {/**/} - - /** @return a \b copy of the array - * @note when the ArrayObject refers to an object then this method - * returns an array of the public properties. - */ - function getArrayCopy() {/**/} - - /** @return the number of elements in the array or the number of public - * properties in the object. - */ - function count() {/**/} - - /* @param $iterator_class new class used in getIterator() - */ - function setIteratorClass($itertor_class) {/**/} - - /* @return class used in getIterator() - */ - function getIteratorClass() {/**/} -} - -/** @ingroup SPL - * @brief An Array iterator - * @since PHP 5.0 - * @version 1.2 - * - * This iterator allows to unset and modify values and keys while iterating - * over Arrays and Objects. - * - * When you want to iterate over the same array multiple times you need to - * instantiate ArrayObject and let it create ArrayIterator instances that - * refer to it either by using foreach or by calling its getIterator() - * method manually. - */ -class ArrayIterator implements SeekableIterator, ArrayAccess, Countable -{ - /** Properties of the object have their normal functionality - * when accessed as list (var_dump, foreach, etc.) */ - const STD_PROP_LIST = 0x00000001; - /** Array indices can be accessed as properties in read/write */ - const ARRAY_AS_PROPS = 0x00000002; - - /** Construct a new array iterator from anything that has a hash table. - * That is any Array or Object. - * - * @param $array the array to use. - * @param $flags see setFlags(). - */ - function __construct($array, $flags = 0) {/**/} - - /** Set behavior flags. - * - * @param $flags bitmask as follows: - * 0 set: properties of the object have their normal functionality - * when accessed as list (var_dump, foreach, etc.) - * 1 set: array indices can be accessed as properties in read/write - */ - function setFlags($flags) {/**/} - - /** - * @return current flags - */ - function getFlags() {/**/} - - /** Sort the entries by values. - */ - function asort() {/**/} - - /** Sort the entries by key. - */ - function ksort() {/**/} - - /** Sort the entries by values using user defined function. - */ - function uasort(mixed cmp_function) {/**/} - - /** Sort the entries by key using user defined function. - */ - function uksort(mixed cmp_function) {/**/} - - /** Sort the entries by values using "natural order" algorithm. - */ - function natsort() {/**/} - - /** Sort the entries by values using case insensitive "natural order" algorithm. - */ - function natcasesort() {/**/} - - /** @param $index offset to inspect - * @return whetehr offset $index esists - */ - function offsetExists($index) {/**/} - - /** @param $index offset to return value for - * @return value at offset $index - */ - function offsetGet($index) {/**/} - - /** @param $index index to set - * @param $newval new value to store at offset $index - */ - function offsetSet($index, $newval) {/**/} - - /** @param $index offset to unset - */ - function offsetUnset($index) {/**/} - - /** @param $value is appended as last element - * @warning this method cannot be called when the ArrayIterator refers to - * an object. - */ - function append($value) {/**/} - - /** @return a \b copy of the array - * @note when the ArrayIterator refers to an object then this method - * returns an array of the public properties. - */ - function getArrayCopy() {/**/} - - /** @param $position offset to seek to - * @throw OutOfBoundsException if $position is invalid - */ - function seek($position) {/**/} - - /** @return the number of elements in the array or the number of public - * properties in the object. - */ - function count() {/**/} - - /** @copydoc Iterator::rewind */ - function rewind() {/**/} - - /** @copydoc Iterator::valid */ - function valid() {/**/} - - /** @copydoc Iterator::current */ - function current() {/**/} - - /** @copydoc Iterator::key */ - function key() {/**/} - - /** @copydoc Iterator::next */ - function next() {/**/} -} - -/** @ingroup SPL - * @brief File info class - * @since PHP 5.1.3 - */ -class SplFileInfo -{ - /** Construct a file info object - * - * @param $file_name path or file name - */ - function __construct($file_name) {/**/} - - /** @return the path part only. - */ - function getPath() {/**/} - - /** @return the filename only. - */ - function getFilename() {/**/} - - /** @return SplFileInfo created for the file - * @param class_name name of class to instantiate - * @see SplFileInfo::setInfoClass() - */ - function getFileInfo(string class_name = NULL) {/**/} - - /** @return The current entries path and file name. - */ - function getPathname() {/**/} - - /** @return SplFileInfo created for the path - * @param class_name name of class to instantiate - * @see SplFileInfo::setInfoClass() - */ - function getPathInfo(string class_name = NULL) {/**/} - - /** @return The current entry's permissions. - */ - function getPerms() {/**/} - - /** @return The current entry's inode. - */ - function getInode() {/**/} - - /** @return The current entry's size in bytes . - */ - function getSize() {/**/} - - /** @return The current entry's owner name. - */ - function getOwner() {/**/} - - /** @return The current entry's group name. - */ - function getGroup() {/**/} - - /** @return The current entry's last access time. - */ - function getATime() {/**/} - - /** @return The current entry's last modification time. - */ - function getMTime() {/**/} - - /** @return The current entry's last change time. - */ - function getCTime() {/**/} - - /** @return The current entry's file type. - */ - function getType() {/**/} - - /** @return Whether the current entry is writeable. - */ - function isWritable() {/**/} - - /** @return Whether the current entry is readable. - */ - function isReadable() {/**/} - - /** @return Whether the current entry is executable. - */ - function isExecutable() {/**/} - - /** @return Whether the current entry is . - */ - function isFile() {/**/} - - /** @return Whether the current entry is a directory. - */ - function isDir() {/**/} - - /** @return whether the current entry is a link. - */ - function isLink() {/**/} - - /** @return target of link. - */ - function getLinkTarget() {/**/} - - /** @return The resolved path - */ - function getRealPath() {/**/} - - /** @return getPathname() - */ - function __toString() {/**/} - - /** Open the current file as a SplFileObject instance - * - * @param mode open mode - * @param use_include_path whether to search include paths (don't use) - * @param context resource context to passed to open function - * @throw RuntimeException if file cannot be opened (e.g. insufficient - * access rights). - * @return The opened file as a SplFileObject instance - * - * @see SplFileObject - * @see SplFileInfo::setFileClass() - * @see file() - */ - function openFile($mode = 'r', $use_include_path = false, $context = NULL) {/**/} - - /** @param class_name name of class used with openFile(). Must be derived - * from SPLFileObject. - */ - function setFileClass(string class_name = "SplFileObject") {/**/} - - /** @param class_name name of class used with getFileInfo(), getPathInfo(). - * Must be derived from SplFileInfo. - */ - function setInfoClass(string class_name = "SplFileInfo") {/**/} -} - -/** @ingroup SPL - * @brief Directory iterator - * @version 1.1 - * @since PHP 5.0 - */ -class DirectoryIterator extends SplFileInfo implements Iterator -{ - /** Construct a directory iterator from a path-string. - * - * @param $path directory to iterate. - */ - function __construct($path) {/**/} - - /** @copydoc Iterator::rewind */ - function rewind() {/**/} - - /** @copydoc Iterator::valid */ - function valid() {/**/} - - /** @return index of entry - */ - function key() {/**/} - - /** @return $this - */ - function current() {/**/} - - /** @copydoc Iterator::next */ - function next() {/**/} - - /** @return Whether the current entry is either '.' or '..'. - */ - function isDot() {/**/} - - /** @return whether the current entry is a link. - */ - function isLink() {/**/} - - /** @return getFilename() - */ - function __toString() {/**/} -} - -/** @ingroup SPL - * @brief recursive directory iterator - * @version 1.1 - * @since PHP 5.0 - */ -class RecursiveDirectoryIterator extends DirectoryIterator implements RecursiveIterator -{ - const CURRENT_AS_FILEINFO 0x00000000; /* make RecursiveDirectoryTree::current() return SplFileInfo */ - const CURRENT_AS_SELF 0x00000010; /* make RecursiveDirectoryTree::current() return getSelf() */ - const CURRENT_AS_PATHNAME 0x00000020; /* make RecursiveDirectoryTree::current() return getPathname() */ - - const KEY_AS_PATHNAME 0x00000000; /* make RecursiveDirectoryTree::key() return getPathname() */ - const KEY_AS_FILENAME 0x00000100; /* make RecursiveDirectoryTree::key() return getFilename() */ - - const NEW_CURRENT_AND_KEY 0x00000100; /* CURRENT_AS_FILEINFO + KEY_AS_FILENAME */ - - /** Construct a directory iterator from a path-string. - * - * @param $path directory to iterate. - * @param $flags open flags - * - CURRENT_AS_FILEINFO - * - CURRENT_AS_SELF - * - CURRENT_AS_PATHNAME - * - KEY_AS_PATHNAME - * - KEY_AS_FILENAME - * - NEW_CURRENT_AND_KEY - */ - function __construct($path, $flags = 0) {/**/} - - /** @return getPathname() or getFilename() depending on flags - */ - function key() {/**/} - - /** @return getFilename() or getFileInfo() depending on flags - */ - function current() {/**/} - - /** @return whether the current is a directory (not '.' or '..'). - */ - function hasChildren() {/**/} - - /** @return a RecursiveDirectoryIterator for the current entry. - */ - function getChildren() {/**/} - - /** @return sub path only (without main path) - */ - function getSubPath() {/**/} - - /** @return the current sub path - */ - function getSubPathname() {/**/} -} - -/** @ingroup SPL - * @brief recursive SimpleXML_Element iterator - * @since PHP 5.0 - * - * The SimpleXMLIterator implements the RecursiveIterator interface. This - * allows iteration over all elements using foreach or an appropriate while - * construct, just like SimpleXMLElement does. When using the foreach construct, - * you will also iterate over the subelements. For every element which - * has subelements, hasChildren() returns true. This will trigger a call to - * getChildren() which returns the iterator for that sub element. - */ -class SimpleXMLIterator extends SimpleXMLElement implements RecursiveIterator, Countable -{ - /** @return whether the current node has sub nodes. - */ - function hasChildren() {/**/} - - /** @return a SimpleXMLIterator for the current node. - */ - function getChildren() {/**/} - - /** @return number of elements/attributes seen with foreach() - */ - function count() {/**/} - - /** @copydoc Iterator::rewind */ - function rewind() {/**/} - - /** @copydoc Iterator::valid */ - function valid() {/**/} - - /** @copydoc Iterator::current */ - function current() {/**/} - - /** @copydoc Iterator::key */ - function key() {/**/} - - /** @copydoc Iterator::next */ - function next() {/**/} -} - -/** @ingroup SPL - * @brief Observer of the observer pattern - * @since PHP 5.1 - * - * For a detailed explanation see Observer pattern in - * - * Gamma, Helm, Johnson, Vlissides
- * Design Patterns - *
- */ -interface SplObserver -{ - /** Called from the subject (i.e. when it's value has changed). - * @param $subject the callee - */ - function update(SplSubject $subject); -} - -/** @ingroup SPL - * @brief Subject to the observer pattern - * @since PHP 5.1 - * @see Observer - */ -interface SplSubject -{ - /** @param $observer new observer to attach - */ - function attach(SplObserver $observer); - - /** @param $observer existing observer to detach - * @note a non attached observer shouldn't result in a warning or similar - */ - function detach(SplObserver $observer); - - /** Notify all observers - */ - function notify(); -} - -?> diff --git a/ext/spl/tests/fileobject_001a.txt b/ext/spl/tests/fileobject_001a.txt old mode 100755 new mode 100644 diff --git a/ext/spl/tests/fileobject_001b.txt b/ext/spl/tests/fileobject_001b.txt old mode 100755 new mode 100644 diff --git a/ext/spl/tests/testclass b/ext/spl/tests/testclass old mode 100755 new mode 100644 diff --git a/ext/standard/base64.c b/ext/standard/base64.c index fb6d491acfe..c750c7a0b93 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -790,11 +790,7 @@ PHP_FUNCTION(base64_encode) ZEND_PARSE_PARAMETERS_END(); result = php_base64_encode((unsigned char*)str, str_len); - if (result != NULL) { - RETURN_STR(result); - } else { - RETURN_FALSE; - } + RETURN_STR(result); } /* }}} */ diff --git a/ext/standard/tests/file/fputcsv_variation15.phpt b/ext/standard/tests/file/fputcsv_variation15.phpt old mode 100755 new mode 100644 diff --git a/ext/standard/tests/file/stream_rfc2397_003.gif b/ext/standard/tests/file/stream_rfc2397_003.gif old mode 100755 new mode 100644 diff --git a/ext/standard/tests/image/test13pix.swf b/ext/standard/tests/image/test13pix.swf old mode 100755 new mode 100644 diff --git a/ext/standard/tests/image/test4pix.swf b/ext/standard/tests/image/test4pix.swf old mode 100755 new mode 100644 diff --git a/ext/standard/tests/serialize/005.phpt b/ext/standard/tests/serialize/005.phpt index 5c0e8a0d136..9123e4020e7 100644 --- a/ext/standard/tests/serialize/005.phpt +++ b/ext/standard/tests/serialize/005.phpt @@ -9,7 +9,7 @@ function do_autoload($class_name) { if ($class_name != 'autoload_not_available') { - require_once(dirname(__FILE__) . '/' . strtolower($class_name) . '.p5c'); + require_once(dirname(__FILE__) . '/' . strtolower($class_name) . '.inc'); } echo __FUNCTION__ . "($class_name)\n"; } diff --git a/ext/standard/tests/serialize/autoload_implements.p5c b/ext/standard/tests/serialize/autoload_implements.inc old mode 100755 new mode 100644 similarity index 100% rename from ext/standard/tests/serialize/autoload_implements.p5c rename to ext/standard/tests/serialize/autoload_implements.inc diff --git a/ext/standard/tests/serialize/autoload_interface.p5c b/ext/standard/tests/serialize/autoload_interface.inc old mode 100755 new mode 100644 similarity index 100% rename from ext/standard/tests/serialize/autoload_interface.p5c rename to ext/standard/tests/serialize/autoload_interface.inc diff --git a/ext/standard/tests/serialize/bug30234.phpt b/ext/standard/tests/serialize/bug30234.phpt index ae3a0b2f556..aee42b28a15 100644 --- a/ext/standard/tests/serialize/bug30234.phpt +++ b/ext/standard/tests/serialize/bug30234.phpt @@ -8,7 +8,7 @@ Bug #30234 (__autoload() not invoked for interfaces) parser->charset = XML_CHAR_ENCODING_NONE; -#endif -#if LIBXML_VERSION >= 20703 xmlCtxtUseOptions(parser->parser, XML_PARSE_OLDSAX); -#endif parser->parser->replaceEntities = 1; parser->parser->wellFormed = 0; @@ -569,30 +562,6 @@ XML_Parse(XML_Parser parser, const XML_Char *data, int data_len, int is_final) { int error; -/* The following is a hack to keep BC with PHP 4 while avoiding -the inifite loop in libxml <= 2.6.17 which occurs when no encoding -has been defined and none can be detected */ -#if LIBXML_VERSION <= 20617 - if (parser->parser->charset == XML_CHAR_ENCODING_NONE) { - if (data_len >= 4 || (parser->parser->input->buf->buffer->use + data_len >= 4)) { - xmlChar start[4]; - int char_count; - - char_count = parser->parser->input->buf->buffer->use; - if (char_count > 4) { - char_count = 4; - } - - memcpy(start, parser->parser->input->buf->buffer->content, (size_t)char_count); - memcpy(start + char_count, data, (size_t)(4 - char_count)); - - if (xmlDetectCharEncoding(&start[0], 4) == XML_CHAR_ENCODING_NONE) { - parser->parser->charset = XML_CHAR_ENCODING_UTF8; - } - } - } -#endif - if (parser->parser->lastError.level >= XML_ERR_WARNING) { return 0; } diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index 4d4e7348c93..8b5cf34d665 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -442,7 +442,6 @@ static void php_xmlreader_free_prop_handler(zval *el) /* {{{ */ { pefree(Z_PTR_P(el), 1); } /* }}} */ -#if LIBXML_VERSION >= 20620 /* {{{ php_xmlreader_no_arg_string */ static void php_xmlreader_no_arg_string(INTERNAL_FUNCTION_PARAMETERS, xmlreader_read_char_t internal_function) { zval *id; @@ -464,7 +463,6 @@ static void php_xmlreader_no_arg_string(INTERNAL_FUNCTION_PARAMETERS, xmlreader_ } } /* }}} */ -#endif /* {{{ php_xmlreader_set_relaxng_schema */ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int type) { @@ -810,12 +808,6 @@ PHP_METHOD(xmlreader, next) id = getThis(); intern = Z_XMLREADER_P(id); if (intern != NULL && intern->ptr != NULL) { -#if LIBXML_VERSION <= 20617 - /* Bug in libxml prevents a next in certain cases when positioned on end of element */ - if (xmlTextReaderNodeType(intern->ptr) == XML_READER_TYPE_END_ELEMENT) { - retval = xmlTextReaderRead(intern->ptr); - } else -#endif retval = xmlTextReaderNext(intern->ptr); while (name != NULL && retval == 1) { if (xmlStrEqual(xmlTextReaderConstLocalName(intern->ptr), (xmlChar *)name)) { @@ -899,7 +891,6 @@ PHP_METHOD(xmlreader, resetState) } */ -#if LIBXML_VERSION >= 20620 /* {{{ proto string XMLReader::readInnerXml() Reads the contents of the current node, including child nodes and markup. */ PHP_METHOD(xmlreader, readInnerXml) @@ -965,7 +956,6 @@ PHP_METHOD(xmlreader, setSchema) #endif } /* }}} */ -#endif /* {{{ proto bool XMLReader::setParserProperty(int property, bool value) Sets parser property (one of the parser option constants). @@ -1071,9 +1061,7 @@ PHP_METHOD(xmlreader, XML) reader = xmlNewTextReader(inputbfr, uri); if (reader != NULL) { -#if LIBXML_VERSION >= 20628 ret = xmlTextReaderSetup(reader, NULL, uri, encoding, options); -#endif if (ret == 0) { if (id == NULL) { object_init_ex(return_value, xmlreader_class_entry); @@ -1271,12 +1259,10 @@ static const zend_function_entry xmlreader_functions[] /* {{{ */ = { PHP_ME(xmlreader, open, arginfo_xmlreader_open, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC) PHP_ME(xmlreader, read, arginfo_xmlreader_read, ZEND_ACC_PUBLIC) PHP_ME(xmlreader, next, arginfo_xmlreader_next, ZEND_ACC_PUBLIC) -#if LIBXML_VERSION >= 20620 PHP_ME(xmlreader, readInnerXml, arginfo_xmlreader_readInnerXml, ZEND_ACC_PUBLIC) PHP_ME(xmlreader, readOuterXml, arginfo_xmlreader_readOuterXml, ZEND_ACC_PUBLIC) PHP_ME(xmlreader, readString, arginfo_xmlreader_readString, ZEND_ACC_PUBLIC) PHP_ME(xmlreader, setSchema, arginfo_xmlreader_setSchema, ZEND_ACC_PUBLIC) -#endif /* Not Yet Implemented though defined in libxml as of 2.6.9dev PHP_ME(xmlreader, resetState, NULL, ZEND_ACC_PUBLIC) */ diff --git a/ext/xmlreader/tests/012.dtd b/ext/xmlreader/tests/012.dtd old mode 100755 new mode 100644 diff --git a/ext/xmlreader/tests/012.xml b/ext/xmlreader/tests/012.xml old mode 100755 new mode 100644 diff --git a/ext/xmlreader/tests/013.xsd b/ext/xmlreader/tests/013.xsd old mode 100755 new mode 100644 diff --git a/ext/xmlreader/tests/bug42139.phpt b/ext/xmlreader/tests/bug42139.phpt index 19602f01035..0ef2d355dd2 100644 --- a/ext/xmlreader/tests/bug42139.phpt +++ b/ext/xmlreader/tests/bug42139.phpt @@ -1,9 +1,7 @@ --TEST-- Bug #42139 (XMLReader option constants are broken using XML()) --SKIPIF-- - + --FILE-- 20617 static PHP_FUNCTION(xmlwriter_start_attribute_ns); static PHP_FUNCTION(xmlwriter_write_attribute_ns); -#endif static PHP_FUNCTION(xmlwriter_start_element); static PHP_FUNCTION(xmlwriter_end_element); static PHP_FUNCTION(xmlwriter_full_end_element); @@ -463,10 +461,8 @@ static const zend_function_entry xmlwriter_functions[] = { PHP_FE(xmlwriter_start_attribute, arginfo_xmlwriter_start_attribute) PHP_FE(xmlwriter_end_attribute, arginfo_xmlwriter_resource) PHP_FE(xmlwriter_write_attribute, arginfo_xmlwriter_write_attribute) -#if LIBXML_VERSION > 20617 PHP_FE(xmlwriter_start_attribute_ns,arginfo_xmlwriter_start_attribute_ns) PHP_FE(xmlwriter_write_attribute_ns,arginfo_xmlwriter_write_attribute_ns) -#endif PHP_FE(xmlwriter_start_element, arginfo_xmlwriter_start_element) PHP_FE(xmlwriter_end_element, arginfo_xmlwriter_resource) PHP_FE(xmlwriter_full_end_element, arginfo_xmlwriter_resource) @@ -513,10 +509,8 @@ static const zend_function_entry xmlwriter_class_functions[] = { PHP_ME_MAPPING(startAttribute, xmlwriter_start_attribute, arginfo_xmlwriter_method_start_attribute, 0) PHP_ME_MAPPING(endAttribute, xmlwriter_end_attribute, arginfo_xmlwriter_void, 0) PHP_ME_MAPPING(writeAttribute, xmlwriter_write_attribute, arginfo_xmlwriter_method_write_attribute, 0) -#if LIBXML_VERSION > 20617 PHP_ME_MAPPING(startAttributeNs, xmlwriter_start_attribute_ns,arginfo_xmlwriter_method_start_attribute_ns, 0) PHP_ME_MAPPING(writeAttributeNs, xmlwriter_write_attribute_ns,arginfo_xmlwriter_method_write_attribute_ns, 0) -#endif PHP_ME_MAPPING(startElement, xmlwriter_start_element, arginfo_xmlwriter_method_start_element, 0) PHP_ME_MAPPING(endElement, xmlwriter_end_element, arginfo_xmlwriter_void, 0) PHP_ME_MAPPING(fullEndElement, xmlwriter_full_end_element, arginfo_xmlwriter_void, 0) @@ -808,7 +802,6 @@ static PHP_FUNCTION(xmlwriter_end_attribute) } /* }}} */ -#if LIBXML_VERSION > 20617 /* {{{ proto bool xmlwriter_start_attribute_ns(resource xmlwriter, string prefix, string name, string uri) Create start namespaced attribute - returns FALSE on error */ static PHP_FUNCTION(xmlwriter_start_attribute_ns) @@ -851,7 +844,6 @@ static PHP_FUNCTION(xmlwriter_start_attribute_ns) RETURN_FALSE; } /* }}} */ -#endif /* {{{ proto bool xmlwriter_write_attribute(resource xmlwriter, string name, string content) Write full attribute - returns FALSE on error */ @@ -896,7 +888,6 @@ static PHP_FUNCTION(xmlwriter_write_attribute) } /* }}} */ -#if LIBXML_VERSION > 20617 /* {{{ proto bool xmlwriter_write_attribute_ns(resource xmlwriter, string prefix, string name, string uri, string content) Write full namespaced attribute - returns FALSE on error */ static PHP_FUNCTION(xmlwriter_write_attribute_ns) @@ -940,7 +931,6 @@ static PHP_FUNCTION(xmlwriter_write_attribute_ns) RETURN_FALSE; } /* }}} */ -#endif /* {{{ proto bool xmlwriter_start_element(resource xmlwriter, string name) Create start element tag - returns FALSE on error */ diff --git a/ext/xmlwriter/tests/007.phpt b/ext/xmlwriter/tests/007.phpt index 08a5b722369..f1b980a9cc2 100644 --- a/ext/xmlwriter/tests/007.phpt +++ b/ext/xmlwriter/tests/007.phpt @@ -3,7 +3,6 @@ XMLWriter: libxml2 XML Writer, Elements & Attributes --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- --FILE-- --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- #endif - -#if HAVE_TIME_H -#include -#endif #if HAVE_SYS_TIME_H #include #endif diff --git a/tests/classes/autoload_001.phpt b/tests/classes/autoload_001.phpt index 6c09c4e04d3..01115f48880 100644 --- a/tests/classes/autoload_001.phpt +++ b/tests/classes/autoload_001.phpt @@ -8,7 +8,7 @@ ZE2 Autoload and class_exists ---FILE-- -publicProperty, - $this->protectedProperty, - $this->privateProperty - ); - } - - function __get($name) { - echo '__get ' . $name; - return $this->$name; - } - - function __set($name, $value) { - echo '__set ' . $name . "\n"; - $this->$name = $value; - } - - function __isset($name) { - echo '__isset ' . $name . "\n"; - return isset($this->$name); - } -} - -$test = new Test(); - -$test->nonExisting; -$test->publicProperty; -$test->protectedProperty; -$test->privateProperty; -isset($test->nonExisting); -isset($test->publicProperty); -isset($test->protectedProperty); -isset($test->privateProperty); -$test->nonExisting = 'value'; -$test->publicProperty = 'value'; -$test->protectedProperty = 'value'; -$test->privateProperty = 'value'; - -?> - ---EXPECTF-- -__get nonExisting -Notice: Undefined property: Test::$nonExisting in %sbug63462.php on line %d -__get publicProperty -Notice: Undefined property: Test::$publicProperty in %sbug63462.php on line %d -__get protectedProperty -Notice: Undefined property: Test::$protectedProperty in %sbug63462.php on line %d -__get privateProperty -Notice: Undefined property: Test::$privateProperty in %sbug63462.php on line %d -__isset nonExisting -__isset publicProperty -__isset protectedProperty -__isset privateProperty -__set nonExisting -__set publicProperty -__set protectedProperty -__set privateProperty