Deprecate odbc_result_all()

Part of https://wiki.php.net/rfc/deprecations_php_8_1.
This commit is contained in:
Nikita Popov 2021-07-08 12:37:39 +02:00
parent 625b89af2f
commit 1c07b11b1c
4 changed files with 12 additions and 3 deletions

View file

@ -364,6 +364,10 @@ PHP 8.1 UPGRADE NOTES
parent::init() with parent::__construct().
RFC: https://wiki.php.net/rfc/deprecations_php_8_1
- ODBC:
. odbc_result_all() has been deprecated.
RFC: https://wiki.php.net/rfc/deprecations_php_8_1
- PDO:
. The PDO::FETCH_SERIALIZE mode has been deprecated.
RFC: https://wiki.php.net/rfc/phase_out_serializable

View file

@ -60,7 +60,10 @@ function odbc_fetch_row($statement, ?int $row = null): bool {}
/** @param resource $statement */
function odbc_result($statement, string|int $field): string|bool|null {}
/** @param resource $statement */
/**
* @param resource $statement
* @deprecated
*/
function odbc_result_all($statement, string $format = ""): int|false {}
/** @param resource $statement */

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 6d7d8d8f495236297745b9b1087e5cf955976127 */
* Stub hash: 27a50ba79ed632721ee458527ef543e4b44ee897 */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0)
ZEND_END_ARG_INFO()
@ -330,7 +330,7 @@ static const zend_function_entry ext_functions[] = {
ZEND_FE(odbc_fetch_into, arginfo_odbc_fetch_into)
ZEND_FE(odbc_fetch_row, arginfo_odbc_fetch_row)
ZEND_FE(odbc_result, arginfo_odbc_result)
ZEND_FE(odbc_result_all, arginfo_odbc_result_all)
ZEND_DEP_FE(odbc_result_all, arginfo_odbc_result_all)
ZEND_FE(odbc_free_result, arginfo_odbc_free_result)
ZEND_FE(odbc_connect, arginfo_odbc_connect)
ZEND_FE(odbc_pconnect, arginfo_odbc_pconnect)

View file

@ -59,6 +59,8 @@ array(3) {
Warning: odbc_result(): Cannot get data of column #3 (retcode 100) in %s on line %d
bool(false)
Deprecated: Function odbc_result_all() is deprecated in %s on line %d
<table><tr><th>ID</th><th>real1</th><th>text1</th></tr>
<tr><td>1</td><td>10.02</td><td></td></tr></table>
Warning: odbc_result_all(): Cannot get data of column #3 (retcode 100) in %s on line %d