3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterations = 500000; $name = 'Tom'; $date = '13/09/2009'; $t1 = microtime(true); for ($i = 0; $i < $iterations; $i++) { $str = sprintf('Hi %s, you last logged in on %s.', $name, $date); } $t2 = microtime(true); echo 'sprintf: ' . ($t2-$t1); echo '<br />'; $t1 = microtime(true); for ($i = 0; $i < $iterations; $i++) { $str = 'Hi ' . $name . ', you last logged in on ' . $date; } $t2 = microtime(true); echo 'concat: ' . ($t2-$t1); echo '<br />';

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.19615.00
7.4.00.0100.22015.02
7.3.130.0130.21914.93
7.3.120.0050.16514.80
7.3.110.0050.19115.01
7.3.100.0050.18414.90
7.3.90.0030.16214.91
7.3.80.0070.17814.92
7.3.70.0070.16614.80
7.3.60.0070.16914.78
7.3.50.0050.17114.80
7.3.40.0080.15814.74
7.3.30.0030.18114.83
7.3.20.0070.15616.66
7.3.10.0030.15916.57
7.3.00.0100.15416.65
7.2.260.0030.18715.14
7.2.250.0030.24115.34
7.2.240.0030.18415.07
7.2.230.0070.19515.03
7.2.220.0080.17015.06
7.2.210.0050.16515.04
7.2.200.0050.16515.18
7.2.190.0030.17515.03
7.2.180.0100.15915.02
7.2.170.0030.18715.00
7.2.160.0050.18014.97
7.2.150.0050.16416.82
7.2.140.0080.17617.03
7.2.130.0070.18116.69
7.2.120.0030.18716.74
7.2.110.0180.15916.92
7.2.100.0020.17416.90
7.2.90.0030.18716.77
7.2.80.0020.18116.94
7.2.70.0030.18817.04
7.2.60.0070.20016.80
7.2.50.0050.18416.79
7.2.40.0020.16216.95
7.2.30.0070.19516.88
7.2.20.0050.16417.01
7.2.10.0020.16817.00
7.2.00.0070.17117.83
7.1.330.0050.22915.82
7.1.320.0080.22715.69
7.1.310.0050.23715.82
7.1.300.0030.21715.79
7.1.290.0020.24315.71
7.1.280.0070.25415.86
7.1.270.0070.24615.71
7.1.260.0080.23515.76
7.1.250.0120.22015.84
7.1.240.0070.23015.61
7.1.230.0030.22715.89
7.1.220.0000.26715.93
7.1.210.0000.23715.94
7.1.200.0030.22215.77
7.1.190.0030.21615.79
7.1.180.0030.29316.03
7.1.170.0070.23115.95
7.1.160.0030.26615.93
7.1.150.0000.23915.66
7.1.140.0030.21315.63
7.1.130.0070.22716.01
7.1.120.0070.22815.71
7.1.110.0130.21115.86
7.1.100.0030.23315.52
7.1.90.0030.28915.78
7.1.80.0030.22315.59
7.1.70.0100.17516.56
7.1.60.0030.17417.44
7.1.50.0030.17216.37
7.1.40.0030.21615.81
7.1.30.0000.21915.53
7.1.20.0000.24915.61
7.1.10.0000.27815.76
7.1.00.0030.22019.09
7.0.330.0070.27315.48
7.0.320.0070.21915.22
7.0.310.0070.22515.37
7.0.300.0100.25115.61
7.0.290.0070.27015.42
7.0.280.0030.27515.55
7.0.270.0130.22615.35
7.0.260.0070.25315.24
7.0.250.0000.21815.50
7.0.240.0000.28715.50
7.0.230.0030.26515.40
7.0.220.0030.28715.53
7.0.210.0070.24815.57
7.0.200.0020.20316.06
7.0.190.0070.22815.15
7.0.180.0030.23515.50
7.0.170.0100.24215.54
7.0.160.0000.22315.39
7.0.150.0100.23415.46
7.0.140.0020.23218.75
7.0.130.0000.22115.55
7.0.120.0000.26415.60
7.0.110.0070.22115.51
7.0.100.0030.21217.68
7.0.90.0080.22117.81
7.0.80.0070.18317.63
7.0.70.0100.19117.65
7.0.60.0070.20317.68
7.0.50.0080.22318.03
7.0.40.0070.23316.80
7.0.30.0050.21516.85
7.0.20.0120.20716.90
7.0.10.0050.22216.79
7.0.00.0070.22216.71
5.6.400.0070.33114.27
5.6.390.0000.41014.32
5.6.380.0030.36314.44
5.6.370.0000.36314.32
5.6.360.0000.34014.52
5.6.350.0030.34814.36
5.6.340.0070.35614.34
5.6.330.0030.37014.57
5.6.320.0000.41514.29
5.6.310.0070.40314.22
5.6.300.0030.48114.59
5.6.290.0030.47314.32
5.6.280.0020.33317.47
5.6.270.0030.50214.64
5.6.260.0070.47914.20
5.6.250.0080.32017.60
5.6.240.0150.34817.49
5.6.230.0020.29717.40
5.6.220.0070.32617.49
5.6.210.0030.29017.52
5.6.200.0020.33817.76
5.6.190.0050.32817.68
5.6.180.0050.33917.64
5.6.170.0050.32317.51
5.6.160.0050.28517.48
5.6.150.0070.36117.57
5.6.140.0080.32317.75
5.6.130.0050.34017.83
5.6.120.0050.34817.66
5.6.110.0070.34317.80
5.6.100.0030.31817.75
5.6.90.0030.37017.70
5.6.80.0030.28317.31
5.6.70.0000.29217.40
5.6.60.0050.32717.46
5.6.50.0070.30217.33
5.6.40.0050.29117.23
5.6.30.0020.35817.24
5.6.20.0070.33817.34
5.6.10.0030.34417.36
5.6.00.0070.30617.29
5.5.380.0070.37117.39
5.5.370.0070.30917.33
5.5.360.0070.32217.34
5.5.350.0100.35317.26
5.5.340.0100.30917.35
5.5.330.0070.35417.65
5.5.320.0100.30417.69
5.5.310.0080.33017.52
5.5.300.0080.31017.50
5.5.290.0070.31617.73
5.5.280.0070.36317.58
5.5.270.0130.31417.53
5.5.260.0070.34017.46
5.5.250.0050.30817.40
5.5.240.0030.32417.11
5.5.230.0030.35317.02
5.5.220.0030.37817.20
5.5.210.0050.31517.29
5.5.200.0050.31217.28
5.5.190.0070.33917.20
5.5.180.0080.34317.30
5.5.170.0030.36314.36
5.5.160.0070.34017.22
5.5.150.0050.28417.20
5.5.140.0100.35117.26
5.5.130.0120.34417.35
5.5.120.0080.30817.38
5.5.110.0100.35317.14
5.5.100.0070.35017.29
5.5.90.0100.33617.21
5.5.80.0050.29817.19
5.5.70.0030.33317.08
5.5.60.0080.37717.25
5.5.50.0100.31017.16
5.5.40.0050.29717.26
5.5.30.0070.31117.10
5.5.20.0050.34817.23
5.5.10.0000.31417.11
5.5.00.0050.35816.96
5.4.450.0050.36215.00
5.4.440.0070.33215.24
5.4.430.0050.34114.99
5.4.420.0100.32215.24
5.4.410.0100.35715.12
5.4.400.0050.30015.02
5.4.390.0030.38115.10
5.4.380.0100.35514.89
5.4.370.0050.30815.11
5.4.360.0030.34115.17
5.4.350.0050.32015.04
5.4.340.0150.29415.01
5.4.330.0030.34610.96
5.4.320.0050.34215.08
5.4.310.0130.32814.95
5.4.300.0080.35014.91
5.4.290.0050.31615.12
5.4.280.0020.31515.04
5.4.270.0050.31314.69
5.4.260.0070.38615.12
5.4.250.0030.34914.83
5.4.240.0100.37415.05
5.4.230.0070.37814.92
5.4.220.0030.39214.96
5.4.210.0030.38815.07
5.4.200.0030.32915.01
5.4.190.0030.28314.82
5.4.180.0020.35414.69
5.4.170.0050.33314.90
5.4.160.0030.35314.86
5.4.150.0080.34215.03
5.4.140.0020.35813.65
5.4.130.0050.34313.63
5.4.120.0030.38713.69
5.4.110.0080.34413.63
5.4.100.0080.32313.71
5.4.90.0070.31513.59
5.4.80.0020.29713.64
5.4.70.0030.34313.63
5.4.60.0030.27313.73
5.4.50.0020.30713.65
5.4.40.0050.35713.66
5.4.30.0050.32013.61
5.4.20.0030.31013.65
5.4.10.0000.28513.54
5.4.00.0070.28113.48
5.3.290.0070.29314.52
5.3.280.0070.33014.45
5.3.270.0130.31714.57
5.3.260.0170.35014.46
5.3.250.0000.32314.57
5.3.240.0070.34314.57
5.3.230.0130.32714.58
5.3.220.0070.33314.41
5.3.210.0070.31014.55
5.3.200.0070.33014.57
5.3.190.0100.31314.57
5.3.180.0070.27314.52
5.3.170.0030.25314.52
5.3.160.0030.28714.57
5.3.150.0000.27314.56
5.3.140.0000.27714.54
5.3.130.0000.27014.51
5.3.120.0030.27014.55
5.3.110.0030.27714.51
5.3.100.0030.29314.03
5.3.90.0030.34014.01
5.3.80.0030.27313.98
5.3.70.0100.29313.77
5.3.60.0030.26713.95
5.3.50.0030.34013.86
5.3.40.0070.31013.81
5.3.30.0000.31313.91
5.3.20.0030.27313.60
5.3.10.0130.32713.64
5.3.00.0000.31013.64
5.2.170.0100.34011.14
5.2.160.0070.31711.16
5.2.150.0070.34010.99
5.2.140.0000.31311.18
5.2.130.0000.33711.14
5.2.120.0100.32311.05
5.2.110.0030.30011.14
5.2.100.0070.35011.06
5.2.90.0030.35711.17
5.2.80.0130.32311.16
5.2.70.0000.35711.14
5.2.60.0000.35010.89
5.2.50.0030.32711.09
5.2.40.0130.34010.97
5.2.30.0030.33710.96
5.2.20.0070.33711.01
5.2.10.0000.31010.77
5.2.00.0100.31310.57
5.1.60.0030.34310.24
5.1.50.0370.29310.24
5.1.40.0100.35710.24
5.1.30.0000.34010.39
5.1.20.0030.37310.41
5.1.10.0030.32010.24
5.1.00.0070.32010.24
5.0.50.0000.56710.24
5.0.40.0070.58010.24
5.0.30.0000.57010.24
5.0.20.0030.55710.24
5.0.10.0030.57010.24
5.0.00.0070.55310.24
4.4.90.0000.59310.24
4.4.80.0070.60010.24
4.4.70.0070.57310.24
4.4.60.0070.58710.24
4.4.50.0000.60010.24
4.4.40.0000.60010.24
4.4.30.0030.62310.24
4.4.20.0070.62710.24
4.4.10.0030.62310.24
4.4.00.0000.63310.24
4.3.110.0000.63710.24
4.3.100.0000.60710.24
4.3.90.0030.58310.24
4.3.80.0030.60710.24
4.3.70.0030.57710.24
4.3.60.0000.59710.24
4.3.50.0000.59310.24
4.3.40.0000.57310.24
4.3.30.0000.57310.24
4.3.20.0030.54010.24
4.3.10.0000.53310.24
4.3.00.0000.55010.24

preferences:
34.04 ms | 401 KiB | 5 Q