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