odbc_autocommit
Function • Params changed in PHP 8.4
Toggle autocommit behaviour.
odbc_autocommit Function synopsis
odbc_autocommit(Odbc\Connection $odbc, ?bool $enable = null): int|bool
Parameters
$odbc
TypeOdbc\Connection
$enable
OptionalType?boolDefault valuenull
If $enable is true, auto-commit is enabled, if
it is false auto-commit is disabled.
If null is passed, this function returns the auto-commit status for
$odbc.
Return value
Typeint|bool
With a null $enable parameter, this function returns
auto-commit status for $odbc. Non-zero is
returned if auto-commit is on, 0 if it is off, or false if an error
occurs.
If $enable is non-null, this function returns true on
success and false on failure.
Changes to the odbc_autocommit Function
PHP 8.4
- Parameter type added for parameter #1 (
$odbc):Odbc\Connection
- odbc_autocommit($odbc, ?bool $enable = null): int|bool
+ odbc_autocommit(Odbc\Connection $odbc, ?bool $enable = null): int|bool PHP 8.3
- Parameter type changed for parameter #2 (
$enable):boolto?bool - Parameter default value changed for position #2 (
$enable):falsetonull
- odbc_autocommit($odbc, bool $enable = false): int|bool
+ odbc_autocommit($odbc, ?bool $enable = null): int|bool PHP 8.0
- Return type added:
int|bool - Parameter name of parameter #1 changed:
$connection_idto$odbc - Parameter name of parameter #2 changed:
$onoffto$enable - Parameter type added for parameter #2 (
$enable):bool - Parameter default value added for position #2 (
$enable):false
- odbc_autocommit($connection_id, $onoff)
+ odbc_autocommit($odbc, bool $enable = false): int|bool odbc_autocommit Function Availability
odbc_autocommit Function Availability| PHP Version | Availability |
|---|---|
| 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 |