3v4l.org

run code in 300+ PHP versions simultaneously
<?php function password_generate($chars) { $data = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcefghijklmnopqrstuvwxyz'; return substr(str_shuffle($data), 0, $chars); } echo password_generate(7); ?> - See more at: http://www.w3resource.com/php-exercises/php-string-exercises.php#sthash.tKmyePfQ.dpuf

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.0040.01116.47
7.4.00.0070.01015.50
7.3.130.0080.00816.43
7.3.120.0020.01315.31
7.3.110.0040.01315.30
7.3.100.0040.01115.22
7.3.90.0060.01015.22
7.3.80.0060.00715.28
7.3.70.0060.00815.24
7.3.60.0110.00615.19
7.3.50.0110.00415.19
7.3.40.0060.00815.27
7.3.30.0050.01015.27
7.3.20.0060.00617.08
7.3.10.0040.01117.07
7.3.00.0020.01017.24
7.2.260.0110.00716.50
7.2.250.0080.00915.50
7.2.240.0050.01315.58
7.2.230.0080.00715.37
7.2.220.0070.00815.36
7.2.210.0080.00615.38
7.2.200.0060.01015.39
7.2.190.0080.00815.47
7.2.180.0120.00415.40
7.2.170.0090.00815.38
7.2.160.0060.00916.45
7.2.150.0070.00718.41
7.2.140.0000.01118.20
7.2.130.0040.01518.29
7.2.120.0060.00818.40
7.2.110.0090.00618.34
7.2.100.0030.01018.34
7.2.90.0070.00718.34
7.2.80.0080.00818.25
7.2.70.0100.00718.46
7.2.60.0240.00217.30
7.2.50.0060.01218.25
7.2.40.0130.00318.30
7.2.30.0040.01418.41
7.2.20.0090.00918.31
7.2.10.0000.01318.23
7.2.00.0090.00518.67
7.1.330.0100.00516.13
7.1.320.0080.00616.21
7.1.310.0020.01216.28
7.1.300.0070.00716.14
7.1.290.0100.00716.31
7.1.280.0050.00716.25
7.1.270.0070.00716.19
7.1.260.0070.00616.22
7.1.250.0030.00917.38
7.1.240.0030.00617.34
7.1.230.0100.00717.25
7.1.220.0100.00317.33
7.1.210.0150.00017.29
7.1.200.0070.00716.37
7.1.190.0030.01017.19
7.1.180.0090.00617.33
7.1.170.0060.00917.34
7.1.160.0130.00317.22
7.1.150.0080.00417.22
7.1.140.0040.01117.29
7.1.130.0030.01617.36
7.1.120.0110.00417.25
7.1.110.0040.00817.32
7.1.100.0000.01317.60
7.1.90.0060.00917.43
7.1.80.0120.00017.24
7.1.70.0050.00317.08
7.1.60.0070.01318.38
7.1.50.0120.00526.11
7.1.40.0000.01517.39
7.1.30.0090.00617.34
7.1.20.0040.01117.27
7.1.10.0040.01417.20
7.1.00.0100.03419.83
7.0.330.0060.00916.82
7.0.320.0030.01316.79
7.0.310.0040.01116.88
7.0.300.0070.01017.02
7.0.290.0090.00916.72
7.0.280.0030.01016.90
7.0.270.0090.00617.22
7.0.260.0030.00616.94
7.0.250.0080.00416.89
7.0.240.0030.00916.88
7.0.230.0000.01316.95
7.0.220.0060.01216.88
7.0.210.0030.00617.03
7.0.200.0070.00716.78
7.0.190.0120.00317.11
7.0.180.0110.00317.00
7.0.170.0090.00616.96
7.0.160.0030.01017.07
7.0.150.0120.00817.06
7.0.140.0050.04219.57
7.0.130.0070.01417.01
7.0.120.0030.01216.90
7.0.110.0100.00316.86
7.0.100.0070.00716.74
7.0.90.0100.00316.96
7.0.80.0060.01117.01
7.0.70.0100.00317.01
7.0.60.0090.02918.42
7.0.50.0070.02517.43
7.0.40.0050.03517.53
7.0.30.0270.02317.48
7.0.20.0240.03317.46
7.0.10.0200.04017.51
7.0.00.0080.02617.48
5.6.400.0060.00915.73
5.6.390.0130.00315.66
5.6.380.0100.00715.81
5.6.370.0100.00315.73
5.6.360.0040.01115.80
5.6.350.0100.00315.88
5.6.340.0070.01015.81
5.6.330.0040.01215.86
5.6.320.0030.01215.91
5.6.310.0030.01315.58
5.6.300.0110.00715.79
5.6.290.0060.01215.66
5.6.280.0070.03818.48
5.6.270.0130.00615.76
5.6.260.0030.01415.90
5.6.250.0030.01215.90
5.6.240.0070.01116.00
5.6.230.0050.00515.84
5.6.220.0070.01016.09
5.6.210.0050.04418.06
5.6.200.0080.02517.02
5.6.190.0110.01818.14
5.6.180.0270.02518.08
5.6.170.0180.02218.16
5.6.160.0080.02418.16
5.6.150.0070.04516.96
5.6.140.0040.04216.99
5.6.130.0150.03516.99
5.6.120.0050.02818.50
5.6.110.0130.03918.50
5.6.100.0160.04218.44
5.6.90.0110.03718.49
5.6.80.0080.04318.13
5.6.70.0100.03818.03
5.6.60.0030.01015.55
5.6.50.0070.00715.59
5.6.40.0000.01415.70
5.6.30.0000.01515.82
5.6.20.0070.01015.67
5.6.10.0100.00615.69
5.6.00.0040.00915.86
5.5.380.0110.00415.65
5.5.370.0050.00515.58
5.5.360.0040.01115.66
5.5.350.0120.03818.07
5.5.340.0050.02616.91
5.5.330.0060.03318.24
5.5.320.0110.02517.96
5.5.310.0130.02717.97
5.5.300.0100.03816.97
5.5.290.0050.02816.76
5.5.280.0050.03318.31
5.5.270.0020.03318.44
5.5.260.0060.04718.29
5.5.250.0080.03818.08
5.5.240.0090.03817.86
5.5.230.0040.01115.69
5.5.220.0090.00915.71
5.5.210.0030.01015.69
5.5.200.0060.00615.55
5.5.190.0070.00715.77
5.5.180.0030.00915.70
5.5.170.0090.00615.66
5.5.160.0100.00715.69
5.5.150.0040.00715.61
5.5.140.0060.00315.71
5.5.130.0120.00015.82
5.5.120.0040.00815.84
5.5.110.0120.00015.69
5.5.100.0060.00915.66
5.5.90.0000.01515.77
5.5.80.0090.00915.67
5.5.70.0110.00615.79
5.5.60.0100.00715.67
5.5.50.0060.00915.43
5.5.40.0060.00615.63
5.5.30.0040.00815.44
5.5.20.0000.01315.45
5.5.10.0070.00715.65
5.5.00.0060.00915.71
5.4.450.0140.03016.13
5.4.440.0130.02916.16
5.4.430.0340.02215.97
5.4.420.0200.02216.02
5.4.410.0150.02616.07
5.4.400.0200.02315.85
5.4.390.0300.02715.77
5.4.380.0170.03415.64
5.4.370.0180.03615.50
5.4.360.0230.03315.58
5.4.350.0230.02715.61
5.4.340.0180.03215.62
5.4.330.0090.00312.63
5.4.320.0040.02412.53
5.4.310.0070.02112.55
5.4.300.0050.02212.60
5.4.290.0060.02612.58
5.4.280.0040.02512.45
5.4.270.0060.01912.46
5.4.260.0040.02512.57
5.4.250.0040.02212.45
5.4.240.0040.02312.50
5.4.230.0040.02512.52
5.4.220.0070.02712.53
5.4.210.0040.02212.46
5.4.200.0050.02212.44
5.4.190.0080.01912.48
5.4.180.0050.02312.50
5.4.170.0050.02012.46
5.4.160.0060.02212.45
5.4.150.0050.02312.44
5.4.140.0070.02212.30
5.4.130.0080.02012.28
5.4.120.0050.02112.26
5.4.110.0060.02412.37
5.4.100.0040.02412.30
5.4.90.0040.02712.34
5.4.80.0060.02312.26
5.4.70.0040.02412.25
5.4.60.0050.02112.26
5.4.50.0050.02312.28
5.4.40.0060.02312.34
5.4.30.0040.02312.36
5.4.20.0050.02212.29
5.4.10.0050.02012.38
5.4.00.0030.02612.01
5.3.290.0070.03712.80
5.3.280.0060.03812.71
5.3.270.0090.03512.72
5.3.260.0080.03812.72
5.3.250.0060.03812.72
5.3.240.0080.03512.72
5.3.230.0060.03912.71
5.3.220.0030.04012.68
5.3.210.0090.04112.68
5.3.200.0070.03412.68
5.3.190.0050.04512.68
5.3.180.0080.03512.68
5.3.170.0070.03512.66
5.3.160.0050.03812.68
5.3.150.0080.03712.67
5.3.140.0060.03712.66
5.3.130.0060.03912.66
5.3.120.0070.03712.66
5.3.110.0060.03812.66
5.3.100.0100.03512.13
5.3.90.0090.04012.10
5.3.80.0120.04412.09
5.3.70.0040.05112.09
5.3.60.0070.03612.08
5.3.50.0070.03612.02
5.3.40.0030.04112.02
5.3.30.0060.03511.98
5.3.20.0070.03311.76
5.3.10.0090.03111.73
5.3.00.0040.03911.72
5.2.170.0030.0329.22
5.2.160.0040.0339.21
5.2.150.0040.0299.21
5.2.140.0020.0319.21
5.2.130.0060.0359.17
5.2.120.0030.0379.18
5.2.110.0060.0309.18
5.2.100.0030.0349.17
5.2.90.0060.0309.17
5.2.80.0060.0279.17
5.2.70.0040.0389.16
5.2.60.0070.0299.13
5.2.50.0050.0299.09
5.2.40.0040.0319.07
5.2.30.0010.0329.04
5.2.20.0060.0269.04
5.2.10.0040.0298.94
5.2.00.0040.0348.80
5.1.60.0060.0288.09
5.1.50.0070.0238.08
5.1.40.0050.0238.05
5.1.30.0040.0258.41
5.1.20.0060.0248.43
5.1.10.0040.0268.16
5.1.00.0020.0278.16
5.0.50.0030.0216.63
5.0.40.0030.0196.50
5.0.30.0040.0326.30
5.0.20.0020.0206.28
5.0.10.0030.0216.26
5.0.00.0050.0296.25
4.4.90.0030.0154.78
4.4.80.0020.0154.75
4.4.70.0010.0174.75
4.4.60.0030.0144.75
4.4.50.0070.0154.77
4.4.40.0050.0264.71
4.4.30.0020.0204.76
4.4.20.0030.0174.85
4.4.10.0020.0204.85
4.4.00.0020.0334.76
4.3.110.0030.0194.67
4.3.100.0070.0184.66
4.3.90.0040.0194.63
4.3.80.0030.0244.58
4.3.70.0040.0134.63
4.3.60.0030.0144.62
4.3.50.0010.0214.63
4.3.40.0040.0224.54
4.3.30.0020.0153.29
4.3.20.0030.0143.27
4.3.10.0020.0193.24
4.3.00.0030.02315.68

preferences:
41.22 ms | 404 KiB | 6 Q