@@ -46,7 +46,7 @@ public function test__encodeLength($expected, $length)
46
46
public function encodedLengthProvider (): array
47
47
{
48
48
// [encoded length value, length value]
49
- $ default = [
49
+ $ result = [
50
50
[0 , 0 ], // Low limit value for 1 byte encoded length
51
51
[0x39 , 0x39 ], // Arbitrary median value for 1 byte encoded length
52
52
[0x7f , 0x7F ], // High limit value for 1 byte encoded length
@@ -64,17 +64,13 @@ public function encodedLengthProvider(): array
64
64
[0xEFFFFFFF , 0xFFFFFFF ], // High limit value for 4 bytes encoded length
65
65
];
66
66
67
- if (PHP_INT_SIZE < 8 ) {
68
- return $ default ;
67
+ if (PHP_INT_SIZE > 4 ) {
68
+ $ result [] = [0xF010000000 , 0x10000000 ]; // Low limit value for 5 bytes encoded length
69
+ $ result [] = [0xF10D4EF9C3 , 0x10D4EF9C3 ]; // Arbitrary median value for 5 bytes encoded length
70
+ $ result [] = [0xF7FFFFFFFF , 0x7FFFFFFFF ]; // High limit value for 5 bytes encoded length
69
71
}
70
72
71
- $ append = [
72
- [0xF010000000 , 0x10000000 ], // Low limit value for 5 bytes encoded length
73
- [0xF10D4EF9C3 , 0x10D4EF9C3 ], // Arbitrary median value for 5 bytes encoded length
74
- [0xF7FFFFFFFF , 0x7FFFFFFFF ], // High limit value for 5 bytes encoded length
75
- ];
76
-
77
- return array_merge ($ default , $ append );
73
+ return $ result ;
78
74
}
79
75
80
76
/**
0 commit comments