1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-10-20 09:36:13 +02:00

fixed some errors tests for php-32 bit platform

This commit is contained in:
wapplay-home-linux
2017-11-14 08:47:25 +03:00
parent ec919808d0
commit 129e69c293
5 changed files with 38 additions and 41 deletions

View File

@@ -19,7 +19,7 @@ class PackUtil
*/
public static function packLongLE($longValue)
{
if (version_compare(PHP_VERSION, '5.6.3') >= 0) {
if (PHP_INT_SIZE === 8 && PHP_VERSION_ID >= 506030) {
return pack("P", $longValue);
}
@@ -39,7 +39,7 @@ class PackUtil
*/
public static function unpackLongLE($value)
{
if (version_compare(PHP_VERSION, '5.6.3') >= 0) {
if (PHP_INT_SIZE === 8 && PHP_VERSION_ID >= 506030) {
return unpack('P', $value)[1];
}
$unpack = unpack('Va/Vb', $value);