-
-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Description
Related to #1589
Analysis
Recap of existing PHP 8.2 behavior based on the RFC:
// Signature 1: called with 2 or 3 arguments.
function dba_fetch(string|array $key, resource $dba, int $skip = 0): string|false {}
// Signature 2: called with exactly 3 arguments, and $dba trades places with $skip
function dba_fetch(string|array $key, int $skip, resource $dba): string|false {}Updated behavior for each version:
// Signature 1: unchanged
function dba_fetch(string|array $key, resource $dba, int $skip = 0): string|false {}
// Signature 2: deprecated in PHP 8.3
function dba_fetch(string|array $key, int $skip, resource $dba): string|false {}Detection in PHP 8.2
dba_fetch(...)with 3rd argument of type int, see "Syntax Variations" below.
Detection in PHP 8.3
dba_fetch(...)with 2nd argument of type int, see "Syntax Variations" below.
Top 2000 Packages
Found 2 usages of dba_fetch in the top 2000 packages. Neither uses the deprecated signature.
Examples in james-heinrich/getid3:
dba_fetch(getID3::VERSION, $this->dba) != getID3::VERSION$result = dba_fetch($key, $this->dba);Syntax Variations
dba_fetch(..., 1, ...)✅ Can be handled by PHPCompatibility.dba_fetch(..., $skip, ...)❌ Unreliable, as $skip could be defined anywhere.
3v4l.org
dba_fetch() is not available on 3v4l.org