From dce5e561a63fc970de722636ad8c09e9b079e8ae Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 31 Jan 2022 15:43:24 +0100 Subject: [PATCH 01/16] Fix #81708: UAF due to php_filter_float() failing for ints We must only release the zval, if we actually assign a new zval. --- ext/filter/logical_filters.c | 2 +- ext/filter/tests/bug81708.phpt | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ext/filter/tests/bug81708.phpt diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index fa6ae65ac5868..e5e87c01568a4 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -435,10 +435,10 @@ void php_filter_float(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ switch (is_numeric_string(num, p - num, &lval, &dval, 0)) { case IS_LONG: - zval_ptr_dtor(value); if ((min_range_set && (lval < min_range)) || (max_range_set && (lval > max_range))) { goto error; } + zval_ptr_dtor(value); ZVAL_DOUBLE(value, (double)lval); break; case IS_DOUBLE: diff --git a/ext/filter/tests/bug81708.phpt b/ext/filter/tests/bug81708.phpt new file mode 100644 index 0000000000000..d0036af136824 --- /dev/null +++ b/ext/filter/tests/bug81708.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #81708 (UAF due to php_filter_float() failing for ints) +--SKIPIF-- + +--INI-- +opcache.enable_cli=0 +--FILE-- + ['min_range' => -1, 'max_range' => 1]] +); +var_dump($input); +?> +--EXPECT-- +string(3) "+11" From 82f1bf1b6bc3a43aba62214870e6d0931e93a6d9 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 31 Jan 2022 15:43:24 +0100 Subject: [PATCH 02/16] Fix #81708: UAF due to php_filter_float() failing for ints We must only release the zval, if we actually assign a new zval. --- ext/filter/logical_filters.c | 2 +- ext/filter/tests/bug81708.phpt | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ext/filter/tests/bug81708.phpt diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index 1bf7c00d13c68..95f7a99e34b14 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -436,10 +436,10 @@ void php_filter_float(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ switch (is_numeric_string(num, p - num, &lval, &dval, 0)) { case IS_LONG: - zval_ptr_dtor(value); if ((min_range_set && (lval < min_range)) || (max_range_set && (lval > max_range))) { goto error; } + zval_ptr_dtor(value); ZVAL_DOUBLE(value, (double)lval); break; case IS_DOUBLE: diff --git a/ext/filter/tests/bug81708.phpt b/ext/filter/tests/bug81708.phpt new file mode 100644 index 0000000000000..d0036af136824 --- /dev/null +++ b/ext/filter/tests/bug81708.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #81708 (UAF due to php_filter_float() failing for ints) +--SKIPIF-- + +--INI-- +opcache.enable_cli=0 +--FILE-- + ['min_range' => -1, 'max_range' => 1]] +); +var_dump($input); +?> +--EXPECT-- +string(3) "+11" From 93a8d5cd1721ccb5c7ae78e227d36b580e03efc1 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Tue, 8 Feb 2022 12:08:26 +0000 Subject: [PATCH 03/16] Fix bug GH-8058 - mysqlnd segfault when prepare fails Closes GH-8061 --- NEWS | 3 + ext/mysqli/tests/gh8058.phpt | 39 ++++++++++++ .../tests/mysqli_stmt_affected_rows.phpt | 11 +--- ext/mysqlnd/mysqlnd_ps.c | 60 +++++-------------- 4 files changed, 59 insertions(+), 54 deletions(-) create mode 100644 ext/mysqli/tests/gh8058.phpt diff --git a/NEWS b/NEWS index 3e1d12d0fc9b0..91fce7ad7342a 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,9 @@ PHP NEWS . Fixed bug GH-7953 (ob_clean() only does not set Content-Encoding). (cmb) . Fixed bug GH-7980 (Unexpected result for iconv_mime_decode). (cmb) +- MySQLnd: + . Fixed bug GH-8058 (NULL pointer dereference in mysqlnd package). (Kamil Tekiela) + - Zlib: . Fixed bug GH-7953 (ob_clean() only does not set Content-Encoding). (cmb) diff --git a/ext/mysqli/tests/gh8058.phpt b/ext/mysqli/tests/gh8058.phpt new file mode 100644 index 0000000000000..8f47e372e73e3 --- /dev/null +++ b/ext/mysqli/tests/gh8058.phpt @@ -0,0 +1,39 @@ +--TEST-- +GH-8058 (NULL pointer dereference in mysqlnd package (#81706)) +--SKIPIF-- + +--FILE-- +prepare("select 1,2,3"); +$stmt->bind_result($a,$a,$a); +$stmt->prepare(""); +$stmt->prepare("select ".str_repeat("'A',", 0x1201)."1"); +unset($stmt); // trigger dtor + +// There should be no memory leak +$stmt = $mysqli->prepare("select 1,2,3"); +$stmt->bind_result($a,$a,$a); +$stmt->prepare(""); +$stmt->prepare("select 1"); +unset($stmt); // trigger dtor + +mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); +$stmt = $mysqli->prepare("select 1,2,3"); +try { + // We expect an exception to be thrown + $stmt->prepare(""); +} catch (mysqli_sql_exception $e) { + var_dump($e->getMessage()); +} +?> +--EXPECT-- +string(15) "Query was empty" diff --git a/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt b/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt index de4f73bc18ce6..ed682b7cca54b 100644 --- a/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt +++ b/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt @@ -196,18 +196,13 @@ require_once('skipifconnectfailure.inc'); /* stmt_affected_rows is not really meant for SELECT! */ if (mysqli_stmt_prepare($stmt, 'SELECT unknown_column FROM this_table_does_not_exist') || mysqli_stmt_execute($stmt)) - printf("[041] The invalid SELECT statement is issued on purpose\n"); + printf("[041] Expecting SELECT statement to fail on purpose\n"); if (-1 !== ($tmp = mysqli_stmt_affected_rows($stmt))) printf("[042] Expecting int/-1, got %s/%s\n", gettype($tmp), $tmp); - if ($IS_MYSQLND) { - if (false !== ($tmp = mysqli_stmt_store_result($stmt))) - printf("[043] Expecting boolean/false, got %s\%s\n", gettype($tmp), $tmp); - } else { - if (true !== ($tmp = mysqli_stmt_store_result($stmt))) - printf("[043] Libmysql does not care if the previous statement was bogus, expecting boolean/true, got %s\%s\n", gettype($tmp), $tmp); - } + if (true !== ($tmp = mysqli_stmt_store_result($stmt))) + printf("[043] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp); if (0 !== ($tmp = mysqli_stmt_num_rows($stmt))) printf("[044] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp); diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c index f3dee49d88f33..1eac55a03fc89 100644 --- a/ext/mysqlnd/mysqlnd_ps.c +++ b/ext/mysqlnd/mysqlnd_ps.c @@ -391,12 +391,10 @@ mysqlnd_stmt_prepare_read_eof(MYSQLND_STMT * s) /* {{{ mysqlnd_stmt::prepare */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const s, const char * const query, const size_t query_len) +MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * s, const char * const query, const size_t query_len) { MYSQLND_STMT_DATA * stmt = s? s->data : NULL; MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL; - MYSQLND_STMT * s_to_prepare = s; - MYSQLND_STMT_DATA * stmt_to_prepare = stmt; DBG_ENTER("mysqlnd_stmt::prepare"); if (!stmt || !conn) { @@ -412,25 +410,15 @@ MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const s, const char * const SET_EMPTY_ERROR(conn->error_info); if (stmt->state > MYSQLND_STMT_INITTED) { - /* See if we have to clean the wire */ - if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) { - /* Do implicit use_result and then flush the result */ - stmt->default_rset_handler = s->m->use_result; - stmt->default_rset_handler(s); - } - /* No 'else' here please :) */ - if (stmt->state > MYSQLND_STMT_WAITING_USE_OR_STORE && stmt->result) { - stmt->result->m.skip_result(stmt->result); - } /* - Create a new test statement, which we will prepare, but if anything - fails, we will scrap it. + Create a new prepared statement and destroy the previous one. */ - s_to_prepare = conn->m->stmt_init(conn); - if (!s_to_prepare) { + s->m->dtor(s, TRUE); + s = conn->m->stmt_init(conn); + if (!s) { goto fail; } - stmt_to_prepare = s_to_prepare->data; + stmt = s->data; } { @@ -444,13 +432,13 @@ MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const s, const char * const } } - if (FAIL == mysqlnd_stmt_read_prepare_response(s_to_prepare)) { + if (FAIL == mysqlnd_stmt_read_prepare_response(s)) { goto fail; } - if (stmt_to_prepare->param_count) { - if (FAIL == mysqlnd_stmt_skip_metadata(s_to_prepare) || - FAIL == mysqlnd_stmt_prepare_read_eof(s_to_prepare)) + if (stmt->param_count) { + if (FAIL == mysqlnd_stmt_skip_metadata(s) || + FAIL == mysqlnd_stmt_prepare_read_eof(s)) { goto fail; } @@ -461,51 +449,31 @@ MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const s, const char * const Beware that SHOW statements bypass the PS framework and thus they send no metadata at prepare. */ - if (stmt_to_prepare->field_count) { - MYSQLND_RES * result = conn->m->result_init(stmt_to_prepare->field_count); + if (stmt->field_count) { + MYSQLND_RES * result = conn->m->result_init(stmt->field_count); if (!result) { SET_OOM_ERROR(conn->error_info); goto fail; } /* Allocate the result now as it is needed for the reading of metadata */ - stmt_to_prepare->result = result; + stmt->result = result; result->conn = conn->m->get_reference(conn); result->type = MYSQLND_RES_PS_BUF; if (FAIL == result->m.read_result_metadata(result, conn) || - FAIL == mysqlnd_stmt_prepare_read_eof(s_to_prepare)) + FAIL == mysqlnd_stmt_prepare_read_eof(s)) { goto fail; } } - if (stmt_to_prepare != stmt) { - /* swap */ - size_t real_size = sizeof(MYSQLND_STMT) + mysqlnd_plugin_count() * sizeof(void *); - char * tmp_swap = mnd_malloc(real_size); - memcpy(tmp_swap, s, real_size); - memcpy(s, s_to_prepare, real_size); - memcpy(s_to_prepare, tmp_swap, real_size); - mnd_free(tmp_swap); - { - MYSQLND_STMT_DATA * tmp_swap_data = stmt_to_prepare; - stmt_to_prepare = stmt; - stmt = tmp_swap_data; - } - s_to_prepare->m->dtor(s_to_prepare, TRUE); - } stmt->state = MYSQLND_STMT_PREPARED; DBG_INF("PASS"); DBG_RETURN(PASS); fail: - if (stmt_to_prepare != stmt && s_to_prepare) { - s_to_prepare->m->dtor(s_to_prepare, TRUE); - } - stmt->state = MYSQLND_STMT_INITTED; - DBG_INF("FAIL"); DBG_RETURN(FAIL); } From d13ceb74fa48a12ff29ca3d291d568a0f198249b Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 14 Feb 2022 16:23:06 +0000 Subject: [PATCH 04/16] Add fix to NEWS --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index b4d1e4b0378ec..076b2cd2abf92 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 7.4.28 +- Filter: + . Fix #81708: UAF due to php_filter_float() failing for ints + 16 Dec 2021, PHP 7.4.27 From 0fab520ded1babcdf5c54fb4b4d2642de2c7cbfe Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Mon, 14 Feb 2022 17:58:26 -0500 Subject: [PATCH 05/16] Fix zend_register_internal_class_ex alias generation (#8091) This wouldn't work for creating aliases in a namespace. It would create the class alias "MyNS_ClassName" instead of "MyNS\\ClassName" --- build/gen_stub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 486ff679499fc..348cc9e82d277 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -1748,7 +1748,7 @@ function (Name $item) { } if ($this->alias) { - $code .= "\tzend_register_class_alias(\"" . str_replace("\\", "_", $this->alias) . "\", class_entry);\n"; + $code .= "\tzend_register_class_alias(\"" . str_replace("\\", "\\\\", $this->alias) . "\", class_entry);\n"; } foreach ($this->enumCaseInfos as $enumCase) { From 325bcf9f1d0d7c879f441cbbe9a8a28e30f4ea86 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 15 Feb 2022 13:27:37 +0000 Subject: [PATCH 06/16] Prepare for 7.4.29 --- NEWS | 5 ++++- configure.ac | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 076b2cd2abf92..fa117f5185fa4 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 7.4.28 +?? ??? ????, PHP 7.4.29 + + +17 Feb 2022, PHP 7.4.28 - Filter: . Fix #81708: UAF due to php_filter_float() failing for ints diff --git a/configure.ac b/configure.ac index 7155ff432f400..6f829c0e7820a 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[7.4.27-dev],[https://bugs.php.net],[php],[https://www.php.net]) +AC_INIT([PHP],[7.4.29-dev],[https://bugs.php.net],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER From e98a7a68b7b8b5b7974134f8046777bd72f141e4 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 15 Feb 2022 10:15:28 +0100 Subject: [PATCH 07/16] Fix bugtracker URL The php-src bugtracker is now on Github. Closes GH-8102. --- sapi/fpm/fpm/fpm_children.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapi/fpm/fpm/fpm_children.c b/sapi/fpm/fpm/fpm_children.c index a24e06fc483be..0aab23043a943 100644 --- a/sapi/fpm/fpm/fpm_children.c +++ b/sapi/fpm/fpm/fpm_children.c @@ -299,7 +299,7 @@ void fpm_children_bury() /* {{{ */ } } } else { - zlog(ZLOG_ALERT, "oops, unknown child (%d) exited %s. Please open a bug report (https://bugs.php.net).", pid, buf); + zlog(ZLOG_ALERT, "oops, unknown child (%d) exited %s. Please open a bug report (https://github.com/php/php-src/issues).", pid, buf); } } } From bfe9531dc1b8ad235108d4f310f57df0c75d6bb7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 16 Feb 2022 19:01:44 +0100 Subject: [PATCH 08/16] Initialize int_codepoint in parse_code_point_param() This is being passed to convert_cp(), and passing an uninitialized value to a function is undefined behavior. Clang 14 makes use of noundef facts aggressively and miscompiles this code if not initialized. --- ext/intl/uchar/uchar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/intl/uchar/uchar.c b/ext/intl/uchar/uchar.c index 0f44b454b4499..58f9615de7050 100644 --- a/ext/intl/uchar/uchar.c +++ b/ext/intl/uchar/uchar.c @@ -38,7 +38,7 @@ static inline int convert_cp(UChar32* pcp, zend_string *string_codepoint, zend_l static zend_never_inline int parse_code_point_param(INTERNAL_FUNCTION_PARAMETERS, UChar32 *cp) { zend_string *string_codepoint; - zend_long int_codepoint; + zend_long int_codepoint = 0; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint) ZEND_PARSE_PARAMETERS_END_EX(return FAILURE); From f06ac9a486ada028d85cda8a73bdd709eb7b0d95 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 20 Jan 2022 11:30:35 +0100 Subject: [PATCH 09/16] Fix GH-7939: Cannot unserialize IntlTimeZone objects As it is now, `IntlTimeZone`, `IntlCalendar` and `IntlDateFormatter` and some other intl class instances can be serialized, but the representation is meaningless, and unserialization yields uninitialized/ unusable objects. To prevent users from noticing this too late, we deny serialization of such objects in the first place. Closes GH-7945. --- NEWS | 1 + UPGRADING | 8 ++++++++ ext/intl/breakiterator/breakiterator.stub.php | 3 +++ ext/intl/breakiterator/breakiterator_arginfo.h | 5 ++++- ext/intl/breakiterator/breakiterator_iterators.stub.php | 1 + ext/intl/breakiterator/breakiterator_iterators_arginfo.h | 3 ++- ext/intl/calendar/calendar.stub.php | 2 ++ ext/intl/calendar/calendar_arginfo.h | 4 +++- ext/intl/collator/collator.stub.php | 1 + ext/intl/collator/collator_arginfo.h | 3 ++- ext/intl/common/common.stub.php | 1 + ext/intl/common/common_arginfo.h | 3 ++- ext/intl/converter/converter.stub.php | 1 + ext/intl/converter/converter_arginfo.h | 3 ++- ext/intl/dateformat/dateformat.stub.php | 1 + ext/intl/dateformat/dateformat_arginfo.h | 3 ++- ext/intl/dateformat/datepatterngenerator.stub.php | 1 + ext/intl/dateformat/datepatterngenerator_arginfo.h | 3 ++- ext/intl/msgformat/msgformat.stub.php | 1 + ext/intl/msgformat/msgformat_arginfo.h | 3 ++- ext/intl/resourcebundle/resourcebundle.stub.php | 1 + ext/intl/resourcebundle/resourcebundle_arginfo.h | 3 ++- ext/intl/spoofchecker/spoofchecker.stub.php | 1 + ext/intl/spoofchecker/spoofchecker_arginfo.h | 3 ++- ext/intl/timezone/timezone.stub.php | 1 + ext/intl/timezone/timezone_arginfo.h | 3 ++- ext/intl/transliterator/transliterator.stub.php | 1 + ext/intl/transliterator/transliterator_arginfo.h | 3 ++- 28 files changed, 54 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index 09da40c962e28..00ba31fd248e2 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ PHP NEWS - Intl: . Update all grandfathered language tags with preferred values + . Fixed GH-7939 (Cannot unserialize IntlTimeZone objects). (cmb) - OCI8: . Added oci8.prefetch_lob_size directive to tune LOB query performance diff --git a/UPGRADING b/UPGRADING index 4d918a85bfc17..efc6f36df0eef 100644 --- a/UPGRADING +++ b/UPGRADING @@ -126,6 +126,14 @@ PHP 8.2 UPGRADE NOTES 9. Other Changes to Extensions ======================================== +- Intl: + . IntlBreakIterator, IntlRuleBasedBreakIterator, IntlCodePointBreakIterator, + IntlPartsIterator, IntlCalendar, IntlCalendar, Collator, IntlIterator, + UConverter, IntlDateFormatter, IntlDatePatternGenerator, MessageFormatter, + ResourceBundle, Spoofchecker, IntlTimeZone and Transliterator instances are + no longer serializable. Previously, they could be serialized, but + unserialization yielded unusable objects or failed. + - OCI8: . The minimum Oracle Client library version required is now 11.2. diff --git a/ext/intl/breakiterator/breakiterator.stub.php b/ext/intl/breakiterator/breakiterator.stub.php index c78e48da62700..951b4ffc1bdfd 100644 --- a/ext/intl/breakiterator/breakiterator.stub.php +++ b/ext/intl/breakiterator/breakiterator.stub.php @@ -2,6 +2,7 @@ /** @generate-class-entries */ +/** @not-serializable */ class IntlBreakIterator implements IteratorAggregate { /** @tentative-return-type */ @@ -69,6 +70,7 @@ public function setText(string $text): ?bool {} // TODO return false instead of public function getIterator(): Iterator {} } +/** @not-serializable */ class IntlRuleBasedBreakIterator extends IntlBreakIterator { public function __construct(string $rules, bool $compiled = false) {} @@ -86,6 +88,7 @@ public function getRuleStatus(): int {} public function getRuleStatusVec(): array|false {} } +/** @not-serializable */ class IntlCodePointBreakIterator extends IntlBreakIterator { /** @tentative-return-type */ diff --git a/ext/intl/breakiterator/breakiterator_arginfo.h b/ext/intl/breakiterator/breakiterator_arginfo.h index 04f834a087eb0..ffb5017ab4263 100644 --- a/ext/intl/breakiterator/breakiterator_arginfo.h +++ b/ext/intl/breakiterator/breakiterator_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 1979da7ee2fa55b27f1c91bb4e0ddc37e8505b08 */ + * Stub hash: 724e0c36ee113b67906cc9a8cea23781f0a961bf */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_IntlBreakIterator_createCharacterInstance, 0, 0, IntlBreakIterator, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") @@ -161,6 +161,7 @@ static zend_class_entry *register_class_IntlBreakIterator(zend_class_entry *clas INIT_CLASS_ENTRY(ce, "IntlBreakIterator", class_IntlBreakIterator_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; zend_class_implements(class_entry, 1, class_entry_IteratorAggregate); return class_entry; @@ -172,6 +173,7 @@ static zend_class_entry *register_class_IntlRuleBasedBreakIterator(zend_class_en INIT_CLASS_ENTRY(ce, "IntlRuleBasedBreakIterator", class_IntlRuleBasedBreakIterator_methods); class_entry = zend_register_internal_class_ex(&ce, class_entry_IntlBreakIterator); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; return class_entry; } @@ -182,6 +184,7 @@ static zend_class_entry *register_class_IntlCodePointBreakIterator(zend_class_en INIT_CLASS_ENTRY(ce, "IntlCodePointBreakIterator", class_IntlCodePointBreakIterator_methods); class_entry = zend_register_internal_class_ex(&ce, class_entry_IntlBreakIterator); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; return class_entry; } diff --git a/ext/intl/breakiterator/breakiterator_iterators.stub.php b/ext/intl/breakiterator/breakiterator_iterators.stub.php index 7e7603fe6fd54..9d2fa9442819f 100644 --- a/ext/intl/breakiterator/breakiterator_iterators.stub.php +++ b/ext/intl/breakiterator/breakiterator_iterators.stub.php @@ -2,6 +2,7 @@ /** @generate-class-entries */ +/** @not-serializable */ class IntlPartsIterator extends IntlIterator { /** @tentative-return-type */ diff --git a/ext/intl/breakiterator/breakiterator_iterators_arginfo.h b/ext/intl/breakiterator/breakiterator_iterators_arginfo.h index ee5e1279b5d2a..8db11d23739e0 100644 --- a/ext/intl/breakiterator/breakiterator_iterators_arginfo.h +++ b/ext/intl/breakiterator/breakiterator_iterators_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 267199a0a3532b5acf1d700f14329cdb2f2db0e1 */ + * Stub hash: f72f108e37541ac042bb25249ef226211c344189 */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_IntlPartsIterator_getBreakIterator, 0, 0, IntlBreakIterator, 0) ZEND_END_ARG_INFO() @@ -24,6 +24,7 @@ static zend_class_entry *register_class_IntlPartsIterator(zend_class_entry *clas INIT_CLASS_ENTRY(ce, "IntlPartsIterator", class_IntlPartsIterator_methods); class_entry = zend_register_internal_class_ex(&ce, class_entry_IntlIterator); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; return class_entry; } diff --git a/ext/intl/calendar/calendar.stub.php b/ext/intl/calendar/calendar.stub.php index 709d0e3667c7f..85c2c8a05e52c 100644 --- a/ext/intl/calendar/calendar.stub.php +++ b/ext/intl/calendar/calendar.stub.php @@ -2,6 +2,7 @@ /** @generate-class-entries */ +/** @not-serializable */ class IntlCalendar { private function __construct() {} @@ -281,6 +282,7 @@ public function setTimeZone($timezone): bool {} public function toDateTime(): DateTime|false {} } +/** @not-serializable */ class IntlGregorianCalendar extends IntlCalendar { /** diff --git a/ext/intl/calendar/calendar_arginfo.h b/ext/intl/calendar/calendar_arginfo.h index 7be45231f9c90..7b22161f30f5d 100644 --- a/ext/intl/calendar/calendar_arginfo.h +++ b/ext/intl/calendar/calendar_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 7be0e49d2b898587c4bbefaaf613932ae4786c52 */ + * Stub hash: 0096dc9e60e2256054d23344e024df1d6527a5fa */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar___construct, 0, 0, 0) ZEND_END_ARG_INFO() @@ -291,6 +291,7 @@ static zend_class_entry *register_class_IntlCalendar(void) INIT_CLASS_ENTRY(ce, "IntlCalendar", class_IntlCalendar_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; return class_entry; } @@ -301,6 +302,7 @@ static zend_class_entry *register_class_IntlGregorianCalendar(zend_class_entry * INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", class_IntlGregorianCalendar_methods); class_entry = zend_register_internal_class_ex(&ce, class_entry_IntlCalendar); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; return class_entry; } diff --git a/ext/intl/collator/collator.stub.php b/ext/intl/collator/collator.stub.php index e0c8487af79ff..bd201ee28be61 100644 --- a/ext/intl/collator/collator.stub.php +++ b/ext/intl/collator/collator.stub.php @@ -2,6 +2,7 @@ /** @generate-class-entries */ +/** @not-serializable */ class Collator { public function __construct(string $locale) {} diff --git a/ext/intl/collator/collator_arginfo.h b/ext/intl/collator/collator_arginfo.h index f13e1197dd8eb..c693ad925088b 100644 --- a/ext/intl/collator/collator_arginfo.h +++ b/ext/intl/collator/collator_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 4baf9586ab91f37facc865cf1b3aa6a87e5d732d */ + * Stub hash: c2e08f16cdc3d64e82fc277b4a59250d4b19c84e */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) @@ -96,6 +96,7 @@ static zend_class_entry *register_class_Collator(void) INIT_CLASS_ENTRY(ce, "Collator", class_Collator_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; return class_entry; } diff --git a/ext/intl/common/common.stub.php b/ext/intl/common/common.stub.php index 0e87db6f51920..acadedd39934c 100644 --- a/ext/intl/common/common.stub.php +++ b/ext/intl/common/common.stub.php @@ -2,6 +2,7 @@ /** @generate-class-entries */ +/** @not-serializable */ class IntlIterator implements Iterator { /** @tentative-return-type */ diff --git a/ext/intl/common/common_arginfo.h b/ext/intl/common/common_arginfo.h index 79d63aa5f4fdd..cbf422bf0d4c6 100644 --- a/ext/intl/common/common_arginfo.h +++ b/ext/intl/common/common_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c4698dbe96a069a63265052e9a105f074e3dda0a */ + * Stub hash: 976f2d1417928226d6c04ff444c4feda152d91df */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_IntlIterator_current, 0, 0, IS_MIXED, 0) ZEND_END_ARG_INFO() @@ -37,6 +37,7 @@ static zend_class_entry *register_class_IntlIterator(zend_class_entry *class_ent INIT_CLASS_ENTRY(ce, "IntlIterator", class_IntlIterator_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; zend_class_implements(class_entry, 1, class_entry_Iterator); return class_entry; diff --git a/ext/intl/converter/converter.stub.php b/ext/intl/converter/converter.stub.php index 9e07341778b20..19a8bbef9512f 100644 --- a/ext/intl/converter/converter.stub.php +++ b/ext/intl/converter/converter.stub.php @@ -2,6 +2,7 @@ /** @generate-class-entries */ +/** @not-serializable */ class UConverter { public function __construct(?string $destination_encoding = null, ?string $source_encoding = null) {} diff --git a/ext/intl/converter/converter_arginfo.h b/ext/intl/converter/converter_arginfo.h index fa88dd2ab630e..cae2a68d4be07 100644 --- a/ext/intl/converter/converter_arginfo.h +++ b/ext/intl/converter/converter_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 2a6d8499e1a2d414130e366783a1c084f47a3293 */ + * Stub hash: 0ab2d741996611bbfcfb07462bc184a02f353585 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_UConverter___construct, 0, 0, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, destination_encoding, IS_STRING, 1, "null") @@ -125,6 +125,7 @@ static zend_class_entry *register_class_UConverter(void) INIT_CLASS_ENTRY(ce, "UConverter", class_UConverter_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; return class_entry; } diff --git a/ext/intl/dateformat/dateformat.stub.php b/ext/intl/dateformat/dateformat.stub.php index 11c0d05dc41e6..0ea15225f5a25 100644 --- a/ext/intl/dateformat/dateformat.stub.php +++ b/ext/intl/dateformat/dateformat.stub.php @@ -2,6 +2,7 @@ /** @generate-class-entries */ +/** @not-serializable */ class IntlDateFormatter { /** diff --git a/ext/intl/dateformat/dateformat_arginfo.h b/ext/intl/dateformat/dateformat_arginfo.h index ccad07cd60a9d..9cb936f530992 100644 --- a/ext/intl/dateformat/dateformat_arginfo.h +++ b/ext/intl/dateformat/dateformat_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 82f90e7b0528b2b3515c086763dba4de0f92dfa7 */ + * Stub hash: c7c0d08433ab9dbf59777072550895d85294aad4 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) @@ -141,6 +141,7 @@ static zend_class_entry *register_class_IntlDateFormatter(void) INIT_CLASS_ENTRY(ce, "IntlDateFormatter", class_IntlDateFormatter_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; return class_entry; } diff --git a/ext/intl/dateformat/datepatterngenerator.stub.php b/ext/intl/dateformat/datepatterngenerator.stub.php index c0190fb4e9859..a9ce7c1463120 100644 --- a/ext/intl/dateformat/datepatterngenerator.stub.php +++ b/ext/intl/dateformat/datepatterngenerator.stub.php @@ -2,6 +2,7 @@ /** @generate-class-entries */ +/** @not-serializable */ class IntlDatePatternGenerator { public function __construct(?string $locale = null) {} diff --git a/ext/intl/dateformat/datepatterngenerator_arginfo.h b/ext/intl/dateformat/datepatterngenerator_arginfo.h index 63e8df7a5429c..f72e24cd1e7aa 100644 --- a/ext/intl/dateformat/datepatterngenerator_arginfo.h +++ b/ext/intl/dateformat/datepatterngenerator_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 74026c524046787844da9f8132029735243176c6 */ + * Stub hash: 4456b13f7ed59847bbf129cd45b0d1f63ce70108 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDatePatternGenerator___construct, 0, 0, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") @@ -32,6 +32,7 @@ static zend_class_entry *register_class_IntlDatePatternGenerator(void) INIT_CLASS_ENTRY(ce, "IntlDatePatternGenerator", class_IntlDatePatternGenerator_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; return class_entry; } diff --git a/ext/intl/msgformat/msgformat.stub.php b/ext/intl/msgformat/msgformat.stub.php index c85a9b92b3a32..20afbd2b42cd4 100644 --- a/ext/intl/msgformat/msgformat.stub.php +++ b/ext/intl/msgformat/msgformat.stub.php @@ -2,6 +2,7 @@ /** @generate-class-entries */ +/** @not-serializable */ class MessageFormatter { public function __construct(string $locale, string $pattern) {} diff --git a/ext/intl/msgformat/msgformat_arginfo.h b/ext/intl/msgformat/msgformat_arginfo.h index 8f0456f6cbb05..4e7146048640d 100644 --- a/ext/intl/msgformat/msgformat_arginfo.h +++ b/ext/intl/msgformat/msgformat_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 44bc7b87c0b6c674bf94764b3f036006e3933713 */ + * Stub hash: d595f5c582996ebb96ab39df8cb56c4cf6c8dfcf */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MessageFormatter___construct, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) @@ -81,6 +81,7 @@ static zend_class_entry *register_class_MessageFormatter(void) INIT_CLASS_ENTRY(ce, "MessageFormatter", class_MessageFormatter_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; return class_entry; } diff --git a/ext/intl/resourcebundle/resourcebundle.stub.php b/ext/intl/resourcebundle/resourcebundle.stub.php index 4247fca318a4e..47df7a19b3a9f 100644 --- a/ext/intl/resourcebundle/resourcebundle.stub.php +++ b/ext/intl/resourcebundle/resourcebundle.stub.php @@ -2,6 +2,7 @@ /** @generate-class-entries */ +/** @not-serializable */ class ResourceBundle implements IteratorAggregate, Countable { public function __construct(?string $locale, ?string $bundle, bool $fallback = true) {} diff --git a/ext/intl/resourcebundle/resourcebundle_arginfo.h b/ext/intl/resourcebundle/resourcebundle_arginfo.h index 0564b026dc39b..6a478edd430b2 100644 --- a/ext/intl/resourcebundle/resourcebundle_arginfo.h +++ b/ext/intl/resourcebundle/resourcebundle_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: d27fa5a4dc092b94e48fc876070f440c247fa6c2 */ + * Stub hash: 7816536650d8513ef6998233096b0bf6a29d7af4 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ResourceBundle___construct, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) @@ -62,6 +62,7 @@ static zend_class_entry *register_class_ResourceBundle(zend_class_entry *class_e INIT_CLASS_ENTRY(ce, "ResourceBundle", class_ResourceBundle_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; zend_class_implements(class_entry, 2, class_entry_IteratorAggregate, class_entry_Countable); return class_entry; diff --git a/ext/intl/spoofchecker/spoofchecker.stub.php b/ext/intl/spoofchecker/spoofchecker.stub.php index 0ff7cc6da7c4a..dc414949b0ab8 100644 --- a/ext/intl/spoofchecker/spoofchecker.stub.php +++ b/ext/intl/spoofchecker/spoofchecker.stub.php @@ -2,6 +2,7 @@ /** @generate-class-entries */ +/** @not-serializable */ class Spoofchecker { public function __construct() {} diff --git a/ext/intl/spoofchecker/spoofchecker_arginfo.h b/ext/intl/spoofchecker/spoofchecker_arginfo.h index 281ea7f3ed330..c030015d49c86 100644 --- a/ext/intl/spoofchecker/spoofchecker_arginfo.h +++ b/ext/intl/spoofchecker/spoofchecker_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: d915fb3698e0bde4af2a1175fff882cae1f55668 */ + * Stub hash: f1c86958a39aa8f89ee468a0753f6a5b232c3e1f */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Spoofchecker___construct, 0, 0, 0) ZEND_END_ARG_INFO() @@ -58,6 +58,7 @@ static zend_class_entry *register_class_Spoofchecker(void) INIT_CLASS_ENTRY(ce, "Spoofchecker", class_Spoofchecker_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; return class_entry; } diff --git a/ext/intl/timezone/timezone.stub.php b/ext/intl/timezone/timezone.stub.php index cc4f6084fd535..55592a386cc0f 100644 --- a/ext/intl/timezone/timezone.stub.php +++ b/ext/intl/timezone/timezone.stub.php @@ -2,6 +2,7 @@ /** @generate-class-entries */ +/** @not-serializable */ class IntlTimeZone { private function __construct() {} diff --git a/ext/intl/timezone/timezone_arginfo.h b/ext/intl/timezone/timezone_arginfo.h index c8a77dcb07829..d0d1e94d2f84f 100644 --- a/ext/intl/timezone/timezone_arginfo.h +++ b/ext/intl/timezone/timezone_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3f945431687a2f45b0ec8c3a6435ef68008c75ad */ + * Stub hash: 2ec7a46ca205dfeb9ef0dc3c8e8d78bce1cf43be */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlTimeZone___construct, 0, 0, 0) ZEND_END_ARG_INFO() @@ -169,6 +169,7 @@ static zend_class_entry *register_class_IntlTimeZone(void) INIT_CLASS_ENTRY(ce, "IntlTimeZone", class_IntlTimeZone_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; return class_entry; } diff --git a/ext/intl/transliterator/transliterator.stub.php b/ext/intl/transliterator/transliterator.stub.php index 6d52263e0646f..81c4070352825 100644 --- a/ext/intl/transliterator/transliterator.stub.php +++ b/ext/intl/transliterator/transliterator.stub.php @@ -2,6 +2,7 @@ /** @generate-class-entries */ +/** @not-serializable */ class Transliterator { public string $id; diff --git a/ext/intl/transliterator/transliterator_arginfo.h b/ext/intl/transliterator/transliterator_arginfo.h index c80be4f5b3460..03aa3b1f0ee9c 100644 --- a/ext/intl/transliterator/transliterator_arginfo.h +++ b/ext/intl/transliterator/transliterator_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 8a6aaab7dd89a014726bd1fdf1f40f7b6fa98ea5 */ + * Stub hash: 8ef1f285c6138fbc58c1e4cef04d4ac09dfc3fef */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Transliterator___construct, 0, 0, 0) ZEND_END_ARG_INFO() @@ -61,6 +61,7 @@ static zend_class_entry *register_class_Transliterator(void) INIT_CLASS_ENTRY(ce, "Transliterator", class_Transliterator_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; zval property_id_default_value; ZVAL_UNDEF(&property_id_default_value); From 8f5480e7ebbb94c46baa4ca8c7d4826f9ae614af Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 17 Feb 2022 19:16:15 +0300 Subject: [PATCH 10/16] Release lock and protect SHM before replaying warnings --- ext/opcache/ZendAccelerator.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 6883979e7d131..c195ad7d2cbcc 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2195,6 +2195,9 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type) zend_hash_index_del(EG(zend_constants), new_const_num); } } + persistent_script->dynamic_members.last_used = ZCG(request_time); + SHM_PROTECT(); + HANDLE_UNBLOCK_INTERRUPTIONS(); } else { #if !ZEND_WIN32 @@ -2231,16 +2234,16 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type) } } } + + persistent_script->dynamic_members.last_used = ZCG(request_time); + SHM_PROTECT(); + HANDLE_UNBLOCK_INTERRUPTIONS(); + replay_warnings(persistent_script); zend_file_handle_dtor(file_handle); from_shared_memory = 1; } - persistent_script->dynamic_members.last_used = ZCG(request_time); - - SHM_PROTECT(); - HANDLE_UNBLOCK_INTERRUPTIONS(); - /* Fetch jit auto globals used in the script before execution */ if (persistent_script->ping_auto_globals_mask) { zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask); From 7e8257fbd29193e2087cb90ea74afa3ec4cd7c64 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 18 Feb 2022 11:35:43 +0300 Subject: [PATCH 11/16] Disable ASSIGN optimization for values inferred for fatal errors. --- Zend/Optimizer/dfa_pass.c | 2 ++ ext/opcache/tests/jit/assign_051.phpt | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 ext/opcache/tests/jit/assign_051.phpt diff --git a/Zend/Optimizer/dfa_pass.c b/Zend/Optimizer/dfa_pass.c index d0b52fbfcd1bb..5f7d027a73bf6 100644 --- a/Zend/Optimizer/dfa_pass.c +++ b/Zend/Optimizer/dfa_pass.c @@ -1356,6 +1356,7 @@ void zend_dfa_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx if (src_var >= 0 && !(ssa->var_info[src_var].type & MAY_BE_REF) + && (ssa->var_info[src_var].type & (MAY_BE_UNDEF|MAY_BE_ANY)) && ssa->vars[src_var].definition >= 0 && ssa->ops[ssa->vars[src_var].definition].result_def == src_var && ssa->ops[ssa->vars[src_var].definition].result_use < 0 @@ -1513,6 +1514,7 @@ void zend_dfa_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx if ((opline->op2_type & (IS_TMP_VAR|IS_VAR)) && src_var >= 0 && !(ssa->var_info[src_var].type & MAY_BE_REF) + && (ssa->var_info[src_var].type & (MAY_BE_UNDEF|MAY_BE_ANY)) && ssa->vars[src_var].definition >= 0 && ssa->ops[ssa->vars[src_var].definition].result_def == src_var && ssa->ops[ssa->vars[src_var].definition].result_use < 0 diff --git a/ext/opcache/tests/jit/assign_051.phpt b/ext/opcache/tests/jit/assign_051.phpt new file mode 100644 index 0000000000000..88264161d4af5 --- /dev/null +++ b/ext/opcache/tests/jit/assign_051.phpt @@ -0,0 +1,23 @@ +--TEST-- +JIT ASSIGN: incorrect assignment optimization +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +opcache.protect_memory=1 +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Error: Undefined constant "y" in %sassign_051.php:3 +Stack trace: +#0 %sassign_051.php(7): foo(0) +#1 {main} + thrown in %sassign_051.php on line 3 From 84a638a346f918e1ed6afc23f8ea1b7b7b90df1b Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 18 Feb 2022 12:20:40 +0300 Subject: [PATCH 12/16] Fix memory leak Fixes oss-fuzz #44685 --- .../resume_running_generator_error_002.phpt | 17 +++++++++++++++++ Zend/zend_generators.c | 1 + 2 files changed, 18 insertions(+) create mode 100644 Zend/tests/generators/errors/resume_running_generator_error_002.phpt diff --git a/Zend/tests/generators/errors/resume_running_generator_error_002.phpt b/Zend/tests/generators/errors/resume_running_generator_error_002.phpt new file mode 100644 index 0000000000000..e71e32a886dcc --- /dev/null +++ b/Zend/tests/generators/errors/resume_running_generator_error_002.phpt @@ -0,0 +1,17 @@ +--TEST-- +Memory leak when resume an already running generator +--FILE-- +send($g); +} +$gen = gen(); +try { + $gen->send($gen); +} catch (Throwable $e) { + echo $e->getMessage() . "\n"; +} +?> +--EXPECT-- +Cannot resume an already running generator diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index 68c1865c0002e..2e6e22effab9d 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -924,6 +924,7 @@ ZEND_METHOD(Generator, send) root = zend_generator_get_current(generator); /* Put sent value in the target VAR slot, if it is used */ if (root->send_target) { + zval_ptr_dtor(root->send_target); ZVAL_COPY(root->send_target, value); } From 3198b8787bdbe08a893faf1164c48b9bd0f86562 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 18 Feb 2022 17:15:07 +0300 Subject: [PATCH 13/16] JIT: Fix register allocation Fixes oss-fuzz #44689 --- ext/opcache/jit/zend_jit.c | 8 ++++++-- ext/opcache/tests/jit/reg_alloc_010.phpt | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 ext/opcache/tests/jit/reg_alloc_010.phpt diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index bec0146afecbf..920020fb2d01b 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -145,8 +145,8 @@ static zend_bool zend_ssa_is_last_use(const zend_op_array *op_array, const zend_ } while (phi); } - next_use = zend_ssa_next_use(ssa->ops, var, use); - if (next_use < 0) { + if (ssa->cfg.blocks[ssa->cfg.map[use]].loop_header > 0 + || (ssa->cfg.blocks[ssa->cfg.map[use]].flags & ZEND_BB_LOOP_HEADER)) { int b = ssa->cfg.map[use]; int prev_use = ssa->vars[var].use_chain; @@ -158,6 +158,10 @@ static zend_bool zend_ssa_is_last_use(const zend_op_array *op_array, const zend_ } prev_use = zend_ssa_next_use(ssa->ops, var, prev_use); } + } + + next_use = zend_ssa_next_use(ssa->ops, var, use); + if (next_use < 0) { return 1; } else if (zend_ssa_is_no_val_use(op_array->opcodes + next_use, ssa->ops + next_use, var)) { return 1; diff --git a/ext/opcache/tests/jit/reg_alloc_010.phpt b/ext/opcache/tests/jit/reg_alloc_010.phpt new file mode 100644 index 0000000000000..d14b107295346 --- /dev/null +++ b/ext/opcache/tests/jit/reg_alloc_010.phpt @@ -0,0 +1,24 @@ +--TEST-- +Register Alloction 010: Missed store +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +--FILE-- + +DONE +--EXPECTF-- +Warning: Undefined variable $cnt in %sreg_alloc_010.php on line 3 + +Warning: Undefined variable $cnt in %sreg_alloc_010.php on line 3 +DONE \ No newline at end of file From 2753b454f3cff026f9220b57c1f87b025608b9d0 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 18 Feb 2022 13:43:19 +0100 Subject: [PATCH 14/16] [ci skip] Don't run GitHub actions on forks Closes GH-8111 Closes GH-8119 --- .github/workflows/close-needs-feedback.yml | 1 + .github/workflows/close-stale-prs.yml | 1 + .github/workflows/remove-needs-feedback.yml | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/close-needs-feedback.yml b/.github/workflows/close-needs-feedback.yml index 5af9133a44198..7197598f38c49 100644 --- a/.github/workflows/close-needs-feedback.yml +++ b/.github/workflows/close-needs-feedback.yml @@ -6,6 +6,7 @@ on: jobs: build: + if: github.repository_owner == 'php' runs-on: ubuntu-latest steps: - name: Close old issues that need feedback diff --git a/.github/workflows/close-stale-prs.yml b/.github/workflows/close-stale-prs.yml index 5aa178eed2c2c..e5fbacff5d152 100644 --- a/.github/workflows/close-stale-prs.yml +++ b/.github/workflows/close-stale-prs.yml @@ -6,6 +6,7 @@ on: jobs: stale: + if: github.repository_owner == 'php' runs-on: ubuntu-latest steps: - uses: actions/stale@v4 diff --git a/.github/workflows/remove-needs-feedback.yml b/.github/workflows/remove-needs-feedback.yml index 8f6dfc47f1664..fded33b442081 100644 --- a/.github/workflows/remove-needs-feedback.yml +++ b/.github/workflows/remove-needs-feedback.yml @@ -7,7 +7,7 @@ on: jobs: build: - if: "contains(github.event.issue.labels.*.name, 'Status: Needs Feedback') && github.event.issue.user.login == github.event.sender.login" + if: "github.repository_owner == 'php' && contains(github.event.issue.labels.*.name, 'Status: Needs Feedback') && github.event.issue.user.login == github.event.sender.login" runs-on: ubuntu-latest steps: - uses: actions-ecosystem/action-remove-labels@v1 From 19063a84f0e815b3efb65d8e5349247ecb291e17 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 17 Feb 2022 14:48:18 +0100 Subject: [PATCH 15/16] Fix null static_variable_ptr for uncalled fake closures Closes GH-8083 Closes GH-8109 --- NEWS | 2 ++ Zend/tests/gh8083.phpt | 22 ++++++++++++++++++++++ Zend/zend_closures.c | 7 +++++++ 3 files changed, 31 insertions(+) create mode 100644 Zend/tests/gh8083.phpt diff --git a/NEWS b/NEWS index d57dd9c37e884..cea996c4ebdf6 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ PHP NEWS - Core: . Fixed Haiku ZTS build. (David Carlier) . Fixed bug GH-8059 arginfo not regenerated for extension. (Remi) + . Fixed bug GH-8083 Segfault when dumping uncalled fake closure with static + variables. (ilutov) - GD: . Fixed libpng warning when loading interlaced images. (Brett) diff --git a/Zend/tests/gh8083.phpt b/Zend/tests/gh8083.phpt new file mode 100644 index 0000000000000..a98de47cbf375 --- /dev/null +++ b/Zend/tests/gh8083.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-8083 (var_dump() on closure with static variable segfaults) +--FILE-- + +--EXPECT-- +object(Closure)#1 (1) { + ["static"]=> + array(1) { + ["i"]=> + NULL + } +} diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index b5c0b47553248..0dab5537a3752 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -697,6 +697,13 @@ static void zend_create_closure_ex(zval *res, zend_function *func, zend_class_en } ZEND_MAP_PTR_INIT(closure->func.op_array.static_variables_ptr, &closure->func.op_array.static_variables); + } else if (func->op_array.static_variables) { + HashTable *ht = ZEND_MAP_PTR_GET(func->op_array.static_variables_ptr); + + if (!ht) { + ht = zend_array_dup(func->op_array.static_variables); + ZEND_MAP_PTR_SET(closure->func.op_array.static_variables_ptr, ht); + } } /* Runtime cache is scope-dependent, so we cannot reuse it if the scope changed */ From f3cc49708b978fa7bdf5159f775b04ae05e8f81c Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sun, 20 Feb 2022 14:41:41 +0100 Subject: [PATCH 16/16] Deprecate implicit bool to string coercion --- Zend/tests/017.phpt | 2 + .../call_user_func_strict_arginfo_check.phpt | 3 +- .../tests/type_declarations/scalar_basic.phpt | 2 + .../scalar_return_basic_64bit.phpt | 2 + .../union_types/type_checking_weak.phpt | 4 +- Zend/zend_API.c | 3 + ext/iconv/tests/bug48147.phpt | 4 + ext/iconv/tests/iconv_mime_decode.phpt | 2 + ext/json/tests/bug69187.phpt | 5 +- ext/reflection/tests/005.phpt | 6 +- .../ReflectionClass_constructor_002.phpt | 2 + .../ReflectionClass_getConstant_error.phpt | 4 +- .../tests/ReflectionClass_getMethod_002.phpt | 2 + .../ReflectionClass_getProperty_002.phpt | 2 + .../ReflectionClass_hasConstant_002.phpt | 4 +- .../tests/ReflectionClass_hasMethod_002.phpt | 4 +- .../ReflectionClass_hasProperty_002.phpt | 4 +- .../ReflectionMethod_constructor_error1.phpt | 6 + ext/reflection/tests/bug64936.phpt | 5 +- ext/session/tests/010.phpt | 3 +- .../tests/session_encode_variation8.phpt | 2 + .../tests/session_set_save_handler_basic.phpt | 2 + .../session_set_save_handler_closures.phpt | 2 + .../session_set_save_handler_variation1.phpt | 2 + ext/standard/tests/file/005_variation2.phpt | 8 + .../tests/file/file_exists_variation1.phpt | 4 +- .../file/file_get_contents_variation8.phpt | 4 + .../file/file_put_contents_variation8.phpt | 6 + .../tests/file/filegroup_variation2.phpt | 4 + .../tests/file/fileinode_variation2.phpt | 4 + .../tests/file/fileowner_variation2.phpt | 4 + .../tests/file/fileperms_variation2.phpt | 4 + .../tests/file/filesize_variation5.phpt | 2 + ext/standard/tests/file/fnmatch_basic.phpt | 10 +- .../tests/file/fnmatch_variation.phpt | 146 +++++++++++- ext/standard/tests/file/fread_variation2.phpt | 144 ++++++++++++ ext/standard/tests/file/fread_variation4.phpt | 116 ++++++++- ext/standard/tests/file/glob_variation.phpt | 14 ++ .../tests/file/is_dir_variation3.phpt | 6 +- .../tests/file/is_executable_variation3.phpt | 6 +- .../tests/file/is_readable_variation3.phpt | 6 +- .../tests/file/is_writable_variation3.phpt | 10 +- .../tests/file/lstat_stat_variation22.phpt | 4 + .../tests/file/pathinfo_variaton.phpt | 22 +- ext/standard/tests/file/readfile_error.phpt | 2 + .../tests/file/readfile_variation10.phpt | 4 + .../tests/file/readlink_variation1.phpt | 4 + .../tests/file/rename_variation13.phpt | 14 ++ .../symlink_link_linkinfo_is_link_error1.phpt | 6 + .../symlink_link_linkinfo_is_link_error2.phpt | 6 + .../tests/file/tempnam_variation3.phpt | 4 + .../tests/file/tempnam_variation7.phpt | 4 + ext/standard/tests/file/unlink_error.phpt | 4 + .../escapeshellarg_variation1.phpt | 10 +- .../get_cfg_var_variation2.phpt | 10 +- .../tests/general_functions/uniqid_basic.phpt | 12 + .../tests/math/base_convert_variation1.phpt | 8 + .../tests/math/bindec_basic_64bit.phpt | 4 + .../tests/math/bindec_variation1_64bit.phpt | 8 + .../tests/math/hexdec_basic_64bit.phpt | 4 + .../tests/math/hexdec_variation1_64bit.phpt | 8 + .../tests/math/octdec_basic_64bit.phpt | 4 + .../tests/math/octdec_variation1.phpt | 8 + ext/standard/tests/network/inet_ipv6.phpt | 4 +- .../tests/streams/stream_socket_pair.phpt | 1 + .../tests/strings/chop_variation5.phpt | 4 +- ext/standard/tests/strings/implode1.phpt | 4 + .../tests/strings/join_variation1.phpt | 10 +- .../tests/strings/join_variation4.phpt | 4 + ext/standard/tests/strings/lcfirst.phpt | 4 + ext/standard/tests/strings/ltrim.phpt | 4 +- .../strings/quoted_printable_encode_001.phpt | 4 +- ext/standard/tests/strings/rtrim.phpt | 2 + .../tests/strings/sprintf_variation1.phpt | 26 +- ext/standard/tests/strings/str_pad.phpt | 70 +++++- ext/standard/tests/strings/str_repeat.phpt | 14 +- .../tests/strings/str_replace_variation1.phpt | 4 + .../tests/strings/str_replace_variation2.phpt | 4 + ext/standard/tests/strings/strcasecmp.phpt | 222 ++++++++++++++---- ext/standard/tests/strings/strcmp.phpt | 136 ++++++++--- .../tests/strings/strip_tags_variation2.phpt | 10 +- ext/standard/tests/strings/stripos.phpt | 14 +- .../tests/strings/stripos_variation1.phpt | 10 +- .../tests/strings/stripos_variation2.phpt | 10 +- .../tests/strings/stristr_variation2.phpt | 10 +- ext/standard/tests/strings/strlen.phpt | 8 +- .../strings/strnatcasecmp_variation1.phpt | 4 +- ext/standard/tests/strings/strpos.phpt | 8 +- .../tests/strings/strrchr_variation1.phpt | 4 + .../tests/strings/strrchr_variation2.phpt | 6 +- .../tests/strings/strripos_variation1.phpt | 18 +- .../tests/strings/strripos_variation2.phpt | 18 +- .../tests/strings/strrpos_variation2.phpt | 10 +- .../tests/strings/strrpos_variation7.phpt | 4 +- ext/standard/tests/strings/strstr.phpt | 4 + ext/standard/tests/strings/strtolower.phpt | 4 + ext/standard/tests/strings/strtoupper1.phpt | 4 + .../tests/strings/strtr_variation4.phpt | 10 +- .../tests/strings/strtr_variation6.phpt | 8 + .../tests/strings/strtr_variation8.phpt | 8 + ext/standard/tests/strings/trim1.phpt | 2 + ext/standard/tests/strings/ucfirst.phpt | 4 + 102 files changed, 1286 insertions(+), 134 deletions(-) diff --git a/Zend/tests/017.phpt b/Zend/tests/017.phpt index 619365cbce17f..acf825f37240f 100644 --- a/Zend/tests/017.phpt +++ b/Zend/tests/017.phpt @@ -51,6 +51,8 @@ string(5) "array" int(%d) string(5) "array" int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) string(5) "array" int(%d) diff --git a/Zend/tests/call_user_func_strict_arginfo_check.phpt b/Zend/tests/call_user_func_strict_arginfo_check.phpt index 1f21ee989dd5a..4f226ed0534a7 100644 --- a/Zend/tests/call_user_func_strict_arginfo_check.phpt +++ b/Zend/tests/call_user_func_strict_arginfo_check.phpt @@ -10,5 +10,6 @@ namespace Foo; var_dump(call_user_func('strlen', false)); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) diff --git a/Zend/tests/type_declarations/scalar_basic.phpt b/Zend/tests/type_declarations/scalar_basic.phpt index c69d17c8c7004..73ebf5c85d2bf 100644 --- a/Zend/tests/type_declarations/scalar_basic.phpt +++ b/Zend/tests/type_declarations/scalar_basic.phpt @@ -197,9 +197,11 @@ string(%d) "%d" string(3) "NAN" *** Trying bool(true) +E_DEPRECATED: Implicit bool to string coercion is deprecated on line 16 string(1) "1" *** Trying bool(false) +E_DEPRECATED: Implicit bool to string coercion is deprecated on line 16 string(0) "" *** Trying NULL diff --git a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt index 644ff58299440..25c953d4380f7 100644 --- a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt +++ b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt @@ -158,8 +158,10 @@ string(19) "9223372036854775807" *** Trying float(NAN) string(3) "NAN" *** Trying bool(true) +E_DEPRECATED: Implicit bool to string coercion is deprecated on line 16 string(1) "1" *** Trying bool(false) +E_DEPRECATED: Implicit bool to string coercion is deprecated on line 16 string(0) "" *** Trying NULL *** Caught {closure}(): Return value must be of type string, null returned in %s on line %d diff --git a/Zend/tests/type_declarations/union_types/type_checking_weak.phpt b/Zend/tests/type_declarations/union_types/type_checking_weak.phpt index 351a3e9e78ede..04444979ab86e 100644 --- a/Zend/tests/type_declarations/union_types/type_checking_weak.phpt +++ b/Zend/tests/type_declarations/union_types/type_checking_weak.phpt @@ -181,8 +181,8 @@ INF => "INF" "42x" => "42x" "x" => "x" "" => "" -true => "1" -false => "" +true => "1" (Implicit bool to string coercion is deprecated) +false => "" (Implicit bool to string coercion is deprecated) null => Argument ... must be of type array|string, null given [] => [] new stdClass => Argument ... must be of type array|string, stdClass given diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 3ef291c315596..b79a85f27e99b 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -652,6 +652,9 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **des if (UNEXPECTED(Z_TYPE_P(arg) == IS_NULL) && !zend_null_arg_deprecated("string", arg_num)) { return 0; } + if (UNEXPECTED(Z_TYPE_P(arg) == IS_TRUE || Z_TYPE_P(arg) == IS_FALSE)) { + zend_error(E_DEPRECATED, "Implicit bool to string coercion is deprecated"); + } convert_to_string(arg); *dest = Z_STR_P(arg); } else if (UNEXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) { diff --git a/ext/iconv/tests/bug48147.phpt b/ext/iconv/tests/bug48147.phpt index ce304eecfb3c7..dbde8413a022e 100644 --- a/ext/iconv/tests/bug48147.phpt +++ b/ext/iconv/tests/bug48147.phpt @@ -20,8 +20,12 @@ bool(false) string(10) "aa%C3%B8aa" Notice: iconv(): Detected an incomplete multibyte character in input string in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" string(8) "%C3%B8aa" Notice: iconv(): Detected an incomplete multibyte character in input string in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" diff --git a/ext/iconv/tests/iconv_mime_decode.phpt b/ext/iconv/tests/iconv_mime_decode.phpt index 00d8b2244bf6c..2b0af0d20db38 100644 --- a/ext/iconv/tests/iconv_mime_decode.phpt +++ b/ext/iconv/tests/iconv_mime_decode.phpt @@ -70,12 +70,14 @@ do_regression_test(); (32) "Subject: Prüfung PrüfungkůÔńÓlet" (31) "Subject: PrüfungPrüfungkůÔńÓlet" 2: iconv_mime_decode(): Malformed string +8192: Implicit bool to string coercion is deprecated (0) "" (27) "From: サンプル文字列サンプル文字列日本語テキスト" (31) "Subject: PrüfungPrüfungkůÔńÓlet" (32) "Subject: Prüfung PrüfungkůÔńÓlet" (100) "Subject: =?ISO-8859-1?Q?Pr=FCfung?==?ISO-8859-1*de_DE?Q?Pr=FCfung?==?ISO-8859-2?Q?k=F9=D4=F1=D3let?=" 2: iconv_mime_decode(): Malformed string +8192: Implicit bool to string coercion is deprecated (0) "" (27) "From: サンプル文字列サンプル文字列日本語テキスト" (31) "Subject: PrüfungPrüfungkůÔńÓlet" diff --git a/ext/json/tests/bug69187.phpt b/ext/json/tests/bug69187.phpt index 4d076c4b50b17..ea5f9f2b9a14a 100644 --- a/ext/json/tests/bug69187.phpt +++ b/ext/json/tests/bug69187.phpt @@ -26,7 +26,8 @@ var_dump(json_last_error()); json_decode("\"\x00\""); var_dump(json_last_error()); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d NULL int(4) NULL @@ -35,6 +36,8 @@ int(0) int(0) int(1) int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) int(0) int(5) diff --git a/ext/reflection/tests/005.phpt b/ext/reflection/tests/005.phpt index 58411f98c847c..99341614d106a 100644 --- a/ext/reflection/tests/005.phpt +++ b/ext/reflection/tests/005.phpt @@ -46,9 +46,13 @@ foreach($r->getMethods() as $m) } ?> ---EXPECT-- +--EXPECTF-- string(19) "Comment for class A" string(15) "Method A::bla()" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) string(22) "* Comment for A::baz()" diff --git a/ext/reflection/tests/ReflectionClass_constructor_002.phpt b/ext/reflection/tests/ReflectionClass_constructor_002.phpt index adb3784347374..f6d2c5ad24624 100644 --- a/ext/reflection/tests/ReflectionClass_constructor_002.phpt +++ b/ext/reflection/tests/ReflectionClass_constructor_002.phpt @@ -50,6 +50,8 @@ ReflectionClass::__construct() expects exactly 1 argument, 0 given Deprecated: ReflectionClass::__construct(): Passing null to parameter #1 ($objectOrClass) of type object|string is deprecated in %s on line %d Class "" does not exist + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d Class "1" does not exist Class "1" does not exist ReflectionClass::__construct(): Argument #1 ($objectOrClass) must be of type object|string, array given diff --git a/ext/reflection/tests/ReflectionClass_getConstant_error.phpt b/ext/reflection/tests/ReflectionClass_getConstant_error.phpt index d143006af9992..d998dfac80c80 100644 --- a/ext/reflection/tests/ReflectionClass_getConstant_error.phpt +++ b/ext/reflection/tests/ReflectionClass_getConstant_error.phpt @@ -12,8 +12,10 @@ var_dump($rc->getConstant(1)); var_dump($rc->getConstant(1.5)); var_dump($rc->getConstant(true)); ?> ---EXPECT-- +--EXPECTF-- Check invalid params: bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) diff --git a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt index 9278b47875448..47e5fb11def0b 100644 --- a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt @@ -63,6 +63,8 @@ Deprecated: ReflectionClass::getMethod(): Passing null to parameter #1 ($name) o Method C::() does not exist Method C::1() does not exist Method C::1.5() does not exist + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d Method C::1() does not exist ReflectionClass::getMethod(): Argument #1 ($name) must be of type string, array given ReflectionClass::getMethod(): Argument #1 ($name) must be of type string, C given diff --git a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt index c2f8419a1ea7f..0ba737dd32594 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt @@ -61,6 +61,8 @@ Deprecated: ReflectionClass::getProperty(): Passing null to parameter #1 ($name) Property C::$ does not exist Property C::$1 does not exist Property C::$1.5 does not exist + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d Property C::$1 does not exist ReflectionClass::getProperty(): Argument #1 ($name) must be of type string, array given ReflectionClass::getProperty(): Argument #1 ($name) must be of type string, C given diff --git a/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt b/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt index 4e4c206ac23ee..927f29345c093 100644 --- a/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt +++ b/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt @@ -15,8 +15,10 @@ var_dump($rc->hasConstant(1)); var_dump($rc->hasConstant(1.5)); var_dump($rc->hasConstant(true)); ?> ---EXPECT-- +--EXPECTF-- Check invalid params: bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) diff --git a/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt b/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt index 5e175fbb7e5da..dc8c58e8e1464 100644 --- a/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt +++ b/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt @@ -15,8 +15,10 @@ var_dump($rc->hasMethod(1)); var_dump($rc->hasMethod(1.5)); var_dump($rc->hasMethod(true)); ?> ---EXPECT-- +--EXPECTF-- Check invalid params: bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) diff --git a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt b/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt index 14b4520e07ef0..e752915992a55 100644 --- a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt +++ b/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt @@ -15,8 +15,10 @@ var_dump($rc->hasProperty(1)); var_dump($rc->hasProperty(1.5)); var_dump($rc->hasProperty(true)); ?> ---EXPECT-- +--EXPECTF-- Check invalid params: bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt index 8c5bd7139ceaa..cd068ce940856 100644 --- a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt +++ b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt @@ -65,6 +65,8 @@ try { ?> --EXPECTF-- Wrong type of argument (bool): + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d ReflectionException: ReflectionMethod::__construct(): Argument #1 ($objectOrMethod) must be a valid method name in %s:%d Stack trace: #0 %s ReflectionMethod->__construct('1') @@ -75,11 +77,15 @@ Stack trace: #0 %s ReflectionMethod->__construct('3') #1 {main} Wrong type of argument (bool, string): + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d ReflectionException: Class "1" does not exist in %s:%d Stack trace: #0 %s ReflectionMethod->__construct('1', 'foo') #1 {main} Wrong type of argument (string, bool): + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d ReflectionException: Method TestClass::1() does not exist in %s:%d Stack trace: #0 %s ReflectionMethod->__construct('TestClass', '1') diff --git a/ext/reflection/tests/bug64936.phpt b/ext/reflection/tests/bug64936.phpt index 537876d1c60cb..ac523ed2e7d27 100644 --- a/ext/reflection/tests/bug64936.phpt +++ b/ext/reflection/tests/bug64936.phpt @@ -28,6 +28,9 @@ $rb = new ReflectionClass('B'); var_dump(strip_doc_comment($rb->getDocComment())); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) diff --git a/ext/session/tests/010.phpt b/ext/session/tests/010.phpt index 367edcfa61fd4..326f61b8de8c3 100644 --- a/ext/session/tests/010.phpt +++ b/ext/session/tests/010.phpt @@ -14,5 +14,6 @@ error_reporting(E_ALL); $session_array = explode(";", @session_encode()); print "I live\n"; ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d I live diff --git a/ext/session/tests/session_encode_variation8.phpt b/ext/session/tests/session_encode_variation8.phpt index 3571e8c821691..604d8feac6cba 100644 --- a/ext/session/tests/session_encode_variation8.phpt +++ b/ext/session/tests/session_encode_variation8.phpt @@ -29,6 +29,8 @@ Warning: session_start(): Cannot find session serialization handler "blah" - ses bool(false) Warning: session_encode(): Cannot encode non-existent session in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d diff --git a/ext/session/tests/session_set_save_handler_basic.phpt b/ext/session/tests/session_set_save_handler_basic.phpt index e8756ee81a823..eb0e4d97acb3e 100644 --- a/ext/session/tests/session_set_save_handler_basic.phpt +++ b/ext/session/tests/session_set_save_handler_basic.phpt @@ -64,6 +64,8 @@ rmdir($path); *** Testing session_set_save_handler() : basic functionality *** string(%d) "%s" +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: session_module_name(): Session handler module "" cannot be found in %s on line %d bool(false) diff --git a/ext/session/tests/session_set_save_handler_closures.phpt b/ext/session/tests/session_set_save_handler_closures.phpt index 4f8b21f20d1c7..65616997b035f 100644 --- a/ext/session/tests/session_set_save_handler_closures.phpt +++ b/ext/session/tests/session_set_save_handler_closures.phpt @@ -55,6 +55,8 @@ ob_end_flush(); *** Testing session_set_save_handler() : using closures as callbacks *** string(%d) "%s" +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: session_module_name(): Session handler module "" cannot be found in %s on line %d bool(false) diff --git a/ext/session/tests/session_set_save_handler_variation1.phpt b/ext/session/tests/session_set_save_handler_variation1.phpt index cf30ba7f1e10f..ff632d9449012 100644 --- a/ext/session/tests/session_set_save_handler_variation1.phpt +++ b/ext/session/tests/session_set_save_handler_variation1.phpt @@ -25,6 +25,8 @@ ob_end_flush(); *** Testing session_set_save_handler() : variation *** string(%d) "%s" +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: session_module_name(): Session handler module "" cannot be found in %s on line %d bool(false) string(%d) "%s" diff --git a/ext/standard/tests/file/005_variation2.phpt b/ext/standard/tests/file/005_variation2.phpt index 55d1d6666098c..73ed4fb4451dc 100644 --- a/ext/standard/tests/file/005_variation2.phpt +++ b/ext/standard/tests/file/005_variation2.phpt @@ -55,6 +55,8 @@ echo "Done"; *** testing touch *** +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: Undefined variable $a in %s on line %d NULL bool(false) @@ -65,8 +67,14 @@ bool(true) *** testing file info *** -- File '' -- -- File access time is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + -- File modification time is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + -- inode change time is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + -- File '' -- -- File access time is => diff --git a/ext/standard/tests/file/file_exists_variation1.phpt b/ext/standard/tests/file/file_exists_variation1.phpt index 446e7fac16a06..73a11345cdc7f 100644 --- a/ext/standard/tests/file/file_exists_variation1.phpt +++ b/ext/standard/tests/file/file_exists_variation1.phpt @@ -12,8 +12,10 @@ var_dump(file_exists(' ')); var_dump(file_exists('|')); echo "Done"; ?> ---EXPECT-- +--EXPECTF-- *** Testing file_exists() : usage variations *** + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) diff --git a/ext/standard/tests/file/file_get_contents_variation8.phpt b/ext/standard/tests/file/file_get_contents_variation8.phpt index ad23a13bb6b79..5b9f7a401db1f 100644 --- a/ext/standard/tests/file/file_get_contents_variation8.phpt +++ b/ext/standard/tests/file/file_get_contents_variation8.phpt @@ -49,9 +49,13 @@ Warning: file_get_contents(-1): Failed to open stream: No such file or directory bool(false) -- Iteration 1 -- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: file_get_contents(1): Failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d ValueError: Path cannot be empty -- Iteration 3 -- ValueError: Path cannot be empty diff --git a/ext/standard/tests/file/file_put_contents_variation8.phpt b/ext/standard/tests/file/file_put_contents_variation8.phpt index 70456fad9ff7d..de60775a7f0bf 100644 --- a/ext/standard/tests/file/file_put_contents_variation8.phpt +++ b/ext/standard/tests/file/file_put_contents_variation8.phpt @@ -57,8 +57,14 @@ echo "\n*** Done ***\n"; -- Iteration 0 -- 9 bytes written to: '-1' -- Iteration 1 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d 9 bytes written to: '1' + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d ValueError: Path cannot be empty -- Iteration 3 -- ValueError: Path cannot be empty diff --git a/ext/standard/tests/file/filegroup_variation2.phpt b/ext/standard/tests/file/filegroup_variation2.phpt index eeff71fa61ba2..d242629c357c3 100644 --- a/ext/standard/tests/file/filegroup_variation2.phpt +++ b/ext/standard/tests/file/filegroup_variation2.phpt @@ -40,8 +40,12 @@ Warning: filegroup(): stat failed for in %s on line %d bool(false) bool(false) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: filegroup(): stat failed for 1 in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) Warning: filegroup(): stat failed for 1234 in %s on line %d diff --git a/ext/standard/tests/file/fileinode_variation2.phpt b/ext/standard/tests/file/fileinode_variation2.phpt index c6c26eab8b28a..8987d95007e17 100644 --- a/ext/standard/tests/file/fileinode_variation2.phpt +++ b/ext/standard/tests/file/fileinode_variation2.phpt @@ -40,8 +40,12 @@ Warning: fileinode(): stat failed for in %s on line %d bool(false) bool(false) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: fileinode(): stat failed for 1 in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) Warning: fileinode(): stat failed for 1234 in %s on line %d diff --git a/ext/standard/tests/file/fileowner_variation2.phpt b/ext/standard/tests/file/fileowner_variation2.phpt index c5ab2042cda42..741048279882d 100644 --- a/ext/standard/tests/file/fileowner_variation2.phpt +++ b/ext/standard/tests/file/fileowner_variation2.phpt @@ -41,8 +41,12 @@ Warning: fileowner(): stat failed for in %s on line %d bool(false) bool(false) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: fileowner(): stat failed for 1 in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) Warning: fileowner(): stat failed for 1234 in %s on line %d diff --git a/ext/standard/tests/file/fileperms_variation2.phpt b/ext/standard/tests/file/fileperms_variation2.phpt index b1c9695d47ea0..2e05fea2f560c 100644 --- a/ext/standard/tests/file/fileperms_variation2.phpt +++ b/ext/standard/tests/file/fileperms_variation2.phpt @@ -40,8 +40,12 @@ Warning: fileperms(): stat failed for in %s on line %d bool(false) bool(false) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: fileperms(): stat failed for 1 in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) Warning: fileperms(): stat failed for 1234 in %s on line %d diff --git a/ext/standard/tests/file/filesize_variation5.phpt b/ext/standard/tests/file/filesize_variation5.phpt index 7da6e73e06139..cd67e2a667e2d 100644 --- a/ext/standard/tests/file/filesize_variation5.phpt +++ b/ext/standard/tests/file/filesize_variation5.phpt @@ -15,6 +15,8 @@ echo "*** Done ***\n"; ?> --EXPECTF-- *** Testing filesize(): usage variations *** + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) diff --git a/ext/standard/tests/file/fnmatch_basic.phpt b/ext/standard/tests/file/fnmatch_basic.phpt index 8b74bb430b371..b412c8a44cf94 100644 --- a/ext/standard/tests/file/fnmatch_basic.phpt +++ b/ext/standard/tests/file/fnmatch_basic.phpt @@ -26,7 +26,7 @@ var_dump( fnmatch(FALSE, FALSE) ); echo "\n*** Done ***\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing fnmatch() with file *** bool(true) bool(true) @@ -37,7 +37,15 @@ bool(false) *** Testing fnmatch() with other than file *** bool(true) bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) *** Done *** diff --git a/ext/standard/tests/file/fnmatch_variation.phpt b/ext/standard/tests/file/fnmatch_variation.phpt index 3413c3e6f76c6..a05f6e60c7bfe 100644 --- a/ext/standard/tests/file/fnmatch_variation.phpt +++ b/ext/standard/tests/file/fnmatch_variation.phpt @@ -136,7 +136,7 @@ match_($null_arr, $null_arr); echo "\n*** Done ***\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing fnmatch() with file and various patterns *** -- Iteration 0 -- bool(true) @@ -304,91 +304,235 @@ bool(true) --- With booleans --- -- Iteration 0 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 1 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) bool(true) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) bool(false) -- Iteration 3 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) bool(false) -- Iteration 4 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(true) bool(false) bool(false) -- Iteration 7 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) bool(false) bool(true) bool(false) -- Iteration 8 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) diff --git a/ext/standard/tests/file/fread_variation2.phpt b/ext/standard/tests/file/fread_variation2.phpt index a16c97a745aeb..17e01047e7dd8 100644 --- a/ext/standard/tests/file/fread_variation2.phpt +++ b/ext/standard/tests/file/fread_variation2.phpt @@ -105,6 +105,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -114,6 +116,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -124,6 +128,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -133,6 +139,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -143,6 +151,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -152,6 +162,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -162,6 +174,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -171,6 +185,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -181,6 +197,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -190,6 +208,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -200,6 +220,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -209,6 +231,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -219,6 +243,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -228,6 +254,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -238,6 +266,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -247,6 +277,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -257,6 +289,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -266,6 +300,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -278,6 +314,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -287,6 +325,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -297,6 +337,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -306,6 +348,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -316,6 +360,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -325,6 +371,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -335,6 +383,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -344,6 +394,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -354,6 +406,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -363,6 +417,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -373,6 +429,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -382,6 +440,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -392,6 +452,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -401,6 +463,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -411,6 +475,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -420,6 +486,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -430,6 +498,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -439,6 +509,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -451,6 +523,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -460,6 +534,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -470,6 +546,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -479,6 +557,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -489,6 +569,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -498,6 +580,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -508,6 +592,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -517,6 +603,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -527,6 +615,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -536,6 +626,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -546,6 +638,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -555,6 +649,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -565,6 +661,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -574,6 +672,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -584,6 +684,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -593,6 +695,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -603,6 +707,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -612,6 +718,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -624,6 +732,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -633,6 +743,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -643,6 +755,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -652,6 +766,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -662,6 +778,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -671,6 +789,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -681,6 +801,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -690,6 +812,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -700,6 +824,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -709,6 +835,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -719,6 +847,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -728,6 +858,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -738,6 +870,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -747,6 +881,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -757,6 +893,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -766,6 +904,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -776,6 +916,8 @@ int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -785,6 +927,8 @@ int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) diff --git a/ext/standard/tests/file/fread_variation4.phpt b/ext/standard/tests/file/fread_variation4.phpt index 97c6c39f9c8cf..8a604c116a582 100644 --- a/ext/standard/tests/file/fread_variation4.phpt +++ b/ext/standard/tests/file/fread_variation4.phpt @@ -103,6 +103,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -111,6 +113,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -120,6 +124,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -128,6 +134,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -137,6 +145,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -145,6 +155,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -154,6 +166,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -162,6 +176,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -171,6 +187,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -179,6 +197,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -188,6 +208,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -196,6 +218,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -205,6 +229,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -213,6 +239,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -222,6 +250,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -230,6 +260,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -239,6 +271,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -247,6 +281,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -258,6 +294,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -266,6 +304,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -275,6 +315,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -283,6 +325,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -292,6 +336,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -300,6 +346,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -309,6 +357,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -317,6 +367,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -326,6 +378,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -334,6 +388,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -343,6 +399,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -351,6 +409,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -360,6 +420,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -368,6 +430,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -377,6 +441,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -385,6 +451,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -394,6 +462,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -402,6 +472,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -413,6 +485,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -421,6 +495,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -430,6 +506,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -438,6 +516,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -447,6 +527,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -455,6 +537,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -464,6 +548,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -472,6 +558,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -481,6 +569,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -489,6 +579,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -498,16 +590,20 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expected : 0 bytes -- -int(%r1024|1137%r) +int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK -int(%r1024|1137%r) +int(1024) bool(false) -- File opened in mode x -- -- Reading beyond filesize, expected : 1024 bytes -- @@ -515,6 +611,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -523,6 +621,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -532,6 +632,8 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) @@ -540,6 +642,8 @@ int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(1024) bool(false) @@ -549,15 +653,19 @@ int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK int(0) bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expected : 0 bytes -- -int(%r1024|1137%r) +int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK -int(%r1024|1137%r) +int(1024) bool(false) Done diff --git a/ext/standard/tests/file/glob_variation.phpt b/ext/standard/tests/file/glob_variation.phpt index 4fc1c240b4d40..794978be6d99e 100644 --- a/ext/standard/tests/file/glob_variation.phpt +++ b/ext/standard/tests/file/glob_variation.phpt @@ -383,18 +383,30 @@ array(0) { } -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(1) { [0]=> string(%d) "1" } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } @@ -448,6 +460,8 @@ array(1) { string(%d) "%s/glob_variation/wonder1" } -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } Done diff --git a/ext/standard/tests/file/is_dir_variation3.phpt b/ext/standard/tests/file/is_dir_variation3.phpt index 730a2bcfea4d3..7e122b2cfafbb 100644 --- a/ext/standard/tests/file/is_dir_variation3.phpt +++ b/ext/standard/tests/file/is_dir_variation3.phpt @@ -24,10 +24,14 @@ foreach($dirnames as $dirname) { var_dump( is_dir($dirname) ); } ?> ---EXPECT-- +--EXPECTF-- *** Testing is_dir() with Invalid arguments: expected bool(false) *** bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) diff --git a/ext/standard/tests/file/is_executable_variation3.phpt b/ext/standard/tests/file/is_executable_variation3.phpt index b9b3a98e5c626..9e426ec8f6d7d 100644 --- a/ext/standard/tests/file/is_executable_variation3.phpt +++ b/ext/standard/tests/file/is_executable_variation3.phpt @@ -34,14 +34,18 @@ foreach( $invalid_files as $invalid_file ) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing is_executable(): usage variations *** *** Testing is_executable() on invalid files *** bool(false) bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) Done diff --git a/ext/standard/tests/file/is_readable_variation3.phpt b/ext/standard/tests/file/is_readable_variation3.phpt index e4a5766762824..3c510b0ebdcc1 100644 --- a/ext/standard/tests/file/is_readable_variation3.phpt +++ b/ext/standard/tests/file/is_readable_variation3.phpt @@ -28,14 +28,18 @@ foreach( $misc_files as $misc_file ) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing is_readable(): usage variations *** *** Testing is_readable() on miscellaneous filenames *** bool(false) bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) Done diff --git a/ext/standard/tests/file/is_writable_variation3.phpt b/ext/standard/tests/file/is_writable_variation3.phpt index 021d6e5645414..f55bc782a19cf 100644 --- a/ext/standard/tests/file/is_writable_variation3.phpt +++ b/ext/standard/tests/file/is_writable_variation3.phpt @@ -29,7 +29,7 @@ foreach( $misc_files as $misc_file ) { clearstatcache(); } ?> ---EXPECT-- +--EXPECTF-- *** Testing is_writable(): usage variations *** *** Testing is_writable() with invalid filenames *** @@ -39,9 +39,17 @@ bool(false) bool(false) bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) diff --git a/ext/standard/tests/file/lstat_stat_variation22.phpt b/ext/standard/tests/file/lstat_stat_variation22.phpt index 9efb23fc4178b..c16225b00ab37 100644 --- a/ext/standard/tests/file/lstat_stat_variation22.phpt +++ b/ext/standard/tests/file/lstat_stat_variation22.phpt @@ -26,6 +26,8 @@ var_dump(lstat('|')); ?> --EXPECTF-- *** testing stat *** + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) @@ -35,6 +37,8 @@ bool(false) Warning: stat(): stat failed for | in %s on line %d bool(false) *** testing lstat *** + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) diff --git a/ext/standard/tests/file/pathinfo_variaton.phpt b/ext/standard/tests/file/pathinfo_variaton.phpt index 04e1f15c6935a..c9bea7c58c584 100644 --- a/ext/standard/tests/file/pathinfo_variaton.phpt +++ b/ext/standard/tests/file/pathinfo_variaton.phpt @@ -73,7 +73,7 @@ foreach($paths as $path) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing pathinfo() with miscellaneous input arguments *** -- Iteration 1 -- array(3) { @@ -130,6 +130,8 @@ string(6) "2.3456" string(4) "3456" string(1) "2" -- Iteration 5 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(3) { ["dirname"]=> string(1) "." @@ -138,20 +140,38 @@ array(3) { ["filename"]=> string(1) "1" } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "." + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 6 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(2) { ["basename"]=> string(0) "" ["filename"]=> string(0) "" } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" -- Iteration 7 -- array(3) { diff --git a/ext/standard/tests/file/readfile_error.phpt b/ext/standard/tests/file/readfile_error.phpt index 9e47e68fac3c9..b43efd708db6b 100644 --- a/ext/standard/tests/file/readfile_error.phpt +++ b/ext/standard/tests/file/readfile_error.phpt @@ -30,6 +30,8 @@ echo "Done\n"; -- Testing readfile() with invalid arguments -- Path cannot be empty + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d Path cannot be empty -- Testing readfile() with non-existent file -- diff --git a/ext/standard/tests/file/readfile_variation10.phpt b/ext/standard/tests/file/readfile_variation10.phpt index 5afc5622ed166..2568c23b7f95c 100644 --- a/ext/standard/tests/file/readfile_variation10.phpt +++ b/ext/standard/tests/file/readfile_variation10.phpt @@ -47,8 +47,12 @@ for( $i=0; $i %s/%s File permissions are => 100600 File created in => directory specified -- Iteration 1 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d File name is => %s/%s File permissions are => 100600 File created in => directory specified -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d File name is => %s/%s File permissions are => 100600 File created in => directory specified diff --git a/ext/standard/tests/file/tempnam_variation7.phpt b/ext/standard/tests/file/tempnam_variation7.phpt index 1928da4f89624..d4bc661981483 100644 --- a/ext/standard/tests/file/tempnam_variation7.phpt +++ b/ext/standard/tests/file/tempnam_variation7.phpt @@ -77,11 +77,15 @@ File permissions are => 100600 File created in => temp dir -- Iteration 1 -- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d File name is => %s%etempnam_variation3.tmp%s File permissions are => 100600 File created in => temp dir -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d File name is => %s%etempnam_variation3.tmp%s File permissions are => 100600 File created in => temp dir diff --git a/ext/standard/tests/file/unlink_error.phpt b/ext/standard/tests/file/unlink_error.phpt index 1dd8ef1a25c9e..ec6141311658e 100644 --- a/ext/standard/tests/file/unlink_error.phpt +++ b/ext/standard/tests/file/unlink_error.phpt @@ -55,8 +55,12 @@ Warning: unlink(): %s in %s on line %d bool(false) bool(false) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: unlink(): %s in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Testing unlink() on non-existent file -- diff --git a/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt b/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt index 028b987eece2a..56b3318cca0af 100644 --- a/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt +++ b/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt @@ -54,7 +54,7 @@ foreach($inputs as $input) { $iterator++; }; ?> ---EXPECT-- +--EXPECTF-- *** Testing escapeshellarg() : usage variations *** -- Iteration 1 -- @@ -88,15 +88,23 @@ string(12) "'0.01234567'" string(5) "'0.5'" -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(3) "'1'" -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(2) "''" -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(3) "'1'" -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(2) "''" -- Iteration 15 -- diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt index 195affe4fc685..cf44977ac5c64 100644 --- a/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt +++ b/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt @@ -27,9 +27,17 @@ foreach ( $variation_array as $var ) { var_dump(get_cfg_var( $var ) ); } ?> ---EXPECT-- +--EXPECTF-- *** Test substituting argument 1 with boolean values *** + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) diff --git a/ext/standard/tests/general_functions/uniqid_basic.phpt b/ext/standard/tests/general_functions/uniqid_basic.phpt index 408f72bfdbaa3..5ee033591be9c 100644 --- a/ext/standard/tests/general_functions/uniqid_basic.phpt +++ b/ext/standard/tests/general_functions/uniqid_basic.phpt @@ -51,10 +51,22 @@ string(17) "1050%s" string(27) "1050%s.%s" string(17) "1050%s" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(14) "1%s" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(24) "1%s.%s" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(14) "1%s" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(13) "%s" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(23) "%s.%s" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(13) "%s" diff --git a/ext/standard/tests/math/base_convert_variation1.phpt b/ext/standard/tests/math/base_convert_variation1.phpt index fd06465ab574b..23f16fc14423d 100644 --- a/ext/standard/tests/math/base_convert_variation1.phpt +++ b/ext/standard/tests/math/base_convert_variation1.phpt @@ -107,15 +107,23 @@ Deprecated: Invalid characters passed for attempted conversion, these have been string(1) "5" -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "0" -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "0" -- Iteration 15 -- diff --git a/ext/standard/tests/math/bindec_basic_64bit.phpt b/ext/standard/tests/math/bindec_basic_64bit.phpt index 8fece221c0ede..0205966736f1d 100644 --- a/ext/standard/tests/math/bindec_basic_64bit.phpt +++ b/ext/standard/tests/math/bindec_basic_64bit.phpt @@ -72,5 +72,9 @@ int(6) Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) diff --git a/ext/standard/tests/math/bindec_variation1_64bit.phpt b/ext/standard/tests/math/bindec_variation1_64bit.phpt index 56bbbd35649b5..76d53aae51836 100644 --- a/ext/standard/tests/math/bindec_variation1_64bit.phpt +++ b/ext/standard/tests/math/bindec_variation1_64bit.phpt @@ -109,15 +109,23 @@ Deprecated: Invalid characters passed for attempted conversion, these have been int(0) -- Iteration 10 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 14 -- diff --git a/ext/standard/tests/math/hexdec_basic_64bit.phpt b/ext/standard/tests/math/hexdec_basic_64bit.phpt index fd6d53b601982..a04a22bdd96cb 100644 --- a/ext/standard/tests/math/hexdec_basic_64bit.phpt +++ b/ext/standard/tests/math/hexdec_basic_64bit.phpt @@ -86,7 +86,11 @@ int(18279) int(70199) -- hexdec 1 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- hexdec -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) diff --git a/ext/standard/tests/math/hexdec_variation1_64bit.phpt b/ext/standard/tests/math/hexdec_variation1_64bit.phpt index c892b8049fc9a..1d991277c6a96 100644 --- a/ext/standard/tests/math/hexdec_variation1_64bit.phpt +++ b/ext/standard/tests/math/hexdec_variation1_64bit.phpt @@ -115,15 +115,23 @@ Deprecated: Invalid characters passed for attempted conversion, these have been int(5) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 15 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 16 -- diff --git a/ext/standard/tests/math/octdec_basic_64bit.phpt b/ext/standard/tests/math/octdec_basic_64bit.phpt index 4051d9be63230..7272ec557bd72 100644 --- a/ext/standard/tests/math/octdec_basic_64bit.phpt +++ b/ext/standard/tests/math/octdec_basic_64bit.phpt @@ -60,5 +60,9 @@ int(5349) Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d int(102923) int(823384) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) diff --git a/ext/standard/tests/math/octdec_variation1.phpt b/ext/standard/tests/math/octdec_variation1.phpt index c24d2e8e6beae..22930a7d80fc0 100644 --- a/ext/standard/tests/math/octdec_variation1.phpt +++ b/ext/standard/tests/math/octdec_variation1.phpt @@ -118,15 +118,23 @@ Deprecated: Invalid characters passed for attempted conversion, these have been int(5) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 15 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 16 -- diff --git a/ext/standard/tests/network/inet_ipv6.phpt b/ext/standard/tests/network/inet_ipv6.phpt index 8e9c44431b9b5..af48246a95719 100644 --- a/ext/standard/tests/network/inet_ipv6.phpt +++ b/ext/standard/tests/network/inet_ipv6.phpt @@ -33,12 +33,14 @@ foreach ($a as $address) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- string(3) "::1" string(3) "::2" string(4) "::35" string(5) "::255" string(6) "::1024" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) string(36) "2001:db8:85a3:8d3:1319:8a2e:370:7344" string(15) "2001:db8:1234::" diff --git a/ext/standard/tests/streams/stream_socket_pair.phpt b/ext/standard/tests/streams/stream_socket_pair.phpt index b926c9d9f4387..e05caa4b41987 100644 --- a/ext/standard/tests/streams/stream_socket_pair.phpt +++ b/ext/standard/tests/streams/stream_socket_pair.phpt @@ -10,6 +10,7 @@ var_dump(fread($sockets[1], strlen("foo"))); fclose($sockets[0]); ?> --EXPECTF-- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(2) { [0]=> resource(%d) of type (stream) diff --git a/ext/standard/tests/strings/chop_variation5.phpt b/ext/standard/tests/strings/chop_variation5.phpt index 2b86a9713b77f..24b191a1f4174 100644 --- a/ext/standard/tests/strings/chop_variation5.phpt +++ b/ext/standard/tests/strings/chop_variation5.phpt @@ -19,10 +19,12 @@ echo "*** Testing chop() : with miscellaneous arguments ***\n"; echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing chop() : with miscellaneous arguments *** string(9) "chop test" string(12) "chop test " + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(17) "chop test " string(9) "chop test" string(10) "chop test " diff --git a/ext/standard/tests/strings/implode1.phpt b/ext/standard/tests/strings/implode1.phpt index 7092efe94248b..f626f7cde3fba 100644 --- a/ext/standard/tests/strings/implode1.phpt +++ b/ext/standard/tests/strings/implode1.phpt @@ -219,8 +219,12 @@ array(6) { -- Iteration 1 -- string(59) "2TRUE0TRUE-639TRUE1TRUEPHPTRUETRUETRUE TRUEstring%0with%0...%0" -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(35) "2101-639111PHP111 1string%0with%0...%0" -- Iteration 3 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(27) "20-6391PHP string%0with%0...%0" -- Iteration 4 -- implode(): Argument #1 ($separator) must be of type string, array given diff --git a/ext/standard/tests/strings/join_variation1.phpt b/ext/standard/tests/strings/join_variation1.phpt index 256f361460b24..be10d7bb100bc 100644 --- a/ext/standard/tests/strings/join_variation1.phpt +++ b/ext/standard/tests/strings/join_variation1.phpt @@ -82,7 +82,7 @@ for($index = 0; $index < count($values); $index ++) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing join() : usage variations *** --- Testing join() by supplying different values for 'glue' argument --- @@ -115,12 +115,20 @@ join(): Argument #1 ($separator) must be of type string, array given -- Iteration 14 -- join(): Argument #1 ($separator) must be of type string, array given -- Iteration 15 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(17) "element11element2" -- Iteration 16 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "element1element2" -- Iteration 17 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(17) "element11element2" -- Iteration 18 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "element1element2" -- Iteration 19 -- string(26) "element1testObjectelement2" diff --git a/ext/standard/tests/strings/join_variation4.phpt b/ext/standard/tests/strings/join_variation4.phpt index 21774b4bca2e2..55a978eb00e6c 100644 --- a/ext/standard/tests/strings/join_variation4.phpt +++ b/ext/standard/tests/strings/join_variation4.phpt @@ -53,8 +53,12 @@ echo "Done\n"; -- Iteration 1 -- string(87) "2TRUE0TRUE-639TRUE-1.3444TRUE1TRUEPHPTRUETRUETRUE TRUE6999.99999999TRUEstring%0with%0...%0" -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(57) "2101-6391-1.3444111PHP111 16999.999999991string%0with%0...%0" -- Iteration 3 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(47) "20-639-1.34441PHP 6999.99999999string%0with%0...%0" -- Iteration 4 -- join(): Argument #1 ($separator) must be of type string, array given diff --git a/ext/standard/tests/strings/lcfirst.phpt b/ext/standard/tests/strings/lcfirst.phpt index d98b3a9cb0eed..d0b8874e67b12 100644 --- a/ext/standard/tests/strings/lcfirst.phpt +++ b/ext/standard/tests/strings/lcfirst.phpt @@ -147,11 +147,15 @@ string(6) "-3.344" string(4) "nULL" string(1) "0" string(1) "0" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" string(4) "tRUE" string(1) "1" string(1) "1" string(8) "1.234444" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" string(5) "fALSE" string(1) " " diff --git a/ext/standard/tests/strings/ltrim.phpt b/ext/standard/tests/strings/ltrim.phpt index 952ad282c6fe7..bb236f4d0729c 100644 --- a/ext/standard/tests/strings/ltrim.phpt +++ b/ext/standard/tests/strings/ltrim.phpt @@ -37,7 +37,7 @@ var_dump( ltrim( 12345 ) ); /* Scalar argume echo "\nDone\n"; ?> ---EXPECT-- +--EXPECTF-- *** Output for Error Conditions *** *** Using heredoc string *** @@ -46,6 +46,8 @@ string(17) "ng heredoc string" *** Output for Normal Behaviour *** string(10) "ltrim test" string(13) " ltrim test" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(18) " ltrim test" string(10) "ltrim test" string(11) " ltrim test" diff --git a/ext/standard/tests/strings/quoted_printable_encode_001.phpt b/ext/standard/tests/strings/quoted_printable_encode_001.phpt index a1e0ec1338aa2..609bdfdd082b5 100644 --- a/ext/standard/tests/strings/quoted_printable_encode_001.phpt +++ b/ext/standard/tests/strings/quoted_printable_encode_001.phpt @@ -11,9 +11,11 @@ var_dump(quoted_printable_encode(false)); echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- string(0) "" string(4) "test" string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" Done diff --git a/ext/standard/tests/strings/rtrim.phpt b/ext/standard/tests/strings/rtrim.phpt index 21e91c1ac361c..06a05c6057e2f 100644 --- a/ext/standard/tests/strings/rtrim.phpt +++ b/ext/standard/tests/strings/rtrim.phpt @@ -45,6 +45,8 @@ echo "Done\n"; *** Output for Normal Behaviour *** string(10) "rtrim test" string(13) "rtrim test " + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(18) "rtrim test " string(10) "rtrim test" string(11) "rtrim test " diff --git a/ext/standard/tests/strings/sprintf_variation1.phpt b/ext/standard/tests/strings/sprintf_variation1.phpt index 6b9430e38666f..a09130e480c76 100644 --- a/ext/standard/tests/strings/sprintf_variation1.phpt +++ b/ext/standard/tests/strings/sprintf_variation1.phpt @@ -98,7 +98,7 @@ fclose($file_handle); echo "Done"; ?> ---EXPECT-- +--EXPECTF-- *** Testing sprintf() : with unexpected values for format argument *** -- Iteration 1 -- @@ -172,23 +172,47 @@ sprintf(): Argument #1 ($format) must be of type string, array given sprintf(): Argument #1 ($format) must be of type string, array given -- Iteration 15 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 16 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" -- Iteration 17 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 18 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" -- Iteration 19 -- diff --git a/ext/standard/tests/strings/str_pad.phpt b/ext/standard/tests/strings/str_pad.phpt index 278db455f8d55..6f46e94333317 100644 --- a/ext/standard/tests/strings/str_pad.phpt +++ b/ext/standard/tests/strings/str_pad.phpt @@ -79,7 +79,7 @@ try { } ?> ---EXPECT-- +--EXPECTF-- #### Basic operations #### string(20) "str_pad() " string(20) "str_pad()-+-+-+-+-+-" @@ -148,35 +148,95 @@ string(16) "================" string(16) "================" string(16) "================" string(16) "================" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(9) "1 " + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(9) "1========" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(9) "========1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(9) "1========" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(9) "====1====" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "1 " + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "1=========" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "=========1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "1=========" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "====1=====" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "1 " + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "1===============" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "===============1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "1===============" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "=======1========" string(2) "15" string(2) "15" @@ -278,9 +338,17 @@ string(16) "variation1111111" string(16) "1111111variation" string(16) "variation1111111" string(16) "111variation1111" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "variation1111111" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "1111111variation" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "variation1111111" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "111variation1111" string(16) "variationstring_" string(16) "string_variation" diff --git a/ext/standard/tests/strings/str_repeat.phpt b/ext/standard/tests/strings/str_repeat.phpt index 3351e7f871336..17e3655b434ac 100644 --- a/ext/standard/tests/strings/str_repeat.phpt +++ b/ext/standard/tests/strings/str_repeat.phpt @@ -70,9 +70,17 @@ try { --- str_repeat() of '1' --- -- after repeating 0 times is => --- after repeating 1 times is => 1 --- after repeating 2 times is => 11 --- after repeating 3 times is => 111 +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +-- after repeating 1 times is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +1 +-- after repeating 2 times is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +11 +-- after repeating 3 times is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +111 --- str_repeat() of '4' --- -- after repeating 0 times is => diff --git a/ext/standard/tests/strings/str_replace_variation1.phpt b/ext/standard/tests/strings/str_replace_variation1.phpt index 00ed1a8babe35..5facbf514daef 100644 --- a/ext/standard/tests/strings/str_replace_variation1.phpt +++ b/ext/standard/tests/strings/str_replace_variation1.phpt @@ -23,6 +23,8 @@ foreach( $search_arr as $value ) { *** Testing str_replace() with various search values *** -- Iteration 0 -- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: Array to string conversion in %s on line %d array(12) { [0]=> @@ -54,6 +56,8 @@ int(5) -- Iteration 1 -- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: Array to string conversion in %s on line %d array(12) { [0]=> diff --git a/ext/standard/tests/strings/str_replace_variation2.phpt b/ext/standard/tests/strings/str_replace_variation2.phpt index 957c990555ea5..e61b585f337c5 100644 --- a/ext/standard/tests/strings/str_replace_variation2.phpt +++ b/ext/standard/tests/strings/str_replace_variation2.phpt @@ -212,6 +212,8 @@ string(198) "Hello, world,0120333FOUND445-1.234567 NULL TRUE FALSE%0 --- Iteration 21 --- -- String after replacing the search value is => -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(207) "Hello, world,0FOUND20333.3445-FOUND.234567 NULL TRUE FALSE%0 %00ZCD%0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World ?Hello, World chr(0).chr(FOUND28).chr(234).chr(65).chr(255).chr(256)" @@ -240,6 +242,8 @@ string(207) "Hello, world,0FOUND20333.3445-FOUND.234567 NULL TRUE FALSE --- Iteration 25 --- -- String after replacing the search value is => -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(195) "Hello, world,0120333.3445-1.234567 NULL TRUE FALSE%0 %00ZCD%0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)" diff --git a/ext/standard/tests/strings/strcasecmp.phpt b/ext/standard/tests/strings/strcasecmp.phpt index 04452067d488f..fcdf356057767 100644 --- a/ext/standard/tests/strings/strcasecmp.phpt +++ b/ext/standard/tests/strings/strcasecmp.phpt @@ -294,9 +294,15 @@ Iteration 0 - strcasecmp of '1' and '-1' is => int(%d) - strcasecmp of '1' and '-1' is => int(%d) - strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '' is => int(%d) +- strcasecmp of '1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcasecmp of '1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcasecmp of '1' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) - strcasecmp of '1' and 'string' is => int(-%d) Iteration 1 @@ -306,9 +312,15 @@ Iteration 1 - strcasecmp of '0' and '-1' is => int(%d) - strcasecmp of '0' and '-1' is => int(%d) - strcasecmp of '0' and '' is => int(%d) -- strcasecmp of '0' and '1' is => int(-%d) -- strcasecmp of '0' and '1' is => int(-%d) -- strcasecmp of '0' and '' is => int(%d) +- strcasecmp of '0' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcasecmp of '0' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcasecmp of '0' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) - strcasecmp of '0' and 'string' is => int(-%d) Iteration 2 @@ -318,9 +330,15 @@ Iteration 2 - strcasecmp of '0' and '-1' is => int(%d) - strcasecmp of '0' and '-1' is => int(%d) - strcasecmp of '0' and '' is => int(%d) -- strcasecmp of '0' and '1' is => int(-%d) -- strcasecmp of '0' and '1' is => int(-%d) -- strcasecmp of '0' and '' is => int(%d) +- strcasecmp of '0' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcasecmp of '0' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcasecmp of '0' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) - strcasecmp of '0' and 'string' is => int(-%d) Iteration 3 @@ -330,9 +348,15 @@ Iteration 3 - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '' is => int(%d) -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '' is => int(%d) +- strcasecmp of '-1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-4) +- strcasecmp of '-1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-4) +- strcasecmp of '-1' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(2) - strcasecmp of '-1' and 'string' is => int(-%d) Iteration 4 @@ -342,9 +366,15 @@ Iteration 4 - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '' is => int(%d) -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '' is => int(%d) +- strcasecmp of '-1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-4) +- strcasecmp of '-1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-4) +- strcasecmp of '-1' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(2) - strcasecmp of '-1' and 'string' is => int(-%d) Iteration 5 @@ -354,46 +384,130 @@ Iteration 5 - strcasecmp of '' and '-1' is => int(-%d) - strcasecmp of '' and '-1' is => int(-%d) - strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '' is => int(0) +- strcasecmp of '' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcasecmp of '' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcasecmp of '' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) - strcasecmp of '' and 'string' is => int(-%d) Iteration 6 -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and 'string' is => int(-%d) +- strcasecmp of '1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcasecmp of '1' and '0' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) +- strcasecmp of '1' and '0' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) +- strcasecmp of '1' and '-1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(4) +- strcasecmp of '1' and '-1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(4) +- strcasecmp of '1' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) +- strcasecmp of '1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcasecmp of '1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcasecmp of '1' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) +- strcasecmp of '1' and 'string' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-66) Iteration 7 -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and 'string' is => int(-%d) +- strcasecmp of '1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcasecmp of '1' and '0' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) +- strcasecmp of '1' and '0' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) +- strcasecmp of '1' and '-1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(4) +- strcasecmp of '1' and '-1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(4) +- strcasecmp of '1' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) +- strcasecmp of '1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcasecmp of '1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcasecmp of '1' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) +- strcasecmp of '1' and 'string' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-66) Iteration 8 -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '0' is => int(-%d) -- strcasecmp of '' and '0' is => int(-%d) -- strcasecmp of '' and '-1' is => int(-%d) -- strcasecmp of '' and '-1' is => int(-%d) -- strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and 'string' is => int(-%d) +- strcasecmp of '' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcasecmp of '' and '0' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcasecmp of '' and '0' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcasecmp of '' and '-1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-2) +- strcasecmp of '' and '-1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-2) +- strcasecmp of '' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcasecmp of '' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcasecmp of '' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcasecmp of '' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcasecmp of '' and 'string' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-6) Iteration 9 - strcasecmp of 'string' and '1' is => int(%d) @@ -402,9 +516,15 @@ Iteration 9 - strcasecmp of 'string' and '-1' is => int(%d) - strcasecmp of 'string' and '-1' is => int(%d) - strcasecmp of 'string' and '' is => int(%d) -- strcasecmp of 'string' and '1' is => int(%d) -- strcasecmp of 'string' and '1' is => int(%d) -- strcasecmp of 'string' and '' is => int(%d) +- strcasecmp of 'string' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(66) +- strcasecmp of 'string' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(66) +- strcasecmp of 'string' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(6) - strcasecmp of 'string' and 'string' is => int(0) *** comparing the strings in an diff --git a/ext/standard/tests/strings/strcmp.phpt b/ext/standard/tests/strings/strcmp.phpt index a36873830cedd..e32d4a008e78e 100644 --- a/ext/standard/tests/strings/strcmp.phpt +++ b/ext/standard/tests/strings/strcmp.phpt @@ -323,8 +323,12 @@ Iteration 0 - strcmp of '1' and '-1' is => int(%d) - strcmp of '1' and '-1' is => int(%d) - strcmp of '1' and '' is => int(%d) -- strcmp of '1' and '1' is => int(0) -- strcmp of '1' and '' is => int(%d) +- strcmp of '1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcmp of '1' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) - strcmp of '1' and 'string' is => int(-%d) Iteration 1 @@ -334,8 +338,12 @@ Iteration 1 - strcmp of '0' and '-1' is => int(%d) - strcmp of '0' and '-1' is => int(%d) - strcmp of '0' and '' is => int(%d) -- strcmp of '0' and '1' is => int(-%d) -- strcmp of '0' and '' is => int(%d) +- strcmp of '0' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcmp of '0' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) - strcmp of '0' and 'string' is => int(-%d) Iteration 2 @@ -345,8 +353,12 @@ Iteration 2 - strcmp of '0' and '-1' is => int(%d) - strcmp of '0' and '-1' is => int(%d) - strcmp of '0' and '' is => int(%d) -- strcmp of '0' and '1' is => int(-%d) -- strcmp of '0' and '' is => int(%d) +- strcmp of '0' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcmp of '0' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) - strcmp of '0' and 'string' is => int(-%d) Iteration 3 @@ -356,8 +368,12 @@ Iteration 3 - strcmp of '-1' and '-1' is => int(0) - strcmp of '-1' and '-1' is => int(0) - strcmp of '-1' and '' is => int(%d) -- strcmp of '-1' and '1' is => int(-%d) -- strcmp of '-1' and '' is => int(%d) +- strcmp of '-1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-4) +- strcmp of '-1' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(2) - strcmp of '-1' and 'string' is => int(-%d) Iteration 4 @@ -367,8 +383,12 @@ Iteration 4 - strcmp of '-1' and '-1' is => int(0) - strcmp of '-1' and '-1' is => int(0) - strcmp of '-1' and '' is => int(%d) -- strcmp of '-1' and '1' is => int(-%d) -- strcmp of '-1' and '' is => int(%d) +- strcmp of '-1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-4) +- strcmp of '-1' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(2) - strcmp of '-1' and 'string' is => int(-%d) Iteration 5 @@ -378,31 +398,79 @@ Iteration 5 - strcmp of '' and '-1' is => int(-%d) - strcmp of '' and '-1' is => int(-%d) - strcmp of '' and '' is => int(0) -- strcmp of '' and '1' is => int(-%d) -- strcmp of '' and '' is => int(0) +- strcmp of '' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcmp of '' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) - strcmp of '' and 'string' is => int(-%d) Iteration 6 -- strcmp of '1' and '1' is => int(0) -- strcmp of '1' and '0' is => int(%d) -- strcmp of '1' and '0' is => int(%d) -- strcmp of '1' and '-1' is => int(%d) -- strcmp of '1' and '-1' is => int(%d) -- strcmp of '1' and '' is => int(%d) -- strcmp of '1' and '1' is => int(0) -- strcmp of '1' and '' is => int(%d) -- strcmp of '1' and 'string' is => int(-%d) +- strcmp of '1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcmp of '1' and '0' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) +- strcmp of '1' and '0' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) +- strcmp of '1' and '-1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(4) +- strcmp of '1' and '-1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(4) +- strcmp of '1' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) +- strcmp of '1' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcmp of '1' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) +- strcmp of '1' and 'string' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-66) Iteration 7 -- strcmp of '' and '1' is => int(-%d) -- strcmp of '' and '0' is => int(-%d) -- strcmp of '' and '0' is => int(-%d) -- strcmp of '' and '-1' is => int(-%d) -- strcmp of '' and '-1' is => int(-%d) -- strcmp of '' and '' is => int(0) -- strcmp of '' and '1' is => int(-%d) -- strcmp of '' and '' is => int(0) -- strcmp of '' and 'string' is => int(-%d) +- strcmp of '' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcmp of '' and '0' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcmp of '' and '0' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcmp of '' and '-1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-2) +- strcmp of '' and '-1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-2) +- strcmp of '' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcmp of '' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-1) +- strcmp of '' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) +- strcmp of '' and 'string' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(-6) Iteration 8 - strcmp of 'string' and '1' is => int(%d) @@ -411,8 +479,12 @@ Iteration 8 - strcmp of 'string' and '-1' is => int(%d) - strcmp of 'string' and '-1' is => int(%d) - strcmp of 'string' and '' is => int(%d) -- strcmp of 'string' and '1' is => int(%d) -- strcmp of 'string' and '' is => int(%d) +- strcmp of 'string' and '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(66) +- strcmp of 'string' and '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(6) - strcmp of 'string' and 'string' is => int(0) *** comparing the strings in an diff --git a/ext/standard/tests/strings/strip_tags_variation2.phpt b/ext/standard/tests/strings/strip_tags_variation2.phpt index 421f8a62ae4ea..69ac6285b7787 100644 --- a/ext/standard/tests/strings/strip_tags_variation2.phpt +++ b/ext/standard/tests/strings/strip_tags_variation2.phpt @@ -82,7 +82,7 @@ foreach($values as $value) { echo "Done"; ?> ---EXPECT-- +--EXPECTF-- *** Testing strip_tags() : usage variations *** -- Iteration 1 -- string(10) "helloworld" @@ -107,12 +107,20 @@ string(10) "helloworld" -- Iteration 11 -- string(10) "helloworld" -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "helloworld" -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "helloworld" -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "helloworld" -- Iteration 15 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "helloworld" -- Iteration 16 -- string(10) "helloworld" diff --git a/ext/standard/tests/strings/stripos.phpt b/ext/standard/tests/strings/stripos.phpt index f56d38d3de7bd..4036fa19b6af9 100644 --- a/ext/standard/tests/strings/stripos.phpt +++ b/ext/standard/tests/strings/stripos.phpt @@ -28,7 +28,7 @@ stripos() function test ?> DONE ---EXPECT-- +--EXPECTF-- int(0) int(5) int(5) @@ -43,13 +43,25 @@ bool(false) bool(false) int(0) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) int(1) diff --git a/ext/standard/tests/strings/stripos_variation1.phpt b/ext/standard/tests/strings/stripos_variation1.phpt index e205913fcfb00..e3c7fd9b295f9 100644 --- a/ext/standard/tests/strings/stripos_variation1.phpt +++ b/ext/standard/tests/strings/stripos_variation1.phpt @@ -74,7 +74,7 @@ for($index=0; $index ---EXPECT-- +--EXPECTF-- *** Testing stripos() function: with double quoted strings *** -- Iteration 1 -- int(2) @@ -110,10 +110,18 @@ int(9) int(8) bool(false) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(11) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(12) -- Iteration 14 -- int(0) diff --git a/ext/standard/tests/strings/stripos_variation2.phpt b/ext/standard/tests/strings/stripos_variation2.phpt index 2f95822645bfa..1562d459debdc 100644 --- a/ext/standard/tests/strings/stripos_variation2.phpt +++ b/ext/standard/tests/strings/stripos_variation2.phpt @@ -76,7 +76,7 @@ for($index=0; $index ---EXPECT-- +--EXPECTF-- *** Testing stripos() function: with single quoted strings *** -- Iteration 1 -- int(2) @@ -112,10 +112,18 @@ bool(false) int(10) int(10) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(11) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(12) -- Iteration 14 -- int(0) diff --git a/ext/standard/tests/strings/stristr_variation2.phpt b/ext/standard/tests/strings/stristr_variation2.phpt index 72d5a93df8a63..bb4a6fc5744d0 100644 --- a/ext/standard/tests/strings/stristr_variation2.phpt +++ b/ext/standard/tests/strings/stristr_variation2.phpt @@ -65,7 +65,7 @@ foreach($inputs as $input) { fclose($file_handle); //closing the file handle ?> ---EXPECT-- +--EXPECTF-- *** Testing stristr() function: with unexpected inputs for 'needle' argument *** -- Iteration 1 -- bool(false) @@ -88,12 +88,20 @@ stristr(): Argument #2 ($needle) must be of type string, array given -- Iteration 10 -- stristr(): Argument #2 ($needle) must be of type string, array given -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(11) "Hello World" -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(11) "Hello World" -- Iteration 15 -- bool(false) diff --git a/ext/standard/tests/strings/strlen.phpt b/ext/standard/tests/strings/strlen.phpt index 426154504b66b..f73570ead465b 100644 --- a/ext/standard/tests/strings/strlen.phpt +++ b/ext/standard/tests/strings/strlen.phpt @@ -142,8 +142,12 @@ String length of '0' is => int(1) String length of '0' is => int(1) String length of ' ' is => int(1) String length of '\t' is => int(2) -String length of '1' is => int(1) -String length of '' is => int(0) +String length of '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(1) +String length of '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) String length of 'Hello, World%0' is => int(13) String length of 'Hello%0World' is => int(11) String length of 'Hello, World\0' is => int(14) diff --git a/ext/standard/tests/strings/strnatcasecmp_variation1.phpt b/ext/standard/tests/strings/strnatcasecmp_variation1.phpt index dff57b3372089..188e40428765f 100644 --- a/ext/standard/tests/strings/strnatcasecmp_variation1.phpt +++ b/ext/standard/tests/strings/strnatcasecmp_variation1.phpt @@ -38,8 +38,10 @@ str_dump("\x0", "\0"); str_dump($a, $b); ?> ---EXPECT-- +--EXPECTF-- *** Testing strnatcasecmp() : variation *** + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) int(1) int(-1) diff --git a/ext/standard/tests/strings/strpos.phpt b/ext/standard/tests/strings/strpos.phpt index 449601f6e5480..cff500ff26af6 100644 --- a/ext/standard/tests/strings/strpos.phpt +++ b/ext/standard/tests/strings/strpos.phpt @@ -205,11 +205,15 @@ Position of '-3.344' is => int(19) Position of 'NULL' is => int(31) Position of '0' is => int(12) Position of '0' is => int(12) -Position of '1' is => int(13) +Position of '1' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(13) Position of 'TRUE' is => int(36) Position of '1' is => int(13) Position of '1' is => int(13) -Position of '' is => int(0) +Position of '' is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +int(0) Position of 'FALSE' is => int(41) Position of ' ' is => int(5) Position of ' ' is => int(26) diff --git a/ext/standard/tests/strings/strrchr_variation1.phpt b/ext/standard/tests/strings/strrchr_variation1.phpt index 3e71728ef880a..c782bdacbba70 100644 --- a/ext/standard/tests/strings/strrchr_variation1.phpt +++ b/ext/standard/tests/strings/strrchr_variation1.phpt @@ -120,10 +120,14 @@ string(45) "%0 $&!#%\o,()*+-./:;<=>?@hello123456he #4 A " -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(45) "%0 $&!#%\o,()*+-./:;<=>?@hello123456he #4 A " -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(45) "%0 $&!#%\o,()*+-./:;<=>?@hello123456he #4 A " diff --git a/ext/standard/tests/strings/strrchr_variation2.phpt b/ext/standard/tests/strings/strrchr_variation2.phpt index 646f13a702e4d..e1448ff83789d 100644 --- a/ext/standard/tests/strings/strrchr_variation2.phpt +++ b/ext/standard/tests/strings/strrchr_variation2.phpt @@ -74,7 +74,7 @@ for($index=0; $index ---EXPECT-- +--EXPECTF-- *** Testing strrchr() function: with various single quoted strings *** -- Iteration 1 -- string(22) "lo123456he \x234 \101 " @@ -110,9 +110,13 @@ bool(false) string(5) "\101 " -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 14 -- diff --git a/ext/standard/tests/strings/strripos_variation1.phpt b/ext/standard/tests/strings/strripos_variation1.phpt index 57ae8dd11a65f..8e0eea0eae1f7 100644 --- a/ext/standard/tests/strings/strripos_variation1.phpt +++ b/ext/standard/tests/strings/strripos_variation1.phpt @@ -66,7 +66,7 @@ foreach ($needles as $needle) { $count++; } ?> ---EXPECT-- +--EXPECTF-- *** Testing strripos() function: with double quoted strings *** -- Iteration 1 -- int(28) @@ -124,14 +124,30 @@ int(8) bool(false) int(8) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(44) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(44) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(44) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(43) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(44) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(44) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(44) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(43) -- Iteration 14 -- int(44) diff --git a/ext/standard/tests/strings/strripos_variation2.phpt b/ext/standard/tests/strings/strripos_variation2.phpt index 12bcc2d22bb69..a6f2d64b22ca4 100644 --- a/ext/standard/tests/strings/strripos_variation2.phpt +++ b/ext/standard/tests/strings/strripos_variation2.phpt @@ -67,7 +67,7 @@ foreach ($needles as $needle) { $count++; } ?> ---EXPECT-- +--EXPECTF-- *** Testing strripos() function: with single quoted strings *** -- Iteration 1 -- int(32) @@ -125,14 +125,30 @@ int(10) bool(false) int(10) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(53) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(53) -- Iteration 14 -- int(54) diff --git a/ext/standard/tests/strings/strrpos_variation2.phpt b/ext/standard/tests/strings/strrpos_variation2.phpt index 0022d0e2c3f38..63114af3abb7a 100644 --- a/ext/standard/tests/strings/strrpos_variation2.phpt +++ b/ext/standard/tests/strings/strrpos_variation2.phpt @@ -66,7 +66,7 @@ for($index=0; $index ---EXPECT-- +--EXPECTF-- *** Testing strrpos() function: with single quoted strings *** -- Iteration 1 -- int(32) @@ -102,10 +102,18 @@ bool(false) int(10) int(10) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) -- Iteration 14 -- int(54) diff --git a/ext/standard/tests/strings/strrpos_variation7.phpt b/ext/standard/tests/strings/strrpos_variation7.phpt index f73d4129d5c4d..303170ca54581 100644 --- a/ext/standard/tests/strings/strrpos_variation7.phpt +++ b/ext/standard/tests/strings/strrpos_variation7.phpt @@ -20,10 +20,12 @@ var_dump( strrpos($empty_string, FALSE) ); echo "*** Done ***"; ?> ---EXPECT-- +--EXPECTF-- *** Testing strrpos() function: with heredoc strings *** -- With empty heredoc string -- int(0) strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) *** Done *** diff --git a/ext/standard/tests/strings/strstr.phpt b/ext/standard/tests/strings/strstr.phpt index f5a2d80318b74..9ddec15cfffbe 100644 --- a/ext/standard/tests/strings/strstr.phpt +++ b/ext/standard/tests/strings/strstr.phpt @@ -224,6 +224,8 @@ string(73) "012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 15 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(72) "12033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" @@ -244,6 +246,8 @@ string(72) "12033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 19 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(85) "Hello world,012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" diff --git a/ext/standard/tests/strings/strtolower.phpt b/ext/standard/tests/strings/strtolower.phpt index 6052ccd840d50..45f150349956a 100644 --- a/ext/standard/tests/strings/strtolower.phpt +++ b/ext/standard/tests/strings/strtolower.phpt @@ -330,9 +330,13 @@ string(31) "$$$$$$!!!!@@@@@@@ abcdef !!!***" string(13) "abcd%0abcdabcd" -- Iteration 6 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 7 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" -- Iteration 8 -- diff --git a/ext/standard/tests/strings/strtoupper1.phpt b/ext/standard/tests/strings/strtoupper1.phpt index abda0b9d38b28..62efc393e75b0 100644 --- a/ext/standard/tests/strings/strtoupper1.phpt +++ b/ext/standard/tests/strings/strtoupper1.phpt @@ -329,9 +329,13 @@ string(31) "$$$$$$!!!!@@@@@@@ ABCDEF !!!***" string(13) "ABCD%0ABCDABCD" -- Iteration 6 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 7 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" -- Iteration 8 -- diff --git a/ext/standard/tests/strings/strtr_variation4.phpt b/ext/standard/tests/strings/strtr_variation4.phpt index f89ff654a1869..e6b62aa6f31b9 100644 --- a/ext/standard/tests/strings/strtr_variation4.phpt +++ b/ext/standard/tests/strings/strtr_variation4.phpt @@ -45,7 +45,7 @@ for($index = 0; $index < count($str_arr); $index++) { } echo "*** Done ***"; ?> ---EXPECT-- +--EXPECTF-- *** Testing strtr() : empty string & null for 'str' arg *** -- Iteration 1 -- string(0) "" @@ -54,10 +54,18 @@ string(0) "" string(0) "" string(0) "" -- Iteration 3 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" -- Iteration 4 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" -- Iteration 5 -- string(0) "" diff --git a/ext/standard/tests/strings/strtr_variation6.phpt b/ext/standard/tests/strings/strtr_variation6.phpt index 438eb168fae55..0e693d5b2cdea 100644 --- a/ext/standard/tests/strings/strtr_variation6.phpt +++ b/ext/standard/tests/strings/strtr_variation6.phpt @@ -95,12 +95,20 @@ strtr(): Argument #2 ($from) must be of type string, array given -- Iteration 9 -- strtr(): Argument #2 ($from) must be of type string, array given -- Iteration 10 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(6) "0a2atm" -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(6) "012atm" -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(6) "0a2atm" -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(6) "012atm" -- Iteration 14 -- diff --git a/ext/standard/tests/strings/strtr_variation8.phpt b/ext/standard/tests/strings/strtr_variation8.phpt index d68c6f04e75bb..09cbc78a27fa6 100644 --- a/ext/standard/tests/strings/strtr_variation8.phpt +++ b/ext/standard/tests/strings/strtr_variation8.phpt @@ -105,15 +105,23 @@ string(6) "012atm" string(6) "122atm" -- Iteration 10 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d strtr(): Argument #2 ($from) must be of type array, string given -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d strtr(): Argument #2 ($from) must be of type array, string given -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d strtr(): Argument #2 ($from) must be of type array, string given -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d strtr(): Argument #2 ($from) must be of type array, string given -- Iteration 14 -- diff --git a/ext/standard/tests/strings/trim1.phpt b/ext/standard/tests/strings/trim1.phpt index e0cdbea1c899f..50fa07dd2eeff 100644 --- a/ext/standard/tests/strings/trim1.phpt +++ b/ext/standard/tests/strings/trim1.phpt @@ -46,6 +46,8 @@ string(0) "" string(1) "0" string(1) "0" string(13) " testing trim" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(15) " testing trim " *** Testing with OBJECTS *** diff --git a/ext/standard/tests/strings/ucfirst.phpt b/ext/standard/tests/strings/ucfirst.phpt index 1cae286d98a9a..6bf24b5138851 100644 --- a/ext/standard/tests/strings/ucfirst.phpt +++ b/ext/standard/tests/strings/ucfirst.phpt @@ -118,11 +118,15 @@ string(6) "-3.344" string(4) "NULL" string(1) "0" string(1) "0" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" string(4) "TRUE" string(1) "1" string(1) "1" string(8) "1.234444" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" string(5) "FALSE" string(1) " "