diff --git a/ibm_db2.stub.php b/ibm_db2.stub.php index 62bebf9..693548d 100644 --- a/ibm_db2.stub.php +++ b/ibm_db2.stub.php @@ -288,7 +288,7 @@ function db2_fetch_both($stmt, ?int $row_number = null): array|false {} /** * @param resource $stmt */ -function db2_fetch_object($stmt, ?int $row_number = null): object|false {} +function db2_fetch_object($stmt, ?int $row_number = null): \stdClass|false {} /** * @param resource $stmt @@ -309,12 +309,12 @@ function db2_setoption($resource, array $options, int $type): bool {} /** * @param resource $connection */ -function db2_client_info($connection): object|false {} +function db2_client_info($connection): \stdClass|false {} /** * @param resource $connection */ -function db2_server_info($connection): object|false {} +function db2_server_info($connection): \stdClass|false {} function db2_escape_string(string $string_literal): string {} diff --git a/ibm_db2_arginfo.h b/ibm_db2_arginfo.h index 33b4fd7..0d45be1 100644 --- a/ibm_db2_arginfo.h +++ b/ibm_db2_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3e863612a7a676e042e024f6778b791bd086abe5 */ + * Stub hash: e952caf6e14487291104ab1f1fdd7f268cc8a6bc */ ZEND_BEGIN_ARG_INFO_EX(arginfo_db2_connect, 0, 0, 3) ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 0) @@ -205,7 +205,7 @@ ZEND_END_ARG_INFO() #define arginfo_db2_fetch_both arginfo_db2_fetch_assoc -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_db2_fetch_object, 0, 1, MAY_BE_OBJECT|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_db2_fetch_object, 0, 1, stdClass, MAY_BE_FALSE) ZEND_ARG_INFO(0, stmt) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row_number, IS_LONG, 1, "null") ZEND_END_ARG_INFO() @@ -220,7 +220,7 @@ ZEND_END_ARG_INFO() #define arginfo_db2_setoption arginfo_db2_set_option -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_db2_client_info, 0, 1, MAY_BE_OBJECT|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_db2_client_info, 0, 1, stdClass, MAY_BE_FALSE) ZEND_ARG_INFO(0, connection) ZEND_END_ARG_INFO() diff --git a/ibm_db2_legacy_arginfo.h b/ibm_db2_legacy_arginfo.h index ebd62ed..4a02a9e 100644 --- a/ibm_db2_legacy_arginfo.h +++ b/ibm_db2_legacy_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3e863612a7a676e042e024f6778b791bd086abe5 */ + * Stub hash: e952caf6e14487291104ab1f1fdd7f268cc8a6bc */ ZEND_BEGIN_ARG_INFO_EX(arginfo_db2_connect, 0, 0, 3) ZEND_ARG_INFO(0, database) diff --git a/tests/test_V6_310_ClientInfo.phpt b/tests/test_V6_310_ClientInfo.phpt index f59fde1..11c69a6 100644 --- a/tests/test_V6_310_ClientInfo.phpt +++ b/tests/test_V6_310_ClientInfo.phpt @@ -11,7 +11,7 @@ $conn = db2_connect($database, $user, $password); $client = db2_client_info( $conn ); -if ($client) { +if ($client instanceof \stdClass) { echo "DRIVER_NAME: "; var_dump( $client->DRIVER_NAME ); echo "DRIVER_VER: "; var_dump( $client->DRIVER_VER ); echo "DATA_SOURCE_NAME: "; var_dump( $client->DATA_SOURCE_NAME ); @@ -34,4 +34,3 @@ DRIVER_VER: string(%d) %s DATA_SOURCE_NAME: string(%d) %s DRIVER_ODBC_VER: string(%d) %s ODBC_SQL_CONFORMANCE: string(%d) %s -