A thousand monkeys at a thousand typewriters in PHP
Published Tuesday 6th of December 2011
I actually had this idea ages ago and last night I started thinking about it again while trying to fall asleep so I decided to write the thing once and for all.
Using the convBase function from the comments section here php.net/manual/en/function.base-convert.php as well as this little code snippet:
<?php
$base = '0123456789abcdefghijklmnopqrstuvwxyz '; # add more if you wish
$slots = 1000000; # increase to get longer texts
$variations = pow(strlen($base), $slots);
for ($i = 0; $i < $variations; $i++) {
echo '"' . convBase($i, '0123456789', $base) . '"<br/>';
}
You can make your computer print every text that's ever been written as well as any text that ever will get written in any language that uses the $base characters.
You'll get the LOTR trilogy written backwards only Frodo is called Froggo and the sky's color is purple and instead of beer everybody drinks the Swedish drink Trocadero.
You'll also get the answers to every question that can be asked in text and you'll get a detailed explanation of your life that's correct down to every little detail.
Mind you you'll get everything in between as well :P
- Tags
- Comments
- No comments
Bookmark this Article