@@ -5138,6 +5138,14 @@ public function testArrayFunctions(
5138
5138
5139
5139
public function dataFunctions (): array
5140
5140
{
5141
+ $ strSplitDefaultReturnType = 'non-empty-array<int, string>|false ' ;
5142
+ if (PHP_VERSION_ID >= 80000 ) {
5143
+ $ strSplitDefaultReturnType = 'non-empty-array<int, string> ' ;
5144
+ }
5145
+ if (PHP_VERSION_ID >= 80200 ) {
5146
+ $ strSplitDefaultReturnType = 'array<int, string> ' ;
5147
+ }
5148
+
5141
5149
return [
5142
5150
[
5143
5151
'string ' ,
@@ -5328,11 +5336,7 @@ public function dataFunctions(): array
5328
5336
'$gettimeofdayBenevolent ' ,
5329
5337
],
5330
5338
[
5331
- match (true ) {
5332
- PHP_VERSION_ID >= 80200 => 'array<int, string> ' ,
5333
- PHP_VERSION_ID >= 80000 => 'non-empty-array<int, string> ' ,
5334
- default => 'non-empty-array<int, string>|false ' ,
5335
- },
5339
+ $ strSplitDefaultReturnType ,
5336
5340
'$strSplitConstantStringWithoutDefinedParameters ' ,
5337
5341
],
5338
5342
[
@@ -5356,23 +5360,15 @@ public function dataFunctions(): array
5356
5360
'$strSplitConstantStringWithFailureSplitLength ' ,
5357
5361
],
5358
5362
[
5359
- match (true ) {
5360
- PHP_VERSION_ID >= 80200 => 'array<int, string> ' ,
5361
- PHP_VERSION_ID >= 80000 => 'non-empty-array<int, string> ' ,
5362
- default => 'non-empty-array<int, string>|false ' ,
5363
- },
5363
+ $ strSplitDefaultReturnType ,
5364
5364
'$strSplitConstantStringWithInvalidSplitLengthType ' ,
5365
5365
],
5366
5366
[
5367
5367
'array{ \'a \'| \'g \', \'b \'| \'h \', \'c \'| \'i \', \'d \'| \'j \', \'e \'| \'k \', \'f \'| \'l \'} ' ,
5368
5368
'$strSplitConstantStringWithVariableStringAndConstantSplitLength ' ,
5369
5369
],
5370
5370
[
5371
- match (true ) {
5372
- PHP_VERSION_ID >= 80200 => 'array<int, string> ' ,
5373
- PHP_VERSION_ID >= 80000 => 'non-empty-array<int, string> ' ,
5374
- default => 'non-empty-array<int, string>|false ' ,
5375
- },
5371
+ $ strSplitDefaultReturnType ,
5376
5372
'$strSplitConstantStringWithVariableStringAndVariableSplitLength ' ,
5377
5373
],
5378
5374
// parse_url
0 commit comments