3v4l.org

run code in 300+ PHP versions simultaneously
<?php function randomPassword() { $currentmonth = date('n') - 1; $alphabet = "abcdefghijklm"; $random_hash = substr(md5(uniqid(rand(), true)), 28, 4); return $random_hash . substr($alphabet, $currentmonth, 1); } echo randomPassword();

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.0.20.0120.01017.45
8.0.10.0060.01817.40
8.0.00.0140.00817.40
7.4.150.0080.01017.40
7.4.140.0170.00617.40
7.4.130.0110.01517.40
7.4.120.0170.00717.40
7.4.110.0160.00817.40
7.4.100.0200.00617.40
7.4.90.0210.01017.40
7.4.80.0140.01217.40
7.4.70.0160.00917.40
7.4.60.0140.01017.40
7.4.50.0130.01117.40
7.4.40.0170.00817.40
7.4.30.0180.00917.40
7.4.20.0170.00817.40
7.4.10.0110.01116.61
7.4.00.0050.01516.71
7.3.270.0100.00717.40
7.3.260.0130.00817.40
7.3.250.0170.00817.40
7.3.240.0160.00917.40
7.3.230.0190.00617.40
7.3.220.0160.00817.40
7.3.210.0190.00717.40
7.3.200.0110.01317.40
7.3.190.0140.01117.40
7.3.180.0160.00917.40
7.3.170.0190.00517.40
7.3.160.0190.00817.40
7.3.150.0170.00917.40
7.3.140.0150.01117.40
7.3.130.0220.00616.50
7.3.120.0110.01216.58
7.3.110.0150.00716.64
7.3.100.0120.01016.60
7.3.90.0170.00516.59
7.3.80.0160.00516.56
7.3.70.0130.00916.52
7.3.60.0120.00816.59
7.3.50.0120.00916.50
7.3.40.0120.00916.60
7.3.30.0080.01216.55
7.3.20.0180.00517.21
7.3.10.0410.00916.66
7.3.00.0330.00916.66
7.2.340.0110.01317.40
7.2.330.0200.01117.40
7.2.320.0160.00717.40
7.2.310.0140.00917.40
7.2.300.0220.00217.40
7.2.290.0170.00617.40
7.2.280.0130.00917.40
7.2.270.0180.00717.40
7.2.260.0080.01516.63
7.2.250.0070.01216.62
7.2.240.0140.00716.67
7.2.230.0080.01116.63
7.2.220.0100.01016.62
7.2.210.0140.00616.65
7.2.200.0110.00916.64
7.2.190.0130.00616.63
7.2.180.0080.00916.60
7.2.170.0110.01116.61
7.2.160.0140.00816.71
7.2.150.0180.00717.30
7.2.140.0140.00717.16
7.2.130.0260.00816.76
7.2.120.0330.01216.80
7.2.110.0330.00916.68
7.2.100.0320.01416.78
7.2.90.0330.00616.79
7.2.80.0310.01116.78
7.2.70.0340.00916.80
7.2.60.0300.01116.75
7.2.50.0290.01216.76
7.2.40.0260.00916.77
7.2.30.0280.01216.62
7.2.20.0320.01016.78
7.2.10.0270.00816.71
7.2.00.0310.01116.78
7.1.330.0130.00816.84
7.1.320.0100.01116.95
7.1.310.0320.00616.85
7.1.300.0130.00916.92
7.1.290.0140.00616.91
7.1.280.0140.00716.94
7.1.270.0270.01316.95
7.1.260.0150.00916.85
7.1.250.0300.01116.17
7.1.240.0150.01216.89
7.1.230.0190.00816.87
7.1.220.0180.01116.89
7.1.210.0180.00916.87
7.1.200.0170.00616.85
7.1.190.0230.00616.89
7.1.180.0170.00616.94
7.1.170.0140.00816.83
7.1.160.0120.01116.80
7.1.150.0230.00616.83
7.1.140.0160.01016.75
7.1.130.0230.00616.86
7.1.120.0190.00616.92
7.1.110.0130.01116.82
7.1.100.0130.00716.87
7.1.90.0160.00816.93
7.1.80.0130.01016.88
7.1.70.0160.00416.89
7.1.60.0140.00916.92
7.1.50.0450.00816.88
7.1.40.0180.00716.89
7.1.30.0150.01016.90
7.1.20.0160.01016.88
7.1.10.0170.00716.93
7.1.00.0130.01616.92

preferences:
29.68 ms | 403 KiB | 5 Q