Skip to content
This repository was archived by the owner on Jul 6, 2019. It is now read-only.

Conversation

@madmuffin1
Copy link

I had (a rather edge case) where Strings::startsWith was called from an Arrays::each closure similar to this:

$string = "12345";

Arrays::each([
    '1234' => "jey"
], function($value, $key) use ($string) {
    if(Strings::startsWith($string, $key)) {
        print_r("match");
    }
});

this would never match, since the key is automagically converted into an integer and strpos($haystack, INTEGER) will never match.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant