Conditions | 4 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 4.5923 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10960 | 2 | public static function strstr_in_byte( |
|
10961 | string $haystack, |
||
10962 | string $needle, |
||
10963 | bool $before_needle = false |
||
10964 | ) { |
||
10965 | 2 | if ($haystack === '' || $needle === '') { |
|
10966 | return false; |
||
10967 | } |
||
10968 | |||
10969 | 2 | if (self::$SUPPORT['mbstring_func_overload'] === true) { |
|
10970 | // "mb_" is available if overload is used, so use it ... |
||
10971 | return \mb_strstr($haystack, $needle, $before_needle, 'CP850'); // 8-BIT |
||
10972 | } |
||
10973 | |||
10974 | 2 | return \strstr($haystack, $needle, $before_needle); |
|
10975 | } |
||
13722 |