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

Allow *bin2hex and *bin2base64 functions to keep non-empty-string type #8431

Merged
merged 1 commit into from Aug 23, 2022

Commits on Aug 23, 2022

  1. Allow *bin2hex and *bin2base64 functions to keep non-empty-string type

    Those functions should not return a string when they receive a
    non-empty-string in input.
    
    The following example is expected to work:
    ```php
    <?php
    
    /**
     * @param non-empty-string $i
     */
    function takesNonEmptyString(string $i): void {
        echo $i;
    }
    
    takesNonEmptyString(bin2hex("a"));
    takesNonEmptyString(base64_encode("a"));
    ```
    LeSuisse committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    4b1adaa View commit details
    Browse the repository at this point in the history