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'"; } mt_srand((double)microtime()*1000000); // not necessary after php 4.2.0 echo $adj[mt_rand(0, count($adj)-1)]; if (!$noun = @file($noun){ echo "couldn't read adjective file '$noun'"; } mt_srand((double)microtime()*1000000); // not necessary after php 4.2.0 echo $noun[mt_rand(0, count($noun)-1)]; } ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.120.0140.04311.99
5.4.110.0130.04311.98
5.4.100.0160.04211.98
5.4.90.0180.05711.99
5.4.80.0160.04111.99
5.4.70.0190.05311.98
5.4.60.0160.05711.98
5.4.50.0140.04311.98
5.4.40.0210.05011.97
5.4.30.0260.06311.97
5.4.20.0160.03911.96
5.4.10.0130.04311.96
5.4.00.0160.04011.46
5.3.220.0170.05712.68
5.3.210.0160.04412.68
5.3.200.0230.06712.68
5.3.190.0140.04612.68
5.3.180.0230.06712.67
5.3.170.0140.04612.67
5.3.160.0160.04312.67
5.3.150.0180.04212.67
5.3.140.0170.04512.66
5.3.130.0160.04612.66
5.3.120.0190.04112.66
5.3.110.0160.04512.66
5.3.100.0130.04612.12
5.3.90.0180.04012.08
5.3.80.0120.05012.08
5.3.70.0270.08012.07
5.3.60.0150.04412.06
5.3.50.0160.04412.00
5.3.40.0140.04712.00
5.3.30.0160.04111.94
5.3.20.0190.04011.71
5.3.10.0130.04211.67
5.3.00.0150.04211.66

preferences:
142.66 ms | 1394 KiB | 7 Q