odbc_fetch_object

FunctionParams changed in PHP 8.4

Fetch a result row as an object.

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_object Function synopsis

odbc_fetch_object(Odbc\Result $statement, ?int $row = null): stdClass|false

Parameters

$statement

TypeOdbc\Result

The ODBC result object from odbc_exec.

$row

OptionalType?intDefault valuenull

Optionally choose which row number to retrieve.

Return value

TypestdClass|false

Returns an object that corresponds to the fetched row, or false if there are no more rows.

Changes to the odbc_fetch_object Function

PHP 8.4

  • Parameter type added for parameter #1 ($statement): Odbc\Result
  • Parameter type changed for parameter #2 ($row): int to ?int
  • Parameter default value changed for position #2 ($row): -1 to null
- odbc_fetch_object($statement, int $row = -1): stdClass|false
+ odbc_fetch_object(Odbc\Result $statement, ?int $row = null): stdClass|false

PHP 8.0

  • Return type added: stdClass|false
  • Parameter name of parameter #1 changed: $result to $statement
  • Parameter name of parameter #2 changed: $rownumber to $row
  • Parameter type added for parameter #2 ($row): int
  • Parameter default value added for position #2 ($row): -1
- odbc_fetch_object($result, $rownumber)
+ odbc_fetch_object($statement, int $row = -1): stdClass|false

odbc_fetch_object 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