@@ -1621,7 +1621,7 @@ public static function encode_mimeheader(
1621
1621
public static function extract_text (
1622
1622
string $ str ,
1623
1623
string $ search = '' ,
1624
- int $ length = null ,
1624
+ ? int $ length = null ,
1625
1625
string $ replacer_for_skipped_text = '… ' ,
1626
1626
string $ encoding = 'UTF-8 '
1627
1627
): string {
@@ -1842,8 +1842,8 @@ public static function file_get_contents(
1842
1842
string $ filename ,
1843
1843
bool $ use_include_path = false ,
1844
1844
$ context = null ,
1845
- int $ offset = null ,
1846
- int $ max_length = null ,
1845
+ ? int $ offset = null ,
1846
+ ? int $ max_length = null ,
1847
1847
int $ timeout = 10 ,
1848
1848
bool $ convert_to_utf8 = true ,
1849
1849
string $ from_encoding = ''
@@ -2576,7 +2576,7 @@ public static function getCharDirection(string $char): string
2576
2576
* return bool-value, if $key is used and available<br>
2577
2577
* otherwise return <strong>null</strong>
2578
2578
*/
2579
- public static function getSupportInfo (string $ key = null )
2579
+ public static function getSupportInfo (? string $ key = null )
2580
2580
{
2581
2581
if ($ key === null ) {
2582
2582
return self ::$ SUPPORT ;
@@ -3027,7 +3027,7 @@ static function (string $chr) use ($keep_ascii_chars, $encoding): string {
3027
3027
*/
3028
3028
public static function html_entity_decode (
3029
3029
string $ str ,
3030
- int $ flags = null ,
3030
+ ? int $ flags = null ,
3031
3031
string $ encoding = 'UTF-8 '
3032
3032
): string {
3033
3033
if (
@@ -4301,7 +4301,7 @@ public static function lcfirst(
4301
4301
string $ str ,
4302
4302
string $ encoding = 'UTF-8 ' ,
4303
4303
bool $ clean_utf8 = false ,
4304
- string $ lang = null ,
4304
+ ? string $ lang = null ,
4305
4305
bool $ try_to_keep_the_string_length = false
4306
4306
): string {
4307
4307
if ($ clean_utf8 ) {
@@ -4367,7 +4367,7 @@ public static function lcwords(
4367
4367
string $ char_list = '' ,
4368
4368
string $ encoding = 'UTF-8 ' ,
4369
4369
bool $ clean_utf8 = false ,
4370
- string $ lang = null ,
4370
+ ? string $ lang = null ,
4371
4371
bool $ try_to_keep_the_string_length = false
4372
4372
): string {
4373
4373
if (!$ str ) {
@@ -4440,7 +4440,7 @@ public static function levenshtein(
4440
4440
*
4441
4441
* @return string the string with unwanted characters stripped from the left
4442
4442
*/
4443
- public static function ltrim (string $ str = '' , string $ chars = null ): string
4443
+ public static function ltrim (string $ str = '' , ? string $ chars = null ): string
4444
4444
{
4445
4445
if ($ str === '' ) {
4446
4446
return '' ;
@@ -5621,7 +5621,7 @@ public static function replace_diamond_question_mark(
5621
5621
* @return string
5622
5622
* <p>A string with unwanted characters stripped from the right.</p>
5623
5623
*/
5624
- public static function rtrim (string $ str = '' , string $ chars = null ): string
5624
+ public static function rtrim (string $ str = '' , ? string $ chars = null ): string
5625
5625
{
5626
5626
if ($ str === '' ) {
5627
5627
return '' ;
@@ -5762,7 +5762,7 @@ public static function str_camelize(
5762
5762
string $ str ,
5763
5763
string $ encoding = 'UTF-8 ' ,
5764
5764
bool $ clean_utf8 = false ,
5765
- string $ lang = null ,
5765
+ ? string $ lang = null ,
5766
5766
bool $ try_to_keep_the_string_length = false
5767
5767
): string {
5768
5768
if ($ clean_utf8 ) {
@@ -6023,7 +6023,7 @@ public static function str_delimit(
6023
6023
string $ delimiter ,
6024
6024
string $ encoding = 'UTF-8 ' ,
6025
6025
bool $ clean_utf8 = false ,
6026
- string $ lang = null ,
6026
+ ? string $ lang = null ,
6027
6027
bool $ try_to_keep_the_string_length = false
6028
6028
): string {
6029
6029
if (self ::$ SUPPORT ['mbstring ' ] === true ) {
@@ -7678,7 +7678,7 @@ public static function str_replace(
7678
7678
$ search ,
7679
7679
$ replace ,
7680
7680
$ subject ,
7681
- int &$ count = null
7681
+ ? int &$ count = null
7682
7682
) {
7683
7683
/**
7684
7684
* @psalm-suppress PossiblyNullArgument
@@ -7912,7 +7912,7 @@ public static function str_shuffle(string $str, string $encoding = 'UTF-8'): str
7912
7912
public static function str_slice (
7913
7913
string $ str ,
7914
7914
int $ start ,
7915
- int $ end = null ,
7915
+ ? int $ end = null ,
7916
7916
string $ encoding = 'UTF-8 '
7917
7917
) {
7918
7918
if ($ encoding === 'UTF-8 ' ) {
@@ -8701,13 +8701,13 @@ public static function str_surround(string $str, string $substring): string
8701
8701
*/
8702
8702
public static function str_titleize (
8703
8703
string $ str ,
8704
- array $ ignore = null ,
8704
+ ? array $ ignore = null ,
8705
8705
string $ encoding = 'UTF-8 ' ,
8706
8706
bool $ clean_utf8 = false ,
8707
- string $ lang = null ,
8707
+ ? string $ lang = null ,
8708
8708
bool $ try_to_keep_the_string_length = false ,
8709
8709
bool $ use_trim_first = true ,
8710
- string $ word_define_chars = null
8710
+ ? string $ word_define_chars = null
8711
8711
): string {
8712
8712
if ($ str === '' ) {
8713
8713
return '' ;
@@ -9059,7 +9059,7 @@ public static function str_to_binary(string $str)
9059
9059
*
9060
9060
* @return string[]
9061
9061
*/
9062
- public static function str_to_lines (string $ str , bool $ remove_empty_values = false , int $ remove_short_values = null ): array
9062
+ public static function str_to_lines (string $ str , bool $ remove_empty_values = false , ? int $ remove_short_values = null ): array
9063
9063
{
9064
9064
if ($ str === '' ) {
9065
9065
return $ remove_empty_values ? [] : ['' ];
@@ -9110,7 +9110,7 @@ public static function str_to_words(
9110
9110
string $ str ,
9111
9111
string $ char_list = '' ,
9112
9112
bool $ remove_empty_values = false ,
9113
- int $ remove_short_values = null
9113
+ ? int $ remove_short_values = null
9114
9114
): array {
9115
9115
if ($ str === '' ) {
9116
9116
return $ remove_empty_values ? [] : ['' ];
@@ -9351,7 +9351,7 @@ public static function str_upper_camelize(
9351
9351
string $ str ,
9352
9352
string $ encoding = 'UTF-8 ' ,
9353
9353
bool $ clean_utf8 = false ,
9354
- string $ lang = null ,
9354
+ ? string $ lang = null ,
9355
9355
bool $ try_to_keep_the_string_length = false
9356
9356
): string {
9357
9357
return self ::ucfirst (self ::str_camelize ($ str , $ encoding ), $ encoding , $ clean_utf8 , $ lang , $ try_to_keep_the_string_length );
@@ -9514,8 +9514,8 @@ public static function strcspn(
9514
9514
string $ str ,
9515
9515
string $ char_list ,
9516
9516
int $ offset = 0 ,
9517
- int $ length = null ,
9518
- string $ encoding = 'UTF-8 '
9517
+ ? int $ length = null ,
9518
+ ? string $ encoding = 'UTF-8 '
9519
9519
): int {
9520
9520
if ($ encoding !== 'UTF-8 ' && $ encoding !== 'CP850 ' ) {
9521
9521
$ encoding = self ::normalize_encoding ($ encoding , 'UTF-8 ' );
@@ -9649,7 +9649,7 @@ public static function string_has_bom(string $str): bool
9649
9649
*/
9650
9650
public static function strip_tags (
9651
9651
string $ str ,
9652
- string $ allowable_tags = null ,
9652
+ ? string $ allowable_tags = null ,
9653
9653
bool $ clean_utf8 = false
9654
9654
): string {
9655
9655
if ($ str === '' ) {
@@ -11117,7 +11117,7 @@ public static function strspn(
11117
11117
string $ str ,
11118
11118
string $ mask ,
11119
11119
int $ offset = 0 ,
11120
- int $ length = null ,
11120
+ ? int $ length = null ,
11121
11121
string $ encoding = 'UTF-8 '
11122
11122
) {
11123
11123
if ($ encoding !== 'UTF-8 ' && $ encoding !== 'CP850 ' ) {
@@ -11348,7 +11348,7 @@ public static function strtocasefold(
11348
11348
bool $ full = true ,
11349
11349
bool $ clean_utf8 = false ,
11350
11350
string $ encoding = 'UTF-8 ' ,
11351
- string $ lang = null ,
11351
+ ? string $ lang = null ,
11352
11352
bool $ lower = true
11353
11353
): string {
11354
11354
if ($ str === '' ) {
@@ -11402,7 +11402,7 @@ public static function strtolower(
11402
11402
$ str ,
11403
11403
string $ encoding = 'UTF-8 ' ,
11404
11404
bool $ clean_utf8 = false ,
11405
- string $ lang = null ,
11405
+ ? string $ lang = null ,
11406
11406
bool $ try_to_keep_the_string_length = false
11407
11407
): string {
11408
11408
// init
@@ -11482,7 +11482,7 @@ public static function strtoupper(
11482
11482
$ str ,
11483
11483
string $ encoding = 'UTF-8 ' ,
11484
11484
bool $ clean_utf8 = false ,
11485
- string $ lang = null ,
11485
+ ? string $ lang = null ,
11486
11486
bool $ try_to_keep_the_string_length = false
11487
11487
): string {
11488
11488
// init
@@ -11696,7 +11696,7 @@ public static function strwidth(
11696
11696
public static function substr (
11697
11697
string $ str ,
11698
11698
int $ offset = 0 ,
11699
- int $ length = null ,
11699
+ ? int $ length = null ,
11700
11700
string $ encoding = 'UTF-8 ' ,
11701
11701
bool $ clean_utf8 = false
11702
11702
) {
@@ -11867,7 +11867,7 @@ public static function substr_compare(
11867
11867
string $ str1 ,
11868
11868
string $ str2 ,
11869
11869
int $ offset = 0 ,
11870
- int $ length = null ,
11870
+ ? int $ length = null ,
11871
11871
bool $ case_insensitivity = false ,
11872
11872
string $ encoding = 'UTF-8 '
11873
11873
): int {
@@ -11925,7 +11925,7 @@ public static function substr_count(
11925
11925
string $ haystack ,
11926
11926
string $ needle ,
11927
11927
int $ offset = 0 ,
11928
- int $ length = null ,
11928
+ ? int $ length = null ,
11929
11929
string $ encoding = 'UTF-8 ' ,
11930
11930
bool $ clean_utf8 = false
11931
11931
) {
@@ -12017,7 +12017,7 @@ public static function substr_count_in_byte(
12017
12017
string $ haystack ,
12018
12018
string $ needle ,
12019
12019
int $ offset = 0 ,
12020
- int $ length = null
12020
+ ? int $ length = null
12021
12021
) {
12022
12022
if ($ haystack === '' || $ needle === '' ) {
12023
12023
return 0 ;
@@ -12167,7 +12167,7 @@ public static function substr_ileft(string $haystack, string $needle): string
12167
12167
* <i>length</i> parameters.</p><p>If <i>str</i> is shorter than <i>offset</i>
12168
12168
* characters long, <b>FALSE</b> will be returned.</p>
12169
12169
*/
12170
- public static function substr_in_byte (string $ str , int $ offset = 0 , int $ length = null )
12170
+ public static function substr_in_byte (string $ str , int $ offset = 0 , ? int $ length = null )
12171
12171
{
12172
12172
// empty string
12173
12173
if ($ str === '' || $ length === 0 ) {
@@ -12565,7 +12565,7 @@ public static function titlecase(
12565
12565
string $ str ,
12566
12566
string $ encoding = 'UTF-8 ' ,
12567
12567
bool $ clean_utf8 = false ,
12568
- string $ lang = null ,
12568
+ ? string $ lang = null ,
12569
12569
bool $ try_to_keep_the_string_length = false
12570
12570
): string {
12571
12571
if ($ clean_utf8 ) {
@@ -12972,7 +12972,7 @@ public static function to_string($input)
12972
12972
* @return string
12973
12973
* <p>The trimmed string.</p>
12974
12974
*/
12975
- public static function trim (string $ str = '' , string $ chars = null ): string
12975
+ public static function trim (string $ str = '' , ? string $ chars = null ): string
12976
12976
{
12977
12977
if ($ str === '' ) {
12978
12978
return '' ;
@@ -13022,7 +13022,7 @@ public static function ucfirst(
13022
13022
string $ str ,
13023
13023
string $ encoding = 'UTF-8 ' ,
13024
13024
bool $ clean_utf8 = false ,
13025
- string $ lang = null ,
13025
+ ? string $ lang = null ,
13026
13026
bool $ try_to_keep_the_string_length = false
13027
13027
): string {
13028
13028
if ($ str === '' ) {
@@ -13490,7 +13490,7 @@ public static function wordwrap_per_line(
13490
13490
string $ break = "\n" ,
13491
13491
bool $ cut = false ,
13492
13492
bool $ add_final_break = true ,
13493
- string $ delimiter = null
13493
+ ? string $ delimiter = null
13494
13494
): string {
13495
13495
if ($ delimiter === null ) {
13496
13496
$ strings = \preg_split ('/ \\r \\n| \\r| \\n/ ' , $ str );
@@ -13817,7 +13817,7 @@ private static function mbstring_overloaded(): bool
13817
13817
private static function reduce_string_array (
13818
13818
array $ strings ,
13819
13819
bool $ remove_empty_values ,
13820
- int $ remove_short_values = null
13820
+ ? int $ remove_short_values = null
13821
13821
) {
13822
13822
// init
13823
13823
$ return = [];
0 commit comments