3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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)]; } ?>
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined index: itr in /in/ehSjY on line 31
Output for 4.3.0 - 5.2.17
Notice: Undefined index: itr in /in/ehSjY on line 31