3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Based on: // ------------------------------------------------------------------- quick script to grab a random BOFH excuse. - Peter Lowe // pgl@yoyo.org // http://pgl.yoyo.org/bofh/ credit to Jeff Ballard <ballard@NOSPAMcs.wisc.edu> for the original bofh excuse server: http://www.cs.wisc.edu/~ballard/bofh/ ------------------------------------------------------------------- [2004-08-28] odd: http://wiki.asleep.net/BOFHInetdPHP?show_comments=1 http://pgl.yoyo.org/bofh/ripoff.html (local copy) someone's ripped off this code and signed it with "author A.Sleep <a.sleep@asleep.net>" it's not exactly the same, but it's definitely based off this code. how strange. oh well. ------------------------------------------------------------------- // Secure, memorizable password generator */ $adj = dirname(__FILE__).'/adj.lst'; $noun = dirname(__FILE__).'/noun.lst'; for ($turn = 1; $turn <= $_POST["itr"]; $turn++){ if (!$adj = @file($adj)){ echo "couldn't read adjective file '$adj'"; } echo $adj[mt_rand(0, count($adj)-1)]; if (!$noun = @file($noun)){ echo "couldn't read adjective file '$noun'"; } echo $noun[mt_rand(0, count($noun)-1)]; } ?>

preferences:
36.23 ms | 402 KiB | 5 Q