1--TEST-- 2Bug #77322 (PharData::addEmptyDir('/') Possible integer overflow) 3--EXTENSIONS-- 4phar 5--FILE-- 6<?php 7$zip = new PharData(__DIR__ . '/bug77322.zip'); 8$zip->addEmptyDir('/'); 9var_dump($zip->count()); 10 11$tar = new PharData(__DIR__ . '/bug77322.tar'); 12$tar->addEmptyDir('/'); 13var_dump($tar->count()); 14?> 15--EXPECT-- 16int(1) 17int(1) 18--CLEAN-- 19<?php 20unlink(__DIR__ . '/bug77322.zip'); 21unlink(__DIR__ . '/bug77322.tar'); 22?> 23