| @@ 5116-5122 (lines=7) @@ | ||
| 5113 | return null; |
|
| 5114 | } |
|
| 5115 | ||
| 5116 | if ($offset || $length !== null) { |
|
| 5117 | $strTmp = self::substr($str, $offset, $length); |
|
| 5118 | if ($strTmp === false) { |
|
| 5119 | return null; |
|
| 5120 | } |
|
| 5121 | $str = (string)$strTmp; |
|
| 5122 | } |
|
| 5123 | ||
| 5124 | $str = (string)$str; |
|
| 5125 | if (!isset($str[0])) { |
|
| @@ 6023-6029 (lines=7) @@ | ||
| 6020 | */ |
|
| 6021 | public static function strspn($str, $mask, $offset = 0, $length = null) |
|
| 6022 | { |
|
| 6023 | if ($offset || $length !== null) { |
|
| 6024 | $strTmp = self::substr($str, $offset, $length); |
|
| 6025 | if ($strTmp === false) { |
|
| 6026 | $strTmp = ''; |
|
| 6027 | } |
|
| 6028 | $str = (string)$strTmp; |
|
| 6029 | } |
|
| 6030 | ||
| 6031 | $str = (string)$str; |
|
| 6032 | if (!isset($str[0], $mask[0])) { |
|