3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timeStart = microtime(true); $rand = substr(str_shuffle('a-Z strings'), 5, 5); $timeEnd = microtime(true); $time = $timeEnd - $timeStart; echo "Code 1: $time seconds\n"; $timeStart = microtime(true); for ($i = 0; $i <= 5; ++$i) { $rand .= chr(rand(99, 155)); } $timeEnd = microtime(true); $time = $timeEnd - $timeStart; echo "Code 2: $time seconds\n";

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.01114.65
7.4.00.0100.01014.84
7.3.130.0090.00915.09
7.3.120.0040.01415.06
7.3.110.0030.01615.11
7.3.100.0030.00914.75
7.3.90.0030.01414.74
7.3.80.0040.01115.14
7.3.70.0000.01515.01
7.3.60.0040.00714.92
7.3.50.0100.00314.89
7.3.40.0060.00914.53
7.3.30.0040.01114.79
7.3.20.0000.01016.71
7.3.10.0040.00816.57
7.3.00.0060.00716.74
7.2.260.0060.01214.99
7.2.250.0110.00715.25
7.2.240.0060.01015.18
7.2.230.0040.00714.96
7.2.220.0070.00715.29
7.2.210.0040.01214.97
7.2.200.0000.01214.88
7.2.190.0000.00914.86
7.2.180.0040.00415.06
7.2.170.0070.01014.68
7.2.160.0080.00315.27
7.2.150.0070.00417.01
7.2.140.0080.00816.90
7.2.130.0040.01016.91
7.2.120.0060.00516.78
7.2.110.0090.00716.79
7.2.100.0100.00716.87
7.2.90.0090.00717.10
7.2.80.0070.00917.02
7.2.70.0030.00916.98
7.2.60.0080.00716.93
7.2.50.0080.01016.77
7.2.40.0060.00816.97
7.2.30.0050.00816.84
7.2.20.0090.00316.96
7.2.10.0070.00816.78
7.2.00.0090.00617.76
7.1.330.0070.00715.88
7.1.320.0050.00515.56
7.1.310.0000.01515.72
7.1.300.0060.00615.41
7.1.290.0040.00815.67
7.1.280.0070.00415.51
7.1.270.0100.00315.71
7.1.260.0090.00915.62
7.1.250.0080.00715.63
7.1.240.0080.00415.70
7.1.230.0030.01315.85
7.1.220.0030.00915.88
7.1.210.0000.01015.89
7.1.200.0030.00615.84
7.1.190.0150.00015.71
7.1.180.0070.00615.55
7.1.170.0070.00715.87
7.1.160.0030.01315.76
7.1.150.0100.00715.91
7.1.140.0030.00615.75
7.1.130.0090.00615.87
7.1.120.0000.01415.86
7.1.110.0060.00615.95
7.1.100.0030.01015.76
7.1.90.0040.01115.85
7.1.80.0030.01015.75
7.1.70.0050.00516.41
7.1.60.0060.00516.56
7.1.50.0050.00816.39
7.1.40.0030.01116.08
7.1.30.0050.00716.00
7.1.20.0110.00316.28
7.1.10.0040.00916.14
7.1.00.0020.00816.24
7.0.330.0060.00615.13
7.0.320.0150.00015.53
7.0.310.0000.01215.24
7.0.300.0070.00715.35
7.0.290.0000.01415.23
7.0.280.0100.00315.32
7.0.270.0030.00915.60
7.0.260.0040.01115.32
7.0.250.0060.00615.26
7.0.240.0040.00815.42
7.0.230.0100.00315.28
7.0.220.0070.01015.47
7.0.210.0100.00315.59
7.0.200.0050.00416.02
7.0.190.0050.00616.13
7.0.180.0000.00915.78
7.0.170.0060.00315.79
7.0.160.0020.01015.88
7.0.150.0070.00315.88
7.0.140.0010.01015.83
7.0.130.0060.00815.94
7.0.120.0110.00315.97
7.0.110.0000.00915.91
7.0.100.0040.00515.85
7.0.90.0040.00515.98
7.0.80.0070.00415.82
7.0.70.0070.00315.91
7.0.60.0070.00615.84
7.0.50.0060.00515.90
7.0.40.0100.00014.77
7.0.30.0020.01114.70
7.0.20.0050.00714.78
7.0.10.0080.00314.80
7.0.00.0080.00414.84
5.6.400.0090.00614.69
5.6.390.0030.01314.42
5.6.380.0030.01014.17
5.6.370.0060.00314.68
5.6.360.0060.00914.18
5.6.350.0060.00914.56
5.6.340.0080.00514.04
5.6.330.0000.01614.44
5.6.320.0030.01014.61
5.6.310.0080.00514.55
5.6.300.0030.04717.74
5.6.290.0060.02417.81
5.6.280.0060.02417.72
5.6.270.0120.02717.74
5.6.260.0050.02317.79
5.6.250.0100.02717.69
5.6.240.0030.03017.60
5.6.230.0080.04417.63
5.6.220.0080.02217.71
5.6.210.0030.02617.76
5.6.200.0030.02717.56
5.6.190.0020.02817.61
5.6.180.0050.02917.63
5.6.170.0070.02317.58
5.6.160.0080.04017.62
5.6.150.0020.03517.59
5.6.140.0030.03117.73
5.6.130.0090.02217.71
5.6.120.0000.03917.59
5.6.110.0140.02417.64
5.6.100.0050.02417.79
5.6.90.0060.02717.80
5.6.80.0050.02017.11
5.6.70.0080.02717.26
5.6.60.0020.03717.33
5.6.50.0120.02017.22
5.6.40.0020.03317.35
5.6.30.0080.02117.38
5.6.20.0000.03017.30
5.6.10.0050.03017.35
5.6.00.0080.03117.53
5.5.380.0030.04617.43
5.5.370.0070.03617.48
5.5.360.0030.04917.45
5.5.350.0030.05317.57
5.5.340.0070.03917.86
5.5.330.0030.04417.95
5.5.320.0070.04918.07
5.5.310.0000.04117.83
5.5.300.0000.06417.95
5.5.290.0000.04718.04
5.5.280.0060.04518.03
5.5.270.0000.04918.04
5.5.260.0040.03917.70
5.5.250.0030.04817.80
5.5.240.0030.03917.44
5.5.230.0000.04117.32
5.5.220.0040.04217.40
5.5.210.0000.04917.22
5.5.200.0200.03317.38
5.5.190.0100.04517.36
5.5.180.0000.04917.46
5.5.160.0030.04017.38
5.5.150.0000.04917.43
5.5.140.0100.03017.46
5.5.130.0070.03317.37
5.5.120.0030.05417.46
5.5.110.0000.04517.30
5.5.100.0000.05216.98
5.5.90.0040.04617.28
5.5.80.0030.03617.36
5.5.70.0070.04216.97
5.5.60.0000.06417.30
5.5.50.0000.03817.30
5.5.40.0030.03717.10
5.5.30.0060.06117.23
5.5.20.0130.04917.25
5.5.10.0000.04117.36
5.5.00.0000.04717.26
5.4.450.0000.04619.16
5.4.440.0160.04919.40
5.4.430.0000.05919.18
5.4.420.0090.04119.46
5.4.410.0030.04019.28
5.4.400.0000.04519.04
5.4.390.0160.04819.08
5.4.380.0130.04318.89
5.4.370.0030.04219.18
5.4.360.0030.04019.10
5.4.350.0030.03719.15
5.4.340.0030.05418.86
5.4.320.0060.04519.07
5.4.310.0030.04018.92
5.4.300.0000.04219.07
5.4.290.0000.04118.90
5.4.280.0000.05018.98
5.4.270.0030.04119.14
5.4.260.0000.04818.92
5.4.250.0030.03919.09
5.4.240.0030.04018.85
5.4.230.0030.05018.86
5.4.220.0100.03318.85
5.4.210.0000.03918.82
5.4.200.0030.03818.88
5.4.190.0030.03519.04
5.4.180.0030.05519.06
5.4.170.0030.03919.05
5.4.160.0030.04318.96
5.4.150.0030.03619.09
5.4.140.0030.03516.35
5.4.130.0030.03716.53
5.4.120.0000.03616.64
5.4.110.0030.03416.64
5.4.100.0000.04116.62
5.4.90.0030.03416.70
5.4.80.0030.03616.68
5.4.70.0070.03316.60
5.4.60.0030.03716.49
5.4.50.0030.03316.48
5.4.40.0100.02916.65
5.4.30.0130.03516.66
5.4.20.0030.05716.44
5.4.10.0030.04816.39
5.4.00.0040.03516.27
5.3.290.0030.03816.27
5.3.280.0070.04016.27
5.3.270.0000.05016.27
5.3.260.0130.04516.27
5.3.250.0030.03516.27
5.3.240.0060.03116.27
5.3.230.0030.03416.27
5.3.220.0000.04216.27
5.3.210.0000.04416.27
5.3.200.0070.04016.27
5.3.190.0000.04416.27
5.3.180.0030.04216.27
5.3.170.0030.04116.27
5.3.160.0030.03716.27
5.3.150.0070.03316.27
5.3.140.0230.03616.27
5.3.130.0000.07516.27
5.3.120.0000.03916.27
5.3.110.0030.03616.27
5.3.100.0030.03816.27
5.3.90.0100.03916.27
5.3.80.0030.03716.27
5.3.70.0030.03616.27
5.3.60.0000.04016.27
5.3.50.0000.03716.27
5.3.40.0030.03916.27
5.3.30.0060.03816.27
5.3.20.0030.04316.27
5.3.10.0000.03716.27
5.3.00.0070.03316.27
5.2.170.0030.02816.27
5.2.160.0030.03016.27
5.2.150.0030.03416.27
5.2.140.0000.04216.27
5.2.130.0000.03216.27
5.2.120.0070.02516.27
5.2.110.0000.03216.27
5.2.100.0030.03416.27
5.2.90.0070.02416.27
5.2.80.0000.03716.27
5.2.70.0000.03016.27
5.2.60.0070.02916.27
5.2.50.0030.07116.27
5.2.40.0030.03316.27
5.2.30.0070.02516.27
5.2.20.0030.02716.27
5.2.10.0070.03016.27
5.2.00.0030.04716.27
5.1.60.0000.02916.27
5.1.50.0000.03216.27
5.1.40.0000.02716.27
5.1.30.0000.03116.27
5.1.20.0000.02916.27
5.1.10.0030.02316.27
5.1.00.0000.03716.27
5.0.50.0070.02116.27
5.0.40.0070.03616.27
5.0.30.0000.04516.27
5.0.20.0030.01916.27
5.0.10.0030.02216.27
5.0.00.0000.03216.27
4.4.90.0030.01316.27
4.4.80.0030.01716.27
4.4.70.0000.02316.27
4.4.60.0030.01316.27
4.4.50.0040.01516.27
4.4.40.0000.03016.27
4.4.30.0030.01316.27
4.4.20.0000.01616.27
4.4.10.0060.03916.27
4.4.00.0070.02716.27
4.3.110.0190.01316.27
4.3.100.0030.01516.27
4.3.90.0000.01816.27
4.3.80.0030.02116.27
4.3.70.0000.02216.27
4.3.60.0000.02216.27
4.3.50.0070.01616.27
4.3.40.0000.03416.27
4.3.30.0070.02416.27
4.3.20.0060.01616.27
4.3.10.0030.01916.27
4.3.00.0000.02216.27

preferences:
40.01 ms | 403 KiB | 5 Q