3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = 'foo'; $t = microtime(); $somequery = "some query '$var'"; echo 'Interpolation: ', microtime() - $t, ' ms', PHP_EOL; $t = microtime(); $somequery = "some query '" . $var . "'"; echo 'Concatenation: ', microtime() - $t, ' ms', PHP_EOL; $t = microtime(); $somequery = sprintf("some query '%s'", $var); echo 'sprintf: ', microtime() - $t, ' ms', PHP_EOL;

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.00.0060.01215.09
7.3.120.0000.01414.59
7.3.110.0070.01014.92
7.3.100.0060.00915.01
7.3.90.0110.00415.00
7.3.80.0060.00914.82
7.3.70.0120.00314.86
7.3.60.0090.00014.66
7.3.50.0040.01114.75
7.3.40.0030.00914.77
7.3.30.0090.00614.78
7.3.20.0080.00416.59
7.3.10.0060.00716.51
7.3.00.0060.00716.65
7.2.250.0030.01315.09
7.2.240.0120.00615.00
7.2.230.0040.01115.13
7.2.220.0030.00614.80
7.2.210.0040.00915.05
7.2.200.0070.00715.08
7.2.190.0000.01514.93
7.2.180.0030.00915.20
7.2.170.0070.01114.85
7.2.130.0080.00816.71
7.2.120.0080.00416.63
7.2.110.0070.00716.67
7.2.100.0110.00616.81
7.2.90.0060.00916.91
7.2.80.0070.01016.86
7.2.70.0060.00616.92
7.2.60.0070.00717.09
7.2.50.0100.00316.85
7.2.40.0070.00716.91
7.2.30.0070.00716.70
7.2.20.0120.00316.69
7.2.10.0100.00616.97
7.2.00.0040.00918.03
7.1.330.0060.01015.56
7.1.320.0030.01015.70
7.1.310.0060.00915.95
7.1.300.0030.00715.92
7.1.290.0070.00715.72
7.1.280.0060.01015.89
7.1.270.0110.00415.81
7.1.260.0080.00015.45
7.1.250.0000.00815.93
7.1.70.0000.00717.28
7.1.60.0070.01719.40
7.1.50.0090.01516.69
7.1.00.0000.08022.53
7.0.200.0070.00016.66
7.0.140.0000.07322.08
7.0.60.0130.08319.98
7.0.50.0070.08017.87
7.0.40.0000.05017.70
7.0.30.0100.08017.72
7.0.20.0100.04717.79
7.0.10.0030.04317.68
7.0.00.0030.08017.68
5.6.280.0000.07320.81
5.6.210.0030.08720.62
5.6.200.0170.06318.19
5.6.190.0030.08718.11
5.6.180.0070.08018.20
5.6.170.0100.08318.18
5.6.160.0100.07018.18
5.6.150.0030.07018.22
5.6.140.0100.03718.10
5.6.130.0100.08318.11
5.6.120.0100.07318.18
5.6.110.0070.07318.11
5.6.100.0030.08718.08
5.6.90.0000.06018.07
5.6.80.0100.07317.60
5.6.70.0030.04317.56
5.6.60.0100.07717.53
5.6.50.0100.06317.60
5.6.40.0070.08017.54
5.6.30.0070.06317.56
5.6.20.0030.07717.55
5.6.10.0130.07317.56
5.6.00.0030.07317.62
5.5.350.0000.09020.41
5.5.340.0070.08018.02
5.5.330.0100.07717.98
5.5.320.0070.08017.95
5.5.310.0070.04718.00
5.5.300.0030.08318.02
5.5.290.0030.05017.97
5.5.280.0130.07317.91
5.5.270.0030.08717.90
5.5.260.0170.07017.86
5.5.250.0000.05717.82
5.5.240.0100.06317.37
5.5.230.0100.06317.28
5.5.220.0230.06317.34
5.5.210.0100.04317.32
5.5.200.0070.07717.27
5.5.190.0100.07317.26
5.5.180.0100.04717.36
5.5.160.0070.05317.33
5.5.150.0030.04717.25
5.5.140.0070.07717.30
5.5.130.0030.04017.29
5.5.120.0100.07317.32
5.5.110.0130.05717.36
5.5.100.0030.08017.15
5.5.90.0100.04717.22
5.5.80.0130.05017.13
5.5.70.0030.05017.16
5.5.60.0130.06717.22
5.5.50.0130.07017.25
5.5.40.0130.07017.26
5.5.30.0130.06717.14
5.5.20.0030.04017.15
5.5.10.0130.06317.15
5.5.00.0070.08017.20
5.4.450.0130.07019.45
5.4.440.0100.06019.35
5.4.430.0030.07719.45
5.4.420.0100.05319.44
5.4.410.0070.07719.20
5.4.400.0030.07718.96
5.4.390.0100.07718.98
5.4.380.0070.05019.09
5.4.370.0170.07019.04
5.4.360.0100.07319.13
5.4.350.0070.07719.03
5.4.340.0170.07319.02
5.4.320.0100.07718.99
5.4.310.0070.08019.15
5.4.300.0130.07018.98
5.4.290.0000.07319.09
5.4.280.0100.07718.95
5.4.270.0100.07719.12
5.4.260.0070.04019.04
5.4.250.0030.05719.00
5.4.240.0070.07718.88
5.4.230.0030.04719.06
5.4.220.0030.08319.10
5.4.210.0030.07719.12
5.4.200.0070.08018.97
5.4.190.0030.05319.06
5.4.180.0130.06719.19
5.4.170.0030.05019.14
5.4.160.0100.07319.10
5.4.150.0070.04019.07
5.4.140.0030.03716.29
5.4.130.0070.03316.46
5.4.120.0070.04716.23
5.4.110.0100.06016.43
5.4.100.0070.03316.36
5.4.90.0100.03016.29
5.4.80.0070.03016.21
5.4.70.0030.03716.23
5.4.60.0030.03316.36
5.4.50.0000.03716.22
5.4.40.0000.03716.25
5.4.30.0030.03316.20
5.4.20.0030.03316.30
5.4.10.0000.04016.22
5.4.00.0030.03315.60
5.3.290.0100.04014.60
5.3.280.0030.04714.68
5.3.270.0130.07014.39
5.3.260.0100.05014.46
5.3.250.0000.08314.54
5.3.240.0030.03714.59
5.3.230.0000.04314.56
5.3.220.0130.05714.52
5.3.210.0070.04714.39
5.3.200.0070.04714.50
5.3.190.0000.04014.38
5.3.180.0000.04014.38
5.3.170.0000.04014.38
5.3.160.0000.03714.39
5.3.150.0000.04014.50
5.3.140.0030.03714.38
5.3.130.0030.03714.50
5.3.120.0130.02714.63
5.3.110.0000.04014.52
5.3.100.0030.03714.11
5.3.90.0070.03013.98
5.3.80.0030.03714.00
5.3.70.0000.04013.79
5.3.60.0030.03713.76
5.3.50.0000.03713.91
5.3.40.0030.03313.80
5.3.30.0030.03313.84
5.3.20.0000.03713.63
5.3.10.0000.03713.56
5.3.00.0030.03313.58
5.2.170.0030.02711.04
5.2.160.0030.03311.15
5.2.150.0030.02710.93
5.2.140.0070.02711.11
5.2.130.0000.03011.01
5.2.120.0000.03011.00
5.2.110.0030.02710.92
5.2.100.0000.03011.07
5.2.90.0030.02711.05
5.2.80.0000.03010.92
5.2.70.0000.03011.08
5.2.60.0030.02711.02
5.2.50.0000.03011.02
5.2.40.0030.02710.97
5.2.30.0030.04710.96
5.2.20.0030.03010.92
5.2.10.0030.05310.70
5.2.00.0000.05710.76
5.1.60.0070.0409.86
5.1.50.0070.05310.08
5.1.40.0000.0609.95
5.1.30.0100.05010.29
5.1.20.0030.04710.26
5.1.10.0030.04310.05
5.1.00.0030.05710.00
5.0.50.0000.0508.52
5.0.40.0130.0378.34
5.0.30.0030.0538.20
5.0.20.0100.0338.25
5.0.10.0030.0278.08
5.0.00.0030.0338.25
4.4.90.0030.0137.32
4.4.80.0000.0137.32
4.4.70.0000.0207.32
4.4.60.0030.0177.32
4.4.50.0030.0137.32
4.4.40.0030.0507.32
4.4.30.0000.0377.32
4.4.20.0030.0277.32
4.4.10.0030.0137.32
4.4.00.0000.0477.32
4.3.110.0070.0337.32
4.3.100.0000.0407.32
4.3.90.0030.0207.32
4.3.80.0000.0477.32
4.3.70.0070.0307.32
4.3.60.0000.0337.32
4.3.50.0000.0177.32
4.3.40.0000.0337.32
4.3.30.0000.0207.32
4.3.20.0000.0177.32
4.3.10.0000.0377.32
4.3.00.0000.0377.32

preferences:
49.06 ms | 401 KiB | 5 Q