[TASK] Initial import of the files.

This commit is contained in:
Jan Philipp Timme
2010-12-21 15:53:40 +00:00
parent fdfb244a44
commit 1aff787183
4 changed files with 67 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
<?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";
?>