-
Notifications
You must be signed in to change notification settings - Fork 651
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
mb_str_split signature missing #6217
Labels
bug
easy problems
Issues that can be fixed without background knowledge of Psalm
internal stubs/callmap
Comments
Hey @bitwise-operators, can you reproduce the issue on https://psalm.dev ? |
I found these snippets: https://psalm.dev/r/3d06280737<?php
// This works
function getFirstChar(string $input):string {
$chars = str_split($input);
return $chars[0] ?? '';
}
// Should be the same
function getFirstCharMultibyte(string $input):string {
$chars = mb_str_split($input);
return $chars[0] ?? '';
}
|
Thanks! Do you mind adding that to the callmap yourself? |
orklah
added
bug
easy problems
Issues that can be fixed without background knowledge of Psalm
internal stubs/callmap
labels
Aug 1, 2021
Sure, I'll have a look |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
easy problems
Issues that can be fixed without background knowledge of Psalm
internal stubs/callmap
PHP 7.4 added the mb_str_split function to the multibyte string library.
However, it appears to be missing form the CallMap_74_delta.php dictionary, as well as from the main CallMap.php
I believe the signature should be:
'mb_str_split' => ['list<string>', 'string'=>'string', 'limit='=>'int', 'encoding='=>'string|null'],
The text was updated successfully, but these errors were encountered: