16 lines
365 B
PHP
16 lines
365 B
PHP
|
<?php
|
||
|
$file = $argv[1];
|
||
|
if(file_exists($file) === FALSE) die("Nein\n");
|
||
|
$data = file_get_contents($file);
|
||
|
$size = strlen($data);
|
||
|
$foobar = array();
|
||
|
for($i = 0; $i < $size; $i++) {
|
||
|
$char = $data[$i];
|
||
|
$foobar[ord($char)]++;
|
||
|
}
|
||
|
rsort($foobar);
|
||
|
print_r($foobar);
|
||
|
echo "\n\n";
|
||
|
echo "Strlen: " . $size . "\n";
|
||
|
echo "filesize: " . filesize($file) . "\n";
|
||
|
?>
|