| @@ 5120-5126 (lines=7) @@ | ||
| 5117 | return null; |
|
| 5118 | } |
|
| 5119 | ||
| 5120 | if ($offset || $length !== null) { |
|
| 5121 | $strTmp = self::substr($str, $offset, $length); |
|
| 5122 | if ($strTmp === false) { |
|
| 5123 | return null; |
|
| 5124 | } |
|
| 5125 | $str = (string)$strTmp; |
|
| 5126 | } |
|
| 5127 | ||
| 5128 | $str = (string)$str; |
|
| 5129 | if (!isset($str[0])) { |
|
| @@ 6027-6033 (lines=7) @@ | ||
| 6024 | */ |
|
| 6025 | public static function strspn($str, $mask, $offset = 0, $length = null) |
|
| 6026 | { |
|
| 6027 | if ($offset || $length !== null) { |
|
| 6028 | $strTmp = self::substr($str, $offset, $length); |
|
| 6029 | if ($strTmp === false) { |
|
| 6030 | $strTmp = ''; |
|
| 6031 | } |
|
| 6032 | $str = (string)$strTmp; |
|
| 6033 | } |
|
| 6034 | ||
| 6035 | $str = (string)$str; |
|
| 6036 | if (!isset($str[0], $mask[0])) { |
|