3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); $i = 0; $time0 = microtime(1); while($i++ < 100000) echo'this is a test','this is a test','this is a test','this is a test','this is a test','this is a test'; $time1 = microtime(1); ob_end_clean(); echo round($c=($time1-$time0)*1000, 3), " milliseconds for commas without vars\n"; ob_start(); $i = 0; $time0 = microtime(1); while($i++ < 100000) echo'this is a test'.'this is a test'.'this is a test'.'this is a test'.'this is a test'.'this is a test'; $time1 = microtime(1); ob_end_clean(); echo round($d=($time1-$time0)*1000, 3), " milliseconds for dots without vars\n"; echo 'Difference: ', round(($d - $c) * 100 / $d, 1), "%\n"; ob_start(); $i = 0; $time0 = microtime(1); while($i++ < 100000) echo'this is a test',$i,'this is a test',$i,'this is a test',$i; $time1 = microtime(1); ob_end_clean(); echo round($c=($time1-$time0)*1000, 3), " milliseconds for commas with vars\n"; ob_start(); $i = 0; $time0 = microtime(1); while($i++ < 100000) echo'this is a test'.$i.'this is a test'.$i.'this is a test'.$i; $time1 = microtime(1); ob_end_clean(); echo round($d=($time1-$time0)*1000, 3), " milliseconds for dots with vars\n"; echo 'Difference: ', round(($d - $c) * 100 / $d, 1), "%\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.0370.14830.05
7.4.00.0370.15729.94
7.3.130.0400.10030.18
7.3.120.0600.13730.30
7.3.110.0560.14030.12
7.3.100.0130.11430.14
7.3.90.0270.13930.09
7.3.80.0360.11930.25
7.3.70.0230.10430.22
7.3.60.0270.12329.74
7.3.50.0200.13930.15
7.3.40.0270.12030.07
7.3.30.0300.10829.98
7.3.20.0100.10530.41
7.3.10.0130.13030.51
7.3.00.0170.10130.51
7.2.260.0430.14030.36
7.2.250.0460.15629.93
7.2.240.0440.12130.41
7.2.230.0270.12730.11
7.2.220.0440.15130.36
7.2.210.0440.11430.34
7.2.200.0400.09330.06
7.2.190.0370.11730.44
7.2.180.0330.09930.50
7.2.170.0370.12030.47
7.2.160.0230.12230.54
7.2.150.0130.11430.80
7.2.140.0200.15430.57
7.2.130.0240.09731.05
7.2.120.0130.10630.84
7.2.110.0190.11430.72
7.2.100.0070.13730.95
7.2.90.0170.10430.98
7.2.80.0130.11930.95
7.2.70.0070.11230.82
7.2.60.0130.11930.91
7.2.50.0130.13031.01
7.2.40.0230.09630.57
7.2.30.0170.11830.68
7.2.20.0200.13030.84
7.2.10.0170.10630.95
7.2.00.0120.09632.20
7.1.330.0200.10829.98
7.1.320.0170.17029.77
7.1.310.0100.13529.44
7.1.300.0170.11329.57
7.1.290.0170.12429.51
7.1.280.0130.11129.43
7.1.270.0230.12029.95
7.1.260.0120.15929.84
7.1.250.0130.12929.77
7.1.240.0100.11829.67
7.1.230.0130.14929.54
7.1.220.0170.11529.71
7.1.210.0100.11829.69
7.1.200.0170.11229.93
7.1.190.0170.15429.59
7.1.180.0170.11329.86
7.1.170.0100.11829.84
7.1.160.0070.14629.88
7.1.150.0170.10829.67
7.1.140.0130.11029.90
7.1.130.0200.11229.67
7.1.120.0130.11829.91
7.1.110.0100.11829.86
7.1.100.0130.12229.74
7.1.90.0160.11229.57
7.1.80.0100.13029.88
7.1.70.0120.08830.22
7.1.60.0170.09330.33
7.1.50.0170.08730.31
7.1.40.0100.13729.81
7.1.30.0130.11629.79
7.1.20.0100.13029.68
7.1.10.0130.10929.88
7.1.00.0300.13233.17
7.0.330.0130.11229.41
7.0.320.0230.12629.52
7.0.310.0130.16029.41
7.0.300.0070.12129.28
7.0.290.0130.13729.32
7.0.280.0300.13229.15
7.0.270.0070.11729.27
7.0.260.0270.12629.21
7.0.250.0130.13029.59
7.0.240.0240.10129.53
7.0.230.0030.13129.49
7.0.220.0150.11629.33
7.0.210.0130.15829.58
7.0.200.0200.09030.18
7.0.190.0160.12129.49
7.0.180.0100.11829.29
7.0.170.0170.10629.61
7.0.160.0230.10229.43
7.0.150.0160.12229.47
7.0.140.0120.14132.75
7.0.130.0070.11729.28
7.0.120.0100.11829.52
7.0.110.0070.12829.43
7.0.100.2000.12632.39
7.0.90.1700.13432.43
7.0.80.0630.11632.38
7.0.70.0750.15232.49
7.0.60.0700.13332.43
7.0.50.0650.11532.61
7.0.40.0320.12028.67
7.0.30.0520.11528.72
7.0.20.0970.14828.75
7.0.10.1000.12928.76
7.0.00.0970.14028.65
5.6.400.0100.21922.43
5.6.390.0100.18222.57
5.6.380.0100.20122.25
5.6.370.0070.23221.94
5.6.360.0130.20522.51
5.6.350.0100.19122.57
5.6.340.0170.21222.00
5.6.330.0130.19622.37
5.6.320.0230.16822.47
5.6.310.0130.20222.40
5.6.300.0160.18122.32
5.6.290.0000.19922.37
5.6.280.0100.20625.85
5.6.270.0170.21822.73
5.6.260.0130.17522.57
5.6.250.0050.19925.51
5.6.240.0070.19925.43
5.6.230.0100.19225.41
5.6.220.0120.19625.54
5.6.210.0130.16225.49
5.6.200.0100.17725.84
5.6.190.0100.16925.55
5.6.180.0120.15925.78
5.6.170.0200.14525.54
5.6.160.0300.20591.36
5.6.150.0180.19425.76
5.6.140.0070.18025.67
5.6.130.0130.18725.77
5.6.120.0130.20125.76
5.6.110.0100.19925.88
5.6.100.0180.18125.57
5.6.90.0200.20325.68
5.6.80.0150.19225.21
5.6.70.0220.18525.40
5.6.60.0070.20625.25
5.6.50.0130.23325.28
5.6.40.0130.18725.17
5.6.30.0120.18125.38
5.6.20.0130.19125.33
5.6.10.0080.21225.24
5.6.00.0170.16725.34
5.5.380.0120.20425.31
5.5.370.0100.15725.34
5.5.360.0080.19025.34
5.5.350.0150.15025.51
5.5.340.0170.17825.66
5.5.330.0050.17225.41
5.5.320.0120.17325.58
5.5.310.0130.19125.63
5.5.300.0150.18025.58
5.5.290.0120.18525.72
5.5.280.0170.19625.45
5.5.270.0150.19725.52
5.5.260.0080.18225.69
5.5.250.0130.17725.49
5.5.240.0180.18925.29
5.5.230.0130.18925.32
5.5.220.0120.20025.25
5.5.210.0130.21825.18
5.5.200.0080.20225.28
5.5.190.0100.22325.15
5.5.180.0070.22325.24
5.5.170.0070.20322.11
5.5.160.0170.18825.23
5.5.150.0120.19025.33
5.5.140.0150.19025.08
5.5.130.0070.22625.18
5.5.120.0170.20725.17
5.5.110.0050.21225.24
5.5.100.0100.20425.17
5.5.90.0120.21325.14
5.5.80.0100.18525.19
5.5.70.0180.19225.10
5.5.60.0150.18325.24
5.5.50.0130.19825.21
5.5.40.0170.15925.03
5.5.30.0120.20025.19
5.5.20.0120.18325.18
5.5.10.0170.19725.10
5.5.00.0200.21125.04
5.4.450.0180.18223.18
5.4.440.0130.18523.08
5.4.430.0170.18523.36
5.4.420.0080.18423.16
5.4.410.0370.19488.59
5.4.400.0070.19723.02
5.4.390.0120.19723.00
5.4.380.0100.21223.07
5.4.370.0180.17122.89
5.4.360.0120.18722.97
5.4.350.0070.21123.10
5.4.340.0030.20823.09
5.4.330.0100.18519.04
5.4.320.0150.18623.09
5.4.310.0120.17523.13
5.4.300.0080.19323.10
5.4.290.0120.19622.98
5.4.280.0150.19323.02
5.4.270.0170.19523.02
5.4.260.0150.19523.11
5.4.250.0050.21522.87
5.4.240.0130.19522.97
5.4.230.0030.20222.86
5.4.220.0100.17022.99
5.4.210.0030.16223.04
5.4.200.0050.18322.96
5.4.190.0120.16323.13
5.4.180.0120.19022.85
5.4.170.0080.17323.03
5.4.160.0070.18322.75
5.4.150.0120.19422.96
5.4.140.0070.19721.56
5.4.130.0350.19587.52
5.4.120.0170.19121.43
5.4.110.0000.20821.69
5.4.100.0080.21521.63
5.4.90.0070.20521.55
5.4.80.0130.17421.58
5.4.70.0080.20221.64
5.4.60.0120.17021.75
5.4.50.0120.16121.49
5.4.40.0100.20221.78
5.4.30.0070.19521.70
5.4.20.0120.20421.61
5.4.10.0080.18721.60
5.4.00.0170.18421.21
5.3.290.0150.16720.79
5.3.280.0080.19220.73
5.3.270.0130.16420.76
5.3.260.0130.18420.72
5.3.250.0200.14820.82
5.3.240.0070.15920.71
5.3.230.0250.17186.24
5.3.220.0100.19120.63
5.3.210.0080.14720.49
5.3.200.0150.18720.65
5.3.190.0100.18120.64
5.3.180.0100.17520.67
5.3.170.0100.17720.55
5.3.160.0170.15520.55
5.3.150.0150.14820.60
5.3.140.0100.17020.63
5.3.130.0120.17320.69
5.3.120.0070.17920.64
5.3.110.0170.16920.68
5.3.100.0130.16720.34
5.3.90.0120.14520.39
5.3.80.0080.17720.18
5.3.70.0030.15820.31
5.3.60.0070.18020.28
5.3.50.0100.19120.28
5.3.40.0100.17720.33
5.3.30.0170.15920.35
5.3.20.0050.17020.09
5.3.10.0100.17220.01
5.3.00.0280.17585.64
5.2.170.0100.19319.45
5.2.160.0070.15319.29
5.2.150.0130.15719.40
5.2.140.0330.09719.48
5.2.130.0100.17019.45
5.2.120.0030.18719.37
5.2.110.0100.16019.46
5.2.100.0170.18719.54
5.2.90.0100.17019.41
5.2.80.0230.17319.38
5.2.70.0130.16719.46
5.2.60.0030.19019.18
5.2.50.0000.18019.45
5.2.40.0130.17719.42
5.2.30.0130.16719.30
5.2.20.0070.19719.27
5.2.10.0030.19719.14
5.2.00.0130.20718.97
5.1.60.0900.297252.84
5.1.50.0130.23017.85
5.1.40.0200.19017.98
5.1.30.0070.22318.29
5.1.20.0170.17318.32
5.1.10.0100.19317.95
5.1.00.0070.21017.95
5.0.50.0100.25016.36
5.0.40.0130.26016.33
5.0.30.0200.24716.18
5.0.20.0170.24316.21
5.0.10.0100.21016.22
5.0.00.0070.27016.14
4.4.90.0170.23713.93
4.4.80.0200.23713.90
4.4.70.0070.24713.84
4.4.60.0130.24013.91
4.4.50.0100.26313.93
4.4.40.0100.31313.93
4.4.30.0070.29013.91
4.4.20.0170.26013.91
4.4.10.0030.27713.94
4.4.00.0200.27713.90
4.3.110.0200.19013.82
4.3.100.0030.22713.76
4.3.90.0100.24713.72
4.3.80.0070.20313.84
4.3.70.0100.24713.79
4.3.60.0130.21713.71
4.3.50.0100.23313.76
4.3.40.0400.16313.72
4.3.30.0170.17712.55
4.3.20.0270.18012.43
4.3.10.0170.18312.67
4.3.00.0000.19312.63

preferences:
38.23 ms | 400 KiB | 5 Q