3v4l.org

run code in 300+ PHP versions simultaneously
<? function generate_password( $length = 8 ) { $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?"; $password = substr( str_shuffle( $chars ), 0, $length ); return $password; } echo generate_password(); ?>

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.60.0150.00616.50
8.3.50.0080.00821.91
8.3.40.0070.00718.63
8.3.30.0110.00319.05
8.3.20.0040.00420.16
8.3.10.0040.00423.53
8.3.00.0040.00419.13
8.2.180.0070.01418.11
8.2.170.0150.00322.96
8.2.160.0100.00320.50
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0090.00026.16
8.2.120.0040.00422.17
8.2.110.0090.00022.08
8.2.100.0060.00617.84
8.2.90.0040.00417.72
8.2.80.0040.00417.97
8.2.70.0000.00917.50
8.2.60.0000.00817.93
8.2.50.0060.00618.07
8.2.40.0070.00018.03
8.2.30.0050.00317.85
8.2.20.0050.00217.64
8.2.10.0070.00017.84
8.2.00.0000.01117.41
8.1.280.0030.01025.92
8.1.270.0060.00323.97
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00020.61
8.1.230.0080.00420.96
8.1.220.0000.00817.74
8.1.210.0060.00318.96
8.1.200.0000.00917.22
8.1.190.0040.00417.28
8.1.180.0050.01018.10
8.1.170.0000.00918.52
8.1.160.0050.00221.93
8.1.150.0040.00418.54
8.1.140.0000.00817.22
8.1.130.0030.00317.76
8.1.120.0000.00717.21
8.1.110.0000.01017.26
8.1.100.0040.00417.29
8.1.90.0030.00617.28
8.1.80.0030.00317.20
8.1.70.0030.00317.32
8.1.60.0080.00017.44
8.1.50.0000.00817.39
8.1.40.0000.00817.37
8.1.30.0030.00517.48
8.1.20.0000.00717.50
8.1.10.0050.00217.31
8.1.00.0050.00217.32
8.0.300.0070.00019.86
8.0.290.0000.00717.18
8.0.280.0030.00318.26
8.0.270.0070.00017.23
8.0.260.0050.00217.18
8.0.250.0040.00416.83
8.0.240.0030.00316.80
8.0.230.0000.00816.80
8.0.220.0040.00416.73
8.0.210.0030.00516.77
8.0.200.0000.00616.84
8.0.190.0070.00016.70
8.0.180.0050.00216.78
8.0.170.0000.00716.71
8.0.160.0070.00016.76
8.0.150.0050.00316.81
8.0.140.0040.00316.70
8.0.130.0000.00613.21
8.0.120.0040.00416.73
8.0.110.0070.00016.64
8.0.100.0030.00416.56
8.0.90.0000.00816.75
8.0.80.0000.01416.68
8.0.70.0080.00016.64
8.0.60.0060.00316.57
8.0.50.0040.00416.54
8.0.30.0130.00616.99
8.0.20.0060.01217.40
8.0.10.0040.00416.85
8.0.00.0100.00716.67
7.4.330.0060.00015.00
7.4.320.0000.00716.34
7.4.300.0030.00316.37
7.4.290.0070.00016.46
7.4.280.0070.00016.36
7.4.270.0000.00716.46
7.4.260.0070.00016.45
7.4.250.0040.00416.23
7.4.240.0030.00316.37
7.4.230.0030.00316.46
7.4.220.0000.01716.40
7.4.210.0050.01116.46
7.4.200.0030.00316.53
7.4.190.0000.00716.54
7.4.160.0100.00516.61
7.4.150.0090.00917.40
7.4.140.0140.00317.86
7.4.130.0090.00916.47
7.4.120.0120.00616.28
7.4.110.0140.01016.40
7.4.100.0090.00916.21
7.4.90.0200.00016.43
7.4.80.0130.00619.39
7.4.70.0070.01116.25
7.4.60.0090.00816.27
7.4.50.0040.00416.43
7.4.40.0070.00722.77
7.4.30.0030.01316.55
7.3.330.0000.00613.15
7.3.320.0060.00013.20
7.3.310.0030.00316.21
7.3.300.0030.00316.17
7.3.290.0040.01216.18
7.3.280.0070.01116.12
7.3.270.0060.01317.40
7.3.260.0070.01016.53
7.3.250.0090.01316.31
7.3.240.0070.01016.38
7.3.230.0100.00716.39
7.3.210.0100.00716.20
7.3.200.0070.01016.43
7.3.190.0180.00316.29
7.3.180.0070.01016.27
7.3.170.0090.00616.27
7.3.160.0090.00916.29
7.2.330.0120.00616.53
7.2.320.0130.00316.54
7.2.310.0070.01016.44
7.2.300.0080.00816.63
7.2.290.0110.01116.40
7.2.00.0030.01019.50
7.1.100.0000.01318.07
7.1.70.0030.00517.04
7.1.60.0100.01419.33
7.1.50.0120.00316.92
7.1.00.0000.08022.51
7.0.200.0000.01016.40
7.0.140.0030.07321.92
7.0.60.0070.07719.94
7.0.50.0130.06717.86
7.0.40.0100.08320.24
7.0.30.0270.07720.26
7.0.20.0200.04320.15
7.0.10.0230.05720.05
7.0.00.0130.08320.15
5.6.280.0000.07721.07
5.6.210.0030.05720.66
5.6.200.0030.04718.15
5.6.190.0070.04020.61
5.6.180.3630.03720.62
5.6.170.0300.03320.57
5.6.160.0030.04020.54
5.6.150.0070.03718.23
5.6.140.0030.07718.12
5.6.130.0100.07318.23
5.6.120.0130.08020.99
5.6.110.0200.04021.02
5.6.100.0030.04020.86
5.6.90.0170.07321.00
5.6.80.0170.07320.38
5.6.70.0070.04020.38
5.5.350.0170.08320.32
5.5.340.0070.06717.94
5.5.330.0030.05020.57
5.5.320.0270.04020.26
5.5.310.0400.07720.41
5.5.300.0030.05017.96
5.5.290.0000.06718.04
5.5.280.0100.03320.97
5.5.270.0130.03720.73
5.5.260.0070.07720.74
5.5.250.0030.08720.57
5.5.240.0070.05320.33
5.4.450.0200.03719.41
5.4.440.0130.06719.54
5.4.430.0130.04719.18
5.4.420.0070.08319.32
5.4.410.0230.04719.38
5.4.400.0200.07018.85
5.4.390.0200.05019.31
5.4.380.0230.03019.09
5.4.370.0170.03719.09
5.4.360.0200.05719.05
5.4.350.0130.04319.20
5.4.340.0130.04019.00
5.4.320.0170.03719.07
5.4.310.0170.04018.88
5.4.300.0230.03018.98
5.4.290.0230.04318.84
5.4.280.0200.04719.06
5.4.270.0200.07019.13
5.4.260.0070.03718.83
5.4.250.0030.04319.12
5.4.240.0930.03318.99
5.4.230.2030.03319.14
5.4.220.1400.04319.19
5.4.210.0070.03319.08
5.4.200.0000.04018.83
5.4.190.1230.03719.21
5.4.180.1900.03019.15
5.4.170.1830.03319.30
5.4.160.1830.03719.11
5.4.150.2000.03319.21
5.4.140.2000.04316.50
5.4.130.2030.03316.39
5.4.120.1970.04716.49
5.4.110.1870.03316.55
5.4.100.0400.03016.54
5.4.90.0030.03316.28
5.4.80.0130.04716.44
5.4.70.2100.04016.44
5.4.60.1800.04016.16
5.4.50.1930.02716.34
5.4.40.1900.03316.33
5.4.30.1900.04316.16
5.4.20.2130.03716.55
5.4.10.1930.03016.48
5.4.00.2000.03715.74
5.3.290.2100.04714.50
5.3.280.0000.04014.56
5.3.270.0070.08014.64
5.3.260.0900.05314.44
5.3.250.2070.04714.55
5.3.240.2170.04314.45
5.3.230.1870.03314.61
5.3.220.1900.03014.62
5.3.210.2130.03314.40
5.3.200.2200.05014.41
5.3.190.0430.04014.52
5.3.180.0070.06314.51
5.3.170.0070.04014.41
5.3.160.0530.03014.43
5.3.150.1800.04014.40
5.3.140.1900.03014.45
5.3.130.0030.03714.45
5.3.120.0030.07314.38
5.3.110.0930.04014.50
5.3.100.2130.04013.97
5.3.90.2030.04013.85
5.3.80.1930.05013.89
5.3.70.2030.04713.87
5.3.60.2030.04713.98
5.3.50.1900.04013.93
5.3.40.2000.04713.88
5.3.30.2200.04713.87
5.3.20.2270.04013.63
5.3.10.0970.04313.74
5.3.00.0030.04013.45
5.2.170.0000.03011.08
5.2.160.0870.02011.03
5.2.150.1770.03310.98
5.2.140.1800.03011.00
5.2.130.1830.03010.93
5.2.120.1900.03310.97
5.2.110.1770.02711.03
5.2.100.1730.04010.95
5.2.90.1870.03310.96
5.2.80.1530.03311.14
5.2.70.1570.03011.03
5.2.60.1670.03010.88
5.2.50.1630.02711.05
5.2.40.0170.02310.85
5.2.30.0030.03010.80
5.2.20.0030.02711.00
5.2.10.0100.02010.89
5.2.00.1400.03010.64
5.1.60.1470.02010.06
5.1.50.0930.0239.97
5.1.40.1130.0209.91
5.1.30.1130.02710.32
5.1.20.1300.02310.44
5.1.10.1330.0209.99
5.1.00.1300.0239.93
5.0.50.0670.0208.47
5.0.40.0700.0208.48
5.0.30.0370.0308.31
5.0.20.0900.0178.12
5.0.10.0730.0208.09
5.0.00.0670.0338.07
4.4.90.0670.0178.06
4.4.80.0370.0138.06
4.4.70.0570.0138.06
4.4.60.0830.0108.06
4.4.50.0670.0138.06
4.4.40.0570.0308.06
4.4.30.0030.0138.06
4.4.20.0030.0178.06
4.4.10.0000.0178.06
4.4.00.0000.0238.06
4.3.110.0030.0138.06
4.3.100.0030.0108.06
4.3.90.0000.0208.06
4.3.80.0000.0238.06
4.3.70.0600.0178.06
4.3.60.0630.0178.06
4.3.50.0630.0138.06
4.3.40.0630.0238.06
4.3.30.0330.0178.06
4.3.20.0430.0178.06
4.3.10.0300.0178.06
4.3.00.0330.0178.06

preferences:
40.9 ms | 401 KiB | 5 Q