3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen_secured_random() { // cause random is the way $a = rand(1337,2600)*42; $b = rand(1879,1955)*42; $a < $b ? $a ^= $b ^= $a ^= $b : $a = $b; return $a+$b; } function secured_hash_function($plain) { // cause md5 is the best hash ever $secured_plain = sanitize_user_input($plain); return md5($secured_plain); } function sanitize_user_input($input) { // cause someone told me to never trust user input $re = '/[^a-zA-Z0-9]/'; $secured_input = preg_replace($re, "", $input); return $secured_input; } $s = 's'; $h ='h'; print "s => "; var_dump($s); print "h => "; var_dump($h); if (isset($s) && isset($h )) { $s = sanitize_user_input($s); $h = secured_hash_function($h); $r = gen_secured_random(); echo "strans => " ; var_dump($s); echo "htrans => " ; var_dump($h); echo "rtrans => " ; var_dump($r); if($s != false && $h != false) { if($s.$r == $h) { print "Well done! Here is your flag: "; } else { print "Fail..."; } } else { print "<p>Hum ...</p>"; } } ?>

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)
7.2.20.0030.01119.94
7.2.10.0030.01219.89
7.2.00.0110.00419.80
7.1.140.0000.01718.95
7.1.130.0030.01318.99
7.1.120.0110.00418.86
7.1.110.0030.01418.55
7.1.100.0060.01218.18
7.1.90.0060.00618.37
7.1.80.0030.01018.17
7.1.70.0040.00817.29
7.1.60.0160.01035.50
7.1.50.0180.00634.84
7.1.40.0130.01334.61
7.1.30.0190.01634.69
7.1.20.0130.01334.70
7.1.10.0000.01216.71
7.1.00.0090.00317.02

preferences:
33.4 ms | 400 KiB | 5 Q