3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut congue, turpis fermentum tempus ultricies, tellus purus vulputate ipsum, eu tempus metus ipsum vel felis. Mauris feugiat nibh at sollicitudin ultrices. Vestibulum suscipit libero a nulla vehicula lobortis. Vestibulum sit amet risus adipiscing, pharetra nulla id, ullamcorper lorem. Fusce facilisis consequat turpis. Fusce posuere, dui vel condimentum varius, turpis risus ullamcorper tortor, ac laoreet mi dui at urna. Aenean vitae lacus mauris. Proin aliquam sem pulvinar velit lacinia ultricies. Mauris scelerisque sem libero, at semper ante convallis quis. Mauris in mi quis tortor malesuada consectetur. Donec a purus vehicula, vehicula risus sed, vestibulum nibh. Nam ornare metus ut rhoncus rhoncus. Integer cursus, est a condimentum sollicitudin, ipsum quam tincidunt quam, quis lobortis risus augue nec odio. Vivamus vel est eget augue lacinia pulvinar.'; $words = explode(' ', $lorem); for ($i = 0; $i < 10; $i++) { $words = array_merge($words, $words); } shuffle($words); $startTime = microtime(true); $str = join("\n\r", $words); echo 'Join '.count($words).' words: '.(microtime(true) - $startTime).PHP_EOL; $str = ''; $startTime = microtime(true); foreach ($words as $value) { $str .= $value . "\n\r"; } echo 'Concat '.count($words).' words: '.(microtime(true) - $startTime).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.10.0100.04322.21
7.4.00.0160.04022.12
7.3.130.0130.04822.37
7.3.120.0110.04622.53
7.3.110.0100.05222.56
7.3.100.0100.03122.59
7.3.90.0170.02022.33
7.3.80.0080.02522.30
7.3.70.0120.02822.45
7.3.60.0070.03022.48
7.3.50.0110.02322.49
7.3.40.0130.02522.34
7.3.30.0160.02622.49
7.3.20.0050.03028.64
7.3.10.0110.02628.62
7.3.00.0080.03028.61
7.2.260.0120.04922.03
7.2.250.0130.04622.30
7.2.240.0130.02322.15
7.2.230.0070.03122.23
7.2.220.0170.02722.32
7.2.210.0080.03022.09
7.2.200.0100.03122.26
7.2.190.0070.03222.22
7.2.180.0100.02922.20
7.2.170.0080.03022.19
7.2.160.0100.03022.18
7.2.150.0050.02928.62
7.2.140.0100.02928.78
7.2.130.0080.03028.87
7.2.120.0050.03328.69
7.2.110.0050.02628.63
7.2.100.0090.02628.60
7.2.90.0070.03228.74
7.2.80.0060.03628.79
7.2.70.0080.03128.94
7.2.60.0030.03028.74
7.2.50.0070.03128.87
7.2.40.0070.02628.78
7.2.30.0080.03028.89
7.2.20.0090.02828.88
7.2.10.0040.03228.93
7.2.00.0050.03129.56
7.1.330.0080.03429.57
7.1.320.0110.03229.97
7.1.310.0120.02929.94
7.1.300.0050.03129.80
7.1.290.0140.02429.89
7.1.280.0050.03529.80
7.1.270.0100.02929.78
7.1.260.0050.04029.83
7.1.250.0050.04129.58
7.1.240.0100.03129.73
7.1.230.0050.03429.63
7.1.220.0080.03029.80
7.1.210.0080.02829.71
7.1.200.0070.03829.69
7.1.190.0110.02929.66
7.1.180.0070.03229.79
7.1.170.0100.03529.87
7.1.160.0130.02829.80
7.1.150.0000.04029.71
7.1.140.0080.03429.89
7.1.130.0070.03329.78
7.1.120.0100.02929.72
7.1.110.0110.03329.60
7.1.100.0050.03629.76
7.1.90.0080.03529.80
7.1.80.0080.03229.66
7.1.70.0060.03130.20
7.1.60.0090.03930.33
7.1.50.0100.03630.04
7.1.40.0060.03429.63
7.1.30.0150.02629.75
7.1.20.0160.03029.86
7.1.10.0100.03229.59
7.1.00.0040.04331.79
7.0.330.0080.04431.56
7.0.320.0050.03731.40
7.0.310.0070.03431.43
7.0.300.0070.03531.46
7.0.290.0090.03431.48
7.0.280.0030.04131.45
7.0.270.0100.03231.46
7.0.260.0030.03831.38
7.0.250.0100.03031.54
7.0.240.0080.03231.40
7.0.230.0030.03631.53
7.0.220.0070.03431.45
7.0.210.0080.03331.35
7.0.200.0400.03130.04
7.0.190.0070.03531.42
7.0.180.0080.03031.50
7.0.170.0030.04031.50
7.0.160.0020.03831.48
7.0.150.0060.03731.56
7.0.140.0060.05433.72
7.0.130.0130.03131.43
7.0.120.0060.05233.61
7.0.110.0030.03731.54
7.0.100.0140.02731.31
7.0.90.0080.03331.33
7.0.80.0070.03731.22
7.0.70.0100.02731.38
7.0.60.0090.05831.54
7.0.50.0090.05430.83
7.0.40.0110.03728.27
7.0.30.0260.05828.25
7.0.20.0240.05828.33
7.0.10.0130.03428.37
7.0.00.0060.06128.21
5.6.400.0200.11835.04
5.6.390.0170.12735.25
5.6.380.0230.10935.19
5.6.370.0070.12335.12
5.6.360.0200.12035.12
5.6.350.0150.12335.35
5.6.340.0100.11935.15
5.6.330.0150.12435.38
5.6.320.0120.12635.43
5.6.310.0210.11735.01
5.6.300.0210.11435.30
5.6.290.0150.12135.14
5.6.280.0140.13537.42
5.6.270.0170.11935.21
5.6.260.0150.13335.10
5.6.250.0150.13835.13
5.6.240.0150.15034.96
5.6.230.0100.12935.14
5.6.220.0130.12935.17
5.6.210.0100.12537.35
5.6.200.0160.13136.53
5.6.190.0170.13037.15
5.6.180.1180.13137.40
5.6.170.0260.13337.09
5.6.160.0130.11437.10
5.6.150.0140.13636.33
5.6.140.0170.13636.41
5.6.130.0180.13536.24
5.6.120.0120.15037.61
5.6.110.0130.13137.53
5.6.100.0190.12837.48
5.6.90.0170.14137.42
5.6.80.0130.14337.20
5.6.70.1080.10337.24
5.6.60.0130.12735.17
5.6.50.0100.13535.25
5.6.40.0200.11435.04
5.6.30.0100.14335.07
5.6.20.0200.12735.04
5.6.10.0130.12235.09
5.6.00.0110.13135.17
5.5.380.0100.17234.97
5.5.370.0200.14235.06
5.5.360.0130.13735.13
5.5.350.0190.14036.98
5.5.340.0200.13836.31
5.5.330.0130.13937.14
5.5.320.1260.14336.97
5.5.310.0240.14036.89
5.5.300.0130.13836.41
5.5.290.0120.14236.32
5.5.280.0180.16237.21
5.5.270.0200.14437.26
5.5.260.0140.14737.26
5.5.250.0230.14637.17
5.5.240.0260.13437.03
5.5.230.0070.14835.16
5.5.220.0100.14434.97
5.5.210.0100.14435.04
5.5.200.0150.12835.14
5.5.190.0200.14434.90
5.5.180.0200.14335.07
5.5.170.0120.12935.16
5.5.160.0100.14735.12
5.5.150.0160.14435.07
5.5.140.0130.13534.88
5.5.130.0150.13234.97
5.5.120.0150.12735.23
5.5.110.0170.13035.04
5.5.100.0130.14134.98
5.5.90.0200.14035.14
5.5.80.0120.13334.98
5.5.70.0120.13334.83
5.5.60.0100.14535.06
5.5.50.0280.17448.70
5.5.40.0200.17148.49
5.5.30.0230.17848.44
5.5.20.0200.16148.66
5.5.10.0230.15848.84
5.5.00.0230.15948.70
5.4.450.0270.16248.15
5.4.440.0200.15348.31
5.4.430.0180.16248.05
5.4.420.0170.15748.39
5.4.410.0160.16848.30
5.4.400.0180.15748.06
5.4.390.0130.17348.06
5.4.380.0230.15948.11
5.4.370.0180.15848.09
5.4.360.0200.17248.07
5.4.350.0190.17447.95
5.4.340.0160.15348.02
5.4.330.0170.15945.55
5.4.320.0170.16248.17
5.4.310.0240.16648.08
5.4.300.0230.16647.98
5.4.290.0260.15948.02
5.4.280.0120.16447.97
5.4.270.0190.17148.06
5.4.260.0200.17548.17
5.4.250.0250.15148.11
5.4.240.0230.16447.91
5.4.230.0160.15748.00
5.4.220.0200.18248.06
5.4.210.0220.16948.06
5.4.200.0230.17148.08
5.4.190.0230.17748.05
5.4.180.0230.16647.66
5.4.170.0280.16048.10
5.4.160.0240.15548.07
5.4.150.0160.17448.13
5.4.140.0270.16347.12
5.4.130.0120.17447.12
5.4.120.0180.16447.27
5.4.110.0180.14747.11
5.4.100.0220.17847.11
5.4.90.0080.16447.22
5.4.80.0170.15247.09
5.4.70.0110.16947.23
5.4.60.0210.16347.26
5.4.50.0220.15147.08
5.4.40.0180.16147.31
5.4.30.0280.15847.25
5.4.20.0190.15147.21
5.4.10.0180.16347.15
5.4.00.0280.15647.02
5.3.290.0300.18048.89
5.3.280.0170.14347.97
5.3.270.0200.20748.86
5.3.260.0370.17748.81
5.3.250.0200.15748.84
5.3.240.0270.17748.91
5.3.230.0170.14748.90
5.3.220.0230.15348.65
5.3.210.0100.19748.78
5.3.200.0200.19748.75
5.3.190.0170.14348.79
5.3.180.0170.17048.79
5.3.170.0200.14048.79
5.3.160.0230.19348.79
5.3.150.0170.19348.78
5.3.140.0070.20048.64
5.3.130.0230.20348.78
5.3.120.0170.21348.86
5.3.110.0200.16748.77
5.3.100.0070.21748.24
5.3.90.0300.15048.31
5.3.80.0100.20748.11
5.3.70.0200.19048.17
5.3.60.0170.15348.18
5.3.50.0230.19348.06
5.3.40.0270.19348.01
5.3.30.0170.18748.04
5.3.20.0200.18747.75
5.3.10.0300.18047.89
5.3.00.0170.12734.47
5.2.170.0170.21044.68
5.2.160.0170.15044.71
5.2.150.0230.14044.70
5.2.140.0170.13344.70
5.2.130.0230.18344.65
5.2.120.0500.15744.80
5.2.110.0170.18744.62
5.2.100.0200.20344.71
5.2.90.0130.19344.79
5.2.80.0100.15044.63
5.2.70.0200.19344.71
5.2.60.0200.16744.58
5.2.50.0100.22744.97
5.2.40.0500.16745.10
5.2.30.0130.19344.90
5.2.20.0100.21044.98
5.2.10.0430.15744.64
5.2.00.0170.16744.83
5.1.60.0330.20750.85
5.1.50.0130.22350.85
5.1.40.0300.19350.76
5.1.30.0400.21050.99
5.1.20.0170.19051.15
5.1.10.0330.20350.81
5.1.00.0300.22050.93
5.0.50.0100.26049.41
5.0.40.0170.21349.16
5.0.30.0170.24048.98
5.0.20.0170.24049.05
5.0.10.0200.22048.87
5.0.00.0100.22049.00
4.4.90.0100.21354.87
4.4.80.0600.21054.87
4.4.70.0270.25054.90
4.4.60.0270.19354.91
4.4.50.0200.23054.98
4.4.40.0230.23754.99
4.4.30.0270.25354.95
4.4.20.0200.21054.97
4.4.10.0230.21754.98
4.4.00.0130.26054.91
4.3.110.0270.25054.82
4.3.100.0300.22754.85
4.3.90.0330.21754.83
4.3.80.0300.26754.88
4.3.70.0270.25754.81
4.3.60.0270.25754.81
4.3.50.0200.27354.82
4.3.40.0570.23054.80
4.3.30.0100.21753.61
4.3.20.0130.21053.52
4.3.10.0130.18345.41
4.3.00.0000.19745.32

preferences:
42.48 ms | 403 KiB | 5 Q