dba_open
Function • Return type changed in PHP 8.4
Open database.
dba_open Function synopsis
dba_open(
string $path,
string $mode,
?string $handler = null,
int $permission = 0644,
int $map_size = 0,
?int $flags = null
): Dba\Connection|false
Parameters
$path
Typestring
$mode
Typestring
There can only be one writer for one database file. When you use dba on a web server and more than one request requires write operations they can only be done one after another. Also read during write is not allowed. The dba extension uses locks to prevent this. See the following table:
$handler
OptionalType?stringDefault valuenull
$permission
OptionalTypeintDefault value0644
$map_size
OptionalTypeintDefault value0
$flags
OptionalType?intDefault valuenull
Return value
TypeDba\Connection|false
Changes to the dba_open Function
PHP 8.4
- Return type added:
Dba\Connection|false
dba_open(
string $path,
string $mode,
?string $handler = null,
int $permission = 0644,
int $map_size = 0,
?int $flags = null
- )
+ ): Dba\Connection|false PHP 8.2
- Optional parameter added - #5:
int $map_size = 0 - Optional parameter added - #6:
?int $flags = null
dba_open(
- $path,
- $mode,
- $handler = <default>,
- ...$handler_params
+ string $path,
+ string $mode,
+ ?string $handler = null,
+ int $permission = 0644,
+ int $map_size = 0,
+ ?int $flags = null
) PHP 8.0
- Parameter name of parameter #3 changed:
$handlernameto$handler - Parameter default value added for position #3 (
$handler):<default> - Parameter name of parameter #4 changed:
$handler_parametersto$handler_params
dba_open(
$path,
$mode,
- $handlername,
+ $handler = <default>,
- ...$handler_parameters
+ ...$handler_params
) PHP 5.6
- Parameter name of parameter #4 changed:
$...to$handler_parameters
dba_open(
$path,
$mode,
$handlername,
- $...
+ ...$handler_parameters
) dba_open Function Availability
dba_open 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 |