@@ -268,7 +268,7 @@ public function slice(int $start = 0, int $length = null): AbstractString
268268 {
269269 $ str = clone $ this ;
270270 try {
271- $ str ->string = (string ) grapheme_substr ($ this ->string , $ start , $ length ?? \ PHP_INT_MAX );
271+ $ str ->string = (string ) grapheme_substr ($ this ->string , $ start , $ length ?? 2147483647 );
272272 } catch (\ValueError $ e ) {
273273 $ str ->string = '' ;
274274 }
@@ -280,8 +280,8 @@ public function splice(string $replacement, int $start = 0, int $length = null):
280280 {
281281 $ str = clone $ this ;
282282 $ start = $ start ? \strlen (grapheme_substr ($ this ->string , 0 , $ start )) : 0 ;
283- $ length = $ length ? \strlen (grapheme_substr ($ this ->string , $ start , $ length ?? \ PHP_INT_MAX )) : $ length ;
284- $ str ->string = substr_replace ($ this ->string , $ replacement , $ start , $ length ?? \ PHP_INT_MAX );
283+ $ length = $ length ? \strlen (grapheme_substr ($ this ->string , $ start , $ length ?? 2147483647 )) : $ length ;
284+ $ str ->string = substr_replace ($ this ->string , $ replacement , $ start , $ length ?? 2147483647 );
285285 normalizer_is_normalized ($ str ->string ) ?: $ str ->string = normalizer_normalize ($ str ->string );
286286
287287 if (false === $ str ->string ) {
@@ -293,7 +293,7 @@ public function splice(string $replacement, int $start = 0, int $length = null):
293293
294294 public function split (string $ delimiter , int $ limit = null , int $ flags = null ): array
295295 {
296- if (1 > $ limit = $ limit ?? \ PHP_INT_MAX ) {
296+ if (1 > $ limit = $ limit ?? 2147483647 ) {
297297 throw new InvalidArgumentException ('Split limit must be a positive integer. ' );
298298 }
299299
0 commit comments