--TEST-- Phar: tar with hard link to nowhere --SKIPIF-- --FILE-- init(); $a->addFile('hardlink', 'internal/file.txt', array( 'mode' => 0xA000 + 0644, 'uid' => 0, 'gid' => 0, 'size' => 0, 'mtime' => time(), )); $a->close(); try { $p = new PharData($fname); } catch (Exception $e) { echo $e->getMessage() . "\n"; } ?> ===DONE=== --CLEAN-- --EXPECTF-- phar error: "%slinks2.tar" is a corrupted tar file - hard link to non-existent file "internal/file.txt" ===DONE===