diff --git a/ext/standard/pack.c b/ext/standard/pack.c index 969f5a2db742..3c6bb7c35e2f 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -1260,7 +1260,7 @@ PHP_FUNCTION(unpack) if (type == 'l') { v = (int32_t) x; } else { - v = x; + v = (zend_long) x; } ZVAL_LONG(&val, v);