odbc_fetch_into

FunctionParams changed in PHP 8.4

Fetch one result row into array.

PHP 5
PHP 7
PHP 8.0
Improved
PHP 8.1
PHP 8.2-8.3
PHP 8.4
Improved
PHP 8.5
PHP 8.6

odbc_fetch_into Function synopsis

odbc_fetch_into(
    Odbc\Result $statement,
    &$array,
    ?int $row = null
  ): int|false

Parameters

$statement

TypeOdbc\Result

The ODBC result object.

$array

Passed by reference

The result array that can be of any type since it will be converted to type array. The array will contain the column values starting at array index 0.

$row

OptionalType?intDefault valuenull

The row number.

Note that the parameter $array is passed by reference, and contains additional/updated context data that may be useful.

Return value

Typeint|false

Returns the number of columns in the result; false on error.

Changes to the odbc_fetch_into Function

PHP 8.4

  • Parameter type added for parameter #1 ($statement): Odbc\Result
  • Parameter type changed for parameter #3 ($row): int to ?int
  • Parameter default value changed for position #3 ($row): 0 to null
  odbc_fetch_into(
-     $statement,
+     Odbc\Result $statement,
      &$array,
-     int $row = 0
+     ?int $row = null
    ): int|false

PHP 8.0

  • Return type added: int|false
  • Parameter name of parameter #1 changed: $result_id to $statement
  • Parameter name of parameter #2 changed: $result_array to $array
  • Parameter name of parameter #3 changed: $rownumber to $row
  • Parameter type added for parameter #3 ($row): int
  • Parameter default value added for position #3 ($row): 0
  odbc_fetch_into(
-     $result_id,
+     $statement,
-     &$result_array,
+     &$array,
-     $rownumber
+     int $row = 0
-   )
+   ): int|false

odbc_fetch_into Function Availability

PHP VersionAvailability
PHP 8.6Upcoming Release Yes
PHP 8.5Supported (Latest) Yes
PHP 8.4Supported Yes
PHP 8.3Security-Fixes Only Yes
PHP 8.2Security-Fixes Only Yes
PHP 8.1Unsupported Yes
PHP 8.0Unsupported Yes
PHP 7.4Unsupported Yes
PHP 7.3Unsupported Yes
PHP 7.2Unsupported Yes
PHP 7.1Unsupported Yes
PHP 7.0Unsupported Yes
PHP 5.6Unsupported Yes
PHP 5.5Unsupported Yes
PHP 5.4Unsupported Yes
PHP 5.3Unsupported Yes