Skip to content

Commit 66ece81

Browse files
author
Flavius12
committed
Update phartools.php
1 parent 4b22cd9 commit 66ece81

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

phartools.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* PharTools (v1.0) by EvolSoft
55
* Developer: EvolSoft (Flavius12)
66
* Website: http://www.evolsoft.tk
7-
* Date: 25/04/2015 12:00 AM (UTC)
7+
* Date: 26/04/2015 08:27 PM (UTC)
88
* Copyright & License: (C) 2015 EvolSoft
99
* Licensed under MIT (https://github.com/EvolSoft/PharTools/blob/master/LICENSE)
1010
*/
@@ -204,13 +204,18 @@
204204
}else{
205205
$metadata = "No metadata found\n";
206206
}
207-
echo "Size: " . intval((filesize($file) * .0009765625) * .0009765625) ." MB (" . intval(filesize($file) * .0009765625) . " KB)\n";
207+
echo "Size: " . round((filesize($file) * .0009765625) * .0009765625, 2) ." MB (" . round(filesize($file) * .0009765625, 3) . " KB)\n";
208208
echo "Signature: " . $phar->getSignature()["hash"] . "\n";
209209
echo "Signature type: " . $phar->getSignature()["hash_type"] . "\n";
210-
echo "Stub: " . $phar->getStub() . "\n";
211210
echo "Writable: " . strbool($phar->isWritable()) . "\n";
212211
echo "Readable: " . strbool($phar->isReadable()) . "\n";
213212
echo "Metadata: " . $metadata;
213+
echo "Show stub (y, n)? ";
214+
$input = fopen("php://stdin","r");
215+
$line = fgets($input);
216+
if(trim($line) == 'y'){
217+
echo $phar->getStub();
218+
}
214219
}catch(Exception $e){
215220
echo "Invalid phar file";
216221
}

0 commit comments

Comments
 (0)