Skip to content

Conversation

@jlherren
Copy link
Contributor

Fix handling of non-bools as $strict parameter and omit false from return type when $string is valid base64.

This is useful when constant binary strings are required in code, e.g.:

$emptyZipFile = base64_decode('UEsFBgAAAAAAAAAAAAAAAAAAAAAAAA==', true);

Related to phpstan/phpstan#7866

- Detect when the result cannot be false
- Correctly treat non-boolean $strict parameter
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

Successfully merging this pull request may close these issues.

2 participants