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

sscanf with 0 arguments should be allowed when return value is passed to variables #125

Open
boesing opened this issue Sep 14, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@boesing
Copy link
Owner

boesing commented Sep 14, 2022

In case that sscanf is being requested with 0 arguments (besides the format), sscanf returns the values instead of setting the arguments by reference.

For example:

[$integer, $string] = sscanf('1 GB', '%d%s');

Becomes:

$integer = 1;
$string = 'GB';

Therefore, 0 arguments are okay for sscanf.

@boesing boesing added the bug Something isn't working label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant