3v4l.org

run code in 300+ PHP versions simultaneously
<?php function genRandomString($length=10 ,$characters = '0123456789abcdefghijklmnopqrstuvwxyz',$string = '') { for ($p = 0; $p < $length; $p++) { $string .= $characters[mt_rand(0, strlen($characters)-1)]; } return $string; }

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.0090.00914.82
7.4.00.0050.01214.56
7.3.130.0100.00714.59
7.3.120.0070.01014.59
7.3.110.0070.01014.52
7.3.100.0030.01214.73
7.3.90.0080.00514.61
7.3.80.0060.00414.82
7.3.70.0060.00614.61
7.3.60.0050.01114.52
7.3.50.0030.00914.77
7.3.40.0090.00314.60
7.3.30.0040.01114.71
7.3.20.0070.00816.46
7.3.10.0050.01016.53
7.3.00.0090.00316.45
7.2.260.0030.01714.95
7.2.250.0040.01214.67
7.2.240.0030.01614.78
7.2.230.0060.01114.91
7.2.220.0080.00614.82
7.2.210.0100.00214.75
7.2.200.0050.01314.79
7.2.190.0080.00714.86
7.2.180.0050.00714.86
7.2.170.0030.00914.76
7.2.160.0060.00314.90
7.2.150.0060.00916.61
7.2.140.0100.00616.68
7.2.130.0070.00316.70
7.2.120.0060.00616.52
7.2.110.0500.00515.09
7.2.100.0310.01014.83
7.2.90.0510.00514.97
7.2.80.0480.00614.91
7.2.70.0550.00815.07
7.2.60.0530.01015.00
7.2.50.0440.00715.33
7.2.40.0440.00915.12
7.2.30.0670.00615.14
7.2.20.0440.00615.26
7.2.10.0420.00815.25
7.2.00.0460.01014.99
7.1.330.0080.00815.53
7.1.320.0040.00815.61
7.1.310.0020.01015.31
7.1.300.0030.01115.49
7.1.290.0080.00315.56
7.1.280.0030.01015.58
7.1.270.0070.00515.63
7.1.260.0050.01115.52
7.1.250.0000.01315.46
7.1.240.0000.01315.44
7.1.230.0350.00614.17
7.1.220.0310.00713.96
7.1.210.0460.00813.89
7.1.200.0600.00413.94
7.1.190.0840.00713.96
7.1.180.0730.00513.90
7.1.170.0550.00614.04
7.1.160.0410.00614.00
7.1.150.0390.01014.16
7.1.140.0400.00714.05
7.1.130.0410.00714.18
7.1.120.0590.00614.04
7.1.110.0550.00614.20
7.1.100.0620.00714.01
7.1.90.0610.00514.03
7.1.80.0510.00814.13
7.1.70.0730.00413.97
7.1.60.0780.01127.47
7.1.50.0820.01227.71
7.1.40.0940.01027.44
7.1.30.0630.01327.42
7.1.20.0790.01027.51
7.1.10.0410.00714.06
7.1.00.0510.00914.05
7.0.330.0030.01015.29
7.0.320.0120.00315.15
7.0.310.0090.00615.22
7.0.300.0060.00315.36
7.0.290.0070.00715.25
7.0.280.0060.00615.15
7.0.270.0090.00614.95
7.0.260.0080.00415.21
7.0.250.0080.00515.09
7.0.240.0090.00315.32
7.0.230.0070.01015.30
7.0.220.0100.00315.21
7.0.210.0070.00715.27
7.0.200.0100.00315.39
7.0.190.0030.00914.93
7.0.180.0060.00615.38
7.0.170.0060.00614.88
7.0.160.0030.01115.21
7.0.150.0080.00015.27
7.0.140.0030.00615.21
7.0.130.0130.00015.42
7.0.120.0030.01315.03
7.0.110.0070.00715.02
7.0.100.0060.00315.21
7.0.90.0040.00414.98
7.0.80.0110.00015.32
7.0.70.0060.00315.32
7.0.60.0040.01115.04
7.0.50.0030.01015.34
7.0.40.0030.00613.24
7.0.30.0030.01012.95
7.0.20.0090.00413.28
7.0.10.0000.01413.08
7.0.00.0030.00613.37
5.6.400.0000.00914.41
5.6.390.0000.01314.43
5.6.380.0070.00813.94
5.6.370.0080.00813.92
5.6.360.0110.00714.10
5.6.350.0070.00713.99
5.6.340.0030.01013.79
5.6.330.0110.00714.36
5.6.320.0060.00314.27
5.6.310.0070.00314.06
5.6.300.0030.01014.35
5.6.290.0070.00714.20
5.6.280.0070.00414.24
5.6.270.0000.01114.45
5.6.260.0070.00714.38
5.6.250.0000.01014.19
5.6.240.0060.00614.25
5.6.230.0040.01114.25
5.6.220.0110.00314.26
5.6.210.0000.01313.91
5.6.200.0030.00614.05
5.6.190.0030.00713.92
5.6.180.0050.00513.99
5.6.170.0030.01013.94
5.6.160.0110.00413.87
5.6.150.0060.00914.15
5.6.140.0110.00414.30
5.6.130.0110.00414.03
5.6.120.0140.00014.18
5.6.110.0000.01013.79
5.6.100.0040.00814.06
5.6.90.0030.01013.91
5.6.80.0000.01414.23
5.6.70.0060.00313.91
5.6.60.0000.00914.12
5.6.50.0060.00313.99
5.6.40.0070.00714.07
5.6.30.0120.00614.03
5.6.20.0090.00913.93
5.6.10.0040.01113.76
5.6.00.0100.00313.92

preferences:
38.26 ms | 401 KiB | 5 Q