3v4l.org

run code in 300+ PHP versions simultaneously
<?php $num = 0; while($num != 40){ $alphabet = "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789"; $pass = array(); //remember to declare $pass as an array $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache for ($i = 0; $i < 8; $i++) { $n = rand(0, $alphaLength); $pass[] = $alphabet[$n]; } //print_r ($pass); echo implode($pass) . PHP_EOL; $num++; }

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.4.10.0070.01416.62
7.4.00.0080.01015.73
7.3.130.0120.00316.34
7.3.120.0120.00515.59
7.3.110.0050.01215.53
7.3.100.0080.00715.75
7.3.90.0060.00915.62
7.3.80.0040.00915.58
7.3.70.0050.00815.61
7.3.60.0030.00815.40
7.3.50.0060.00815.45
7.3.40.0070.00515.60
7.3.30.0040.00915.55
7.3.20.0050.01117.28
7.3.10.0060.00917.38
7.3.00.0060.00917.45
7.2.260.0080.01116.39
7.2.250.0050.01315.80
7.2.240.0050.01315.72
7.2.230.0100.00615.81
7.2.220.0090.00615.79
7.2.210.0070.00515.81
7.2.200.0040.00915.67
7.2.190.0070.00515.86
7.2.180.0070.01015.87
7.2.170.0050.00815.75
7.2.160.0070.00716.67
7.2.150.0000.01518.46
7.2.140.0030.01018.51
7.2.130.0000.01618.51
7.2.120.0030.01218.52
7.2.110.0060.00718.45
7.2.100.0070.00718.45
7.2.90.0080.00818.34
7.2.80.0260.01416.36
7.2.70.0290.01016.77
7.2.60.0200.01016.63
7.2.50.0320.00716.78
7.2.40.0250.00516.78
7.2.30.0380.00616.86
7.2.20.0360.00516.90
7.2.10.0290.01116.71
7.2.00.0160.01316.79
7.1.330.0070.00716.67
7.1.320.0050.00916.64
7.1.310.0080.00716.75
7.1.300.0080.00316.63
7.1.290.0100.00316.58
7.1.280.0090.00516.56
7.1.270.0060.00616.53
7.1.260.0090.00416.51
7.1.250.0120.00317.21
7.1.240.0000.01317.30
7.1.230.0070.00717.31
7.1.220.0060.00917.19
7.1.210.0030.01017.45
7.1.200.0270.00715.64
7.1.190.0260.01015.64
7.1.180.0310.00715.62
7.1.170.0240.00515.62
7.1.160.0300.01115.71
7.1.150.0280.00715.64
7.1.140.0200.01015.62
7.1.130.0290.00815.71
7.1.120.0240.00715.63
7.1.110.0260.00815.52
7.1.100.0260.01115.65
7.1.90.0230.01015.54
7.1.80.0350.00515.58
7.1.70.0250.00515.69
7.1.60.0380.01224.55
7.1.50.0440.00624.69
7.1.40.0430.01124.55
7.1.30.0470.01024.67
7.1.20.0390.00924.63
7.1.10.0360.00715.53
7.1.00.0250.01315.53
7.0.330.0030.01316.99
7.0.320.0060.00616.98
7.0.310.0040.00817.00
7.0.300.0000.01517.08
7.0.290.0040.01117.09
7.0.280.0110.00416.96
7.0.270.0060.00617.11
7.0.260.0030.00616.88
7.0.250.0030.01017.01
7.0.240.0110.00416.98
7.0.230.0100.00317.01
7.0.220.0120.00017.00
7.0.210.0090.00617.00
7.0.200.0070.00416.98
7.0.190.0030.00717.09
7.0.180.0060.01017.02
7.0.170.0060.00617.15
7.0.160.0030.01317.08
7.0.150.0030.01017.02
7.0.140.0110.00617.06
7.0.130.0030.00816.99
7.0.120.0090.00617.03
7.0.110.0030.01317.00
7.0.100.0030.01417.08
7.0.90.0060.00617.02
7.0.80.0090.00016.98
7.0.70.0070.00717.21
7.0.60.0030.00717.05
7.0.50.0030.01017.07
7.0.40.0090.00614.95
7.0.30.0030.00614.88
7.0.20.0000.01114.87
7.0.10.0130.00314.88
7.0.00.0120.00414.88
5.6.400.0080.00315.68
5.6.390.0030.01016.22
5.6.380.0060.00915.95
5.6.370.0030.01016.04
5.6.360.0030.01416.24
5.6.350.0100.00015.71
5.6.340.0110.00415.71
5.6.330.0130.00016.24
5.6.320.0040.01116.05
5.6.310.0040.00815.84
5.6.300.0030.00915.60
5.6.290.0030.01016.30
5.6.280.0000.01516.38
5.6.270.0000.01015.71
5.6.260.0060.00615.71
5.6.250.0030.01016.32
5.6.240.0030.01315.77
5.6.230.0110.00416.02
5.6.220.0070.00716.10
5.6.210.0130.00315.94
5.6.200.0030.01016.22
5.6.190.0040.00715.98
5.6.180.0030.00916.00
5.6.170.0160.00016.25
5.6.160.0110.00716.13
5.6.150.0070.01016.16
5.6.140.0060.01016.00
5.6.130.0030.01315.84
5.6.120.0100.00715.92
5.6.110.0070.01015.84
5.6.100.0090.00316.05
5.6.90.0030.01015.86
5.6.80.0070.01015.76
5.6.70.0100.00715.96
5.6.60.0070.01115.88
5.6.50.0040.01116.09
5.6.40.0060.00615.79
5.6.30.0030.00915.95
5.6.20.0070.01015.81
5.6.10.0000.01515.76
5.6.00.0100.00315.86

preferences:
41.33 ms | 403 KiB | 5 Q