| Subject | Details |
| :------------- | :---------------------------------------------------------------------------- |
| Plugin | Php Inspections (EA Ultimate) 3.0.7 |
| Language level | e.g. PHP 7.2 |
$str = 'kikoo1,kikoo2,kikoo3';
[$kikoo1, $kikoo2, $kikoo3] = explode( ',', $str);
A warning is raised. "[EA] 'explode(',', $str, 2)' could be used here (only some parts has been used). "
No. Warning. if we had 2, a php error is raised.
No. Warning. if we had 2, a php error is raised.
It shouldn't: https://3v4l.org/cNKVr
Do you have an example of an error in such case?
I don't understand, you have modified the code so it's normal it work. It should be:
$str = 'kikoo1,kikoo2,kikoo3';
[$kikoo1, $kikoo2, $kikoo3] = explode( ',', $str, 2);
Looks like a duplicate of https://github.com/kalessil/phpinspectionsea/issues/1463
I am closing.
I don't understand, you have modified the code so it's normal it work.
Sorry, I misread the suggested fix.
Looks like a duplicate of #1463
I think it's more a duplicate of #1484
Duplicates #1484
Most helpful comment
I think it's more a duplicate of #1484