Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.3 deprecate second param to array_keys #662

Open
andrewnicols opened this issue Nov 7, 2023 · 3 comments
Open

PHP 8.3 deprecate second param to array_keys #662

andrewnicols opened this issue Nov 7, 2023 · 3 comments

Comments

@andrewnicols
Copy link

As noted in the RFC PHP 8.3 deprecates the second parameter to array_keys() to apply a filter.

The following uses of a second filter param to array_keys can be found in tcpdf:

The sgugestion is to combine array_keys and array_filter. A new method may be added in PHP 8.4 but does not exist yet.

tcpdf.php:                                                      $xshift += (count(array_keys($uniarr, 32)) * $spw);
tcpdf_barcodes_1d.php:                  $k = array_keys($chars, $code[$i]);
tcpdf_barcodes_1d.php:                  $k = array_keys($chars, $code[$i]);
tcpdf_barcodes_1d.php:                  $k = array_keys($chars, $code[$i]);
tcpdf_barcodes_1d.php:                  $chk = array_keys($checktable, array($row,$col));
@nicolaasuni
Copy link
Member

The page https://www.php.net/manual/en/function.array-keys.php does not mention any deprecation.
The page https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#array_keys shows the majority of the votes (15) rejected the proposal. What I am missing?

@williamdes
Copy link
Contributor

@kamil-tekiela do you have php src info about it?

@kamil-tekiela
Copy link

It's not deprecated https://3v4l.org/kG9iI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants