3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); for ($i=0; $i<1e4; $i++) { $string = sprintf("%s%s$%s%s", $i, $i, '123', 'Test'); } $end = microtime(true); echo "Took: ", number_format(($end-$start)*1e3, 2), 'ms', PHP_EOL; $a = '123'; $b = 'Test'; $start = microtime(true); for ($i=0; $i<1e4; $i++) { $string = "$i$i$123$a$b"; } $end = microtime(true); echo "Took: ", number_format(($end-$start)*1e3, 2), '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.3.10.0120.00616.61
7.3.00.0040.01516.34
7.2.130.0120.00616.63
7.2.120.0040.01116.96
7.2.110.0040.01816.78
7.2.100.0000.02216.89
7.2.90.0060.01016.93
7.2.80.0000.02016.85
7.2.70.0000.01516.82
7.2.60.0100.01016.57
7.2.50.0090.00916.76
7.2.40.0000.02116.93
7.2.30.0070.01716.54
7.2.20.0000.02216.81
7.2.10.0070.01016.73
7.2.00.0030.01616.63
7.1.250.0070.01715.66
7.1.70.0060.00617.19
7.1.60.0150.01519.11
7.1.50.0100.01316.70
7.1.00.0070.08022.57
7.0.200.0000.01316.79
7.0.140.0030.08022.09
7.0.60.0130.03719.93
7.0.50.0100.06317.79
7.0.40.0030.09019.90
7.0.30.0270.08320.01
7.0.20.0230.08320.09
7.0.10.0100.06720.09
7.0.00.0130.06720.00
5.6.280.0070.08021.12
5.6.210.0070.09320.68
5.6.200.0100.08318.16
5.6.190.0170.08320.41
5.6.180.0000.09720.63
5.6.170.0170.06320.68
5.6.160.0030.06720.55
5.6.150.0130.06018.11
5.6.140.0200.08018.18
5.6.130.0000.04718.15
5.6.120.0070.05021.11
5.6.110.0030.08320.97
5.6.100.0100.09320.98
5.6.90.0100.09021.12
5.6.80.0070.04720.38
5.6.70.3670.04720.37
5.5.350.0100.09720.43
5.5.340.0030.09317.91
5.5.330.0130.08720.07
5.5.320.0300.04320.39
5.5.310.0300.07720.29
5.5.300.0000.09317.95
5.5.290.0070.06018.00
5.5.280.0000.05020.87
5.5.270.0000.05020.75
5.5.260.0100.08720.86
5.5.250.0100.09720.70
5.5.240.0270.04720.15
5.4.450.0100.06719.39
5.4.440.1000.09319.47
5.4.430.0730.06719.42
5.4.420.1000.00019.29
5.4.410.0730.00019.44
5.4.400.0770.00019.09
5.4.390.0770.00019.00
5.4.380.1030.00019.05
5.4.370.0870.00018.93
5.4.360.0730.00019.00
5.4.350.1200.00019.11
5.4.340.0110.05311.97
5.4.320.0070.04412.46
5.4.310.0060.04612.45
5.4.300.0060.04812.46
5.4.290.0080.04712.46
5.4.280.0050.04412.36
5.4.270.0100.04012.35
5.4.260.0070.04412.36
5.4.250.0040.04712.36
5.4.240.0050.04512.36
5.4.230.0090.04712.34
5.4.220.0090.06412.34
5.4.210.0110.04712.35
5.4.200.0050.05212.35
5.4.190.0070.04212.34
5.4.180.0050.05112.34
5.4.170.0070.04212.35
5.4.160.0070.04312.35
5.4.150.0070.04812.34
5.4.140.0060.04612.03
5.4.130.0050.04912.02
5.4.120.0120.05911.97
5.4.110.0110.06111.97
5.4.100.0080.05411.97
5.4.90.0060.04911.97
5.4.80.0120.05211.97
5.4.70.0080.05711.97
5.4.60.0070.04711.96
5.4.50.0060.04311.96
5.4.40.0050.04311.96
5.4.30.0040.05011.95
5.4.20.0050.04511.95
5.4.10.0060.04311.95
5.4.00.0080.04211.45
5.3.290.0130.04512.80
5.3.280.0090.04412.70
5.3.270.0100.05712.72
5.3.260.0060.04912.71
5.3.250.0070.04412.72
5.3.240.0060.04712.72
5.3.230.0050.05012.71
5.3.220.0040.05312.68
5.3.210.0090.06112.68
5.3.200.0110.04112.68
5.3.190.0040.04712.68
5.3.180.0070.04812.68
5.3.170.0080.04412.67
5.3.160.0030.05012.67
5.3.150.0050.04912.67
5.3.140.0070.06412.66
5.3.130.0040.07112.65
5.3.120.0080.05012.66
5.3.110.0070.04712.66
5.3.100.0070.04412.12
5.3.90.0050.04812.09
5.3.80.0030.05512.08
5.3.70.0070.05012.07
5.3.60.0060.04612.07
5.3.50.0060.04512.00
5.3.40.0080.04412.00
5.3.30.0070.05211.95
5.3.20.0090.04211.73
5.3.10.0080.04211.70
5.3.00.0040.04611.68
5.2.170.0070.0479.20
5.2.160.0010.0459.20
5.2.150.0050.0429.20
5.2.140.0040.0429.20
5.2.130.0040.0439.16
5.2.120.0080.0439.16
5.2.110.0050.0429.16
5.2.100.0050.0379.16
5.2.90.0060.0419.16
5.2.80.0030.0449.16
5.2.70.0060.0399.16
5.2.60.0060.0419.11
5.2.50.0040.0429.08
5.2.40.0040.0419.05
5.2.30.0050.0409.03
5.2.20.0060.0479.03
5.2.10.0030.0498.97
5.2.00.0050.0508.83
5.1.60.0080.0418.20
5.1.50.0090.0568.20
5.1.40.0050.0498.18
5.1.30.0040.0438.53
5.1.20.0030.0448.48
5.1.10.0040.0438.20
5.1.00.0050.0498.21
5.0.50.0040.0626.69
5.0.40.0040.0486.55
5.0.30.0050.0596.36
5.0.20.0010.0566.35
5.0.10.0020.0456.32
5.0.00.0040.0526.32
4.4.90.0040.0524.78
4.4.80.0070.0394.75
4.4.70.0000.0534.75
4.4.60.0020.0394.76
4.4.50.0040.0374.77
4.4.40.0040.0464.71
4.4.30.0020.0394.76
4.4.20.0020.0404.85
4.4.10.0030.0444.85
4.4.00.0030.0524.76
4.3.110.0030.0404.67
4.3.100.0040.0374.66
4.3.90.0040.0394.63
4.3.80.0020.0474.63
4.3.70.0000.0394.63
4.3.60.0020.0384.63
4.3.50.0020.0404.63
4.3.40.0010.0504.56
4.3.30.0030.0383.37
4.3.20.0010.0363.34
4.3.10.0010.0403.30
4.3.00.0100.0476.70

preferences:
33.88 ms | 401 KiB | 5 Q