3v4l.org

run code in 300+ PHP versions simultaneously
<?php function randomString() { $str = ''; $alpha = range('a', 'f'); $alphaCount = rand(25, 26); for ($i = 0; $i < $alphaCount; $i++) { $str .= $alpha[array_rand($alpha)]; } $numCount = 64 - $alphaCount; for ($i = 0; $i < $numCount; $i++) { $str .= rand(0, 9); } return str_shuffle($str); } echo randomString();

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.2.140.0260.01018.43
7.4.00.0140.00414.94
7.3.120.0080.01014.73
7.3.110.0060.00914.67
7.3.100.0070.01114.90
7.3.90.0080.00614.80
7.3.80.0050.00814.74
7.3.70.0060.00814.84
7.3.60.0020.01014.72
7.3.50.0070.00814.70
7.3.40.0050.01014.79
7.3.30.0040.00814.72
7.3.20.0050.01016.65
7.3.10.0070.00716.63
7.3.00.0040.01216.56
7.2.250.0060.01015.17
7.2.240.0090.00714.93
7.2.230.0070.00615.00
7.2.220.0030.01115.04
7.2.210.0070.00815.02
7.2.200.0130.00215.00
7.2.190.0070.00914.93
7.2.180.0070.00615.07
7.2.170.0100.00815.10
7.2.160.0040.01115.09
7.2.150.0090.00716.92
7.2.140.0090.00916.71
7.2.130.0070.00916.84
7.2.120.0110.00516.77
7.2.110.0060.00916.91
7.2.100.0050.01316.86
7.2.90.0080.00916.69
7.2.80.0080.00616.96
7.2.70.0090.00616.87
7.2.60.0060.01016.85
7.2.50.0070.00816.95
7.2.40.0070.01116.96
7.2.30.0080.00917.00
7.2.20.0120.00516.74
7.2.10.0100.00516.82
7.2.00.0090.00816.89
7.1.330.0020.01315.86
7.1.320.0060.00715.81
7.1.310.0060.01015.74
7.1.300.0060.00815.61
7.1.290.0070.00715.69
7.1.280.0040.01115.81
7.1.270.0050.00715.81
7.1.260.0070.00815.83
7.1.250.0060.00915.67
7.1.240.0060.01115.74
7.1.230.0060.00615.76
7.1.220.0060.00315.87
7.1.210.0030.01515.58
7.1.200.0040.00815.77
7.1.190.0090.00615.77
7.1.180.0070.00715.70
7.1.170.0060.00615.81
7.1.160.0100.00315.48
7.1.150.0040.01115.84
7.1.140.0070.00715.76
7.1.130.0000.01315.75
7.1.120.0100.00315.88
7.1.110.0090.00915.83
7.1.100.0100.00315.77
7.1.90.0130.00715.65
7.1.80.0080.00815.86
7.1.70.0040.01515.71
7.1.60.0090.00915.56
7.1.50.0110.00515.79
7.1.40.0060.01015.88
7.1.30.0070.01015.84
7.1.20.0080.00815.96
7.1.10.0140.00315.60
7.1.00.0050.00515.74

preferences:
37.42 ms | 403 KiB | 5 Q