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.0: *printf() and related functions support new specifiers #1540

Open
1 task
jrfnl opened this issue Apr 24, 2023 · 0 comments
Open
1 task

PHP 8.0: *printf() and related functions support new specifiers #1540

jrfnl opened this issue Apr 24, 2023 · 0 comments

Comments

@jrfnl
Copy link
Member

jrfnl commented Apr 24, 2023

Is your feature request related to a problem?

PHP 8.0 silently introduced two new placeholder characters for the *printf() range of functions.
This not mentioned in migration guide, changelog etc - I only discovered it by accident via a small note in the manual.

h | Like the g specifier but uses F. Available as of PHP 8.0.0.
H | Like the g specifier but uses E and F. Available as of PHP 8.0.0.

Ref: https://www.php.net/manual/en/function.sprintf.php

Describe the solution you'd like

New sniff in the ParameterValue category to analyze the $format parameter of the relevant functions and flag use of the new modifiers if PHP < 8.0 needs to be supported.

  • I intend to create a pull request to implement this feature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant