3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = "zcxczczxc\nsdfzzcxzxc\nasfasfa"; $string = str_replace('<br />', '<br><br>', nl2br($strings)); echo $string;

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)
8.3.60.0110.00416.63
8.3.50.0150.00616.39
8.3.40.0000.01518.59
8.3.30.0070.00718.32
8.3.20.0120.00618.56
8.3.10.0040.00420.59
8.3.00.0040.00419.25
8.2.180.0110.00416.38
8.2.170.0070.01022.96
8.2.160.0100.00321.11
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00020.88
8.2.110.0030.00620.47
8.2.100.0080.00417.91
8.2.90.0000.00918.00
8.2.80.0040.00419.26
8.2.70.0000.00817.50
8.2.60.0110.00017.80
8.2.50.0000.00818.07
8.2.40.0000.00818.03
8.2.30.0100.00018.06
8.2.20.0050.00317.67
8.2.10.0000.00717.78
8.2.00.0030.00517.79
8.1.280.0140.00025.92
8.1.270.0050.00324.66
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0080.00022.25
8.1.230.0070.00320.95
8.1.220.0060.00317.74
8.1.210.0030.00618.89
8.1.200.0030.00617.22
8.1.190.0040.00417.39
8.1.180.0040.00418.10
8.1.170.0040.00418.71
8.1.160.0030.00518.73
8.1.150.0040.00418.57
8.1.140.0050.00217.42
8.1.130.0070.00017.73
8.1.120.0030.00317.45
8.1.110.0030.00617.37
8.1.100.0080.00017.31
8.1.90.0050.00217.38
8.1.80.0040.00417.35
8.1.70.0000.00717.35
8.1.60.0000.00717.51
8.1.50.0050.00317.29
8.1.40.0030.00517.44
8.1.30.0000.00817.52
8.1.20.0040.00417.47
8.1.10.0000.00817.57
8.1.00.0000.00717.44
8.0.300.0040.00420.21
8.0.290.0040.00416.63
8.0.280.0030.00318.49
8.0.270.0030.00317.26
8.0.260.0000.01016.75
8.0.250.0050.00317.01
8.0.240.0030.00716.92
8.0.230.0000.00716.88
8.0.220.0030.00316.86
8.0.210.0020.00516.80
8.0.200.0000.00816.85
8.0.190.0070.00016.76
8.0.180.0000.00716.80
8.0.170.0060.00316.74
8.0.160.0040.00416.82
8.0.150.0040.00416.78
8.0.140.0040.00416.82
8.0.130.0000.00513.27
8.0.120.0040.00416.75
8.0.110.0040.00416.78
8.0.100.0040.00416.63
8.0.90.0040.00416.79
8.0.80.0090.00616.73
8.0.70.0000.00716.70
8.0.60.0040.00416.69
8.0.50.0040.00416.80
8.0.30.0130.00916.96
8.0.20.0110.00817.14
8.0.10.0040.00416.81
8.0.00.0060.01216.79
7.4.330.0000.00512.93
7.4.320.0030.00316.42
7.4.300.0060.00016.45
7.4.290.0070.00016.53
7.4.280.0030.00516.50
7.4.270.0030.00316.34
7.4.260.0030.00313.19
7.4.250.0090.00016.52
7.4.240.0020.00516.48
7.4.230.0020.00516.54
7.4.220.0040.01116.51
7.4.210.0050.01016.47
7.4.200.0000.00716.41
7.4.190.0000.00716.32
7.4.160.0130.00316.49
7.4.150.0160.01016.40
7.4.140.0130.00716.47
7.4.130.0130.00616.48
7.4.120.0130.00316.28
7.4.110.0070.01016.30
7.4.100.0090.00916.41
7.4.90.0130.00516.43
7.4.80.0070.01019.39
7.4.70.0000.02216.41
7.4.60.0060.00916.43
7.4.50.0000.01316.46
7.4.40.0000.01816.26
7.4.30.0030.01316.28
7.4.00.0070.01115.05
7.3.330.0030.00312.96
7.3.320.0060.00012.93
7.3.310.0040.00416.05
7.3.300.0070.00016.15
7.3.290.0040.01116.14
7.3.280.0060.01116.13
7.3.270.0070.01016.45
7.3.260.0070.01816.46
7.3.250.0120.00716.27
7.3.240.0100.00716.50
7.3.230.0100.00716.19
7.3.210.0170.00016.22
7.3.200.0110.01116.32
7.3.190.0060.01316.28
7.3.180.0160.00016.14
7.3.170.0150.00616.35
7.3.160.0060.01016.18
7.3.120.0030.00915.01
7.2.330.0120.00816.30
7.2.320.0100.01316.70
7.2.310.0100.01316.49
7.2.300.0060.01216.31
7.2.290.0030.01416.63
7.2.60.0090.00616.70
7.2.00.0030.00919.23
7.1.200.0100.00315.69
7.1.100.0070.00418.04
7.1.70.0040.00717.03
7.1.60.0100.01419.40
7.1.50.0080.01116.85
7.1.00.0030.07022.33
7.0.200.0000.00716.49
7.0.140.0100.07021.93
7.0.120.0000.08022.04
7.0.60.0130.05019.79
7.0.50.0030.06717.80
7.0.40.0030.05017.79
7.0.30.0170.07317.76
7.0.20.0030.07717.69
7.0.10.0070.08017.68
7.0.00.0000.04717.69
5.6.210.0100.07720.71
5.6.200.0130.07718.08
5.6.190.0070.05718.21
5.6.180.0130.07318.22
5.6.170.0030.05718.21
5.6.160.0130.07718.14
5.6.150.0070.07318.21
5.6.140.0130.04018.18
5.6.130.0100.07718.19
5.6.120.0070.04318.17
5.6.110.0070.05318.17
5.6.100.0170.04018.20
5.6.90.0130.05018.18
5.6.80.0070.07717.53
5.6.70.0070.04317.56
5.6.60.0070.07717.48
5.6.50.0030.06317.50
5.6.40.0070.05317.50
5.6.30.0030.08317.57
5.6.20.0070.07717.57
5.6.10.0070.07717.48
5.6.00.0070.07717.42
5.5.350.0300.04720.45
5.5.340.0100.07318.02
5.5.330.0070.08317.98
5.5.320.0030.06018.02
5.5.310.0030.08018.02
5.5.300.0100.07717.95
5.5.290.0000.08318.02
5.5.280.0030.04317.88
5.5.270.0170.05718.00
5.5.260.0070.07317.99
5.5.250.0030.05017.83
5.5.240.0030.05317.40
5.5.230.0070.07717.39
5.5.220.0070.05017.32
5.5.210.0100.06717.29
5.5.200.0000.05017.30
5.5.190.0030.08717.30
5.5.180.0000.06317.36
5.5.160.0070.06717.30
5.5.150.0100.05017.37
5.5.140.0030.08017.33
5.5.130.0070.07717.26
5.5.120.0100.07317.35
5.5.110.0030.06717.33
5.5.100.0070.07317.28
5.5.90.0070.04717.23
5.5.80.0030.04717.23
5.5.70.0000.05317.18
5.5.60.0070.03717.18
5.5.50.0030.08317.27
5.5.40.0030.06317.24
5.5.30.0030.05317.25
5.5.20.0070.07717.15
5.5.10.0030.05017.18
5.5.00.0000.05317.23
5.4.450.0070.04319.32
5.4.440.0100.06319.53
5.4.430.0070.05019.14
5.4.420.0200.05019.30
5.4.410.0070.05019.23
5.4.400.0070.06318.95
5.4.390.0030.06718.83
5.4.380.0070.07319.09
5.4.370.0030.07018.96
5.4.360.0070.07718.97
5.4.350.0170.07018.89
5.4.340.0070.07319.20
5.4.320.0000.07318.99
5.4.310.0130.04019.01
5.4.300.0100.03019.03
5.4.290.0070.04018.94
5.4.280.0100.05318.98
5.4.270.0030.07719.00
5.4.260.0070.04718.93
5.4.250.0000.04719.02
5.4.240.0070.03719.08
5.4.230.0100.03018.94
5.4.220.0030.08018.98
5.4.210.0030.07318.97
5.4.200.0100.07019.00
5.4.190.0100.05018.81
5.4.180.0100.04318.97
5.4.170.0030.07719.00
5.4.160.0000.08319.01
5.4.150.0030.05719.01
5.4.140.0130.07016.32
5.4.130.0270.05016.17
5.4.120.0030.08016.28
5.4.110.0070.06316.26
5.4.100.0030.05016.32
5.4.90.0000.05016.38
5.4.80.0030.05016.18
5.4.70.0170.06016.24
5.4.60.0070.06716.21
5.4.50.0070.07016.49
5.4.40.0030.07316.21
5.4.30.0070.06716.31
5.4.20.0030.03716.24
5.4.10.0030.03716.32
5.4.00.0070.07015.77
5.3.290.0070.06314.63
5.3.280.0070.07314.57
5.3.270.0070.03714.52
5.3.260.0070.03714.52
5.3.250.0070.07314.56
5.3.240.0070.07714.55
5.3.230.0100.07314.54
5.3.220.0100.05014.48
5.3.210.0100.07714.50
5.3.200.0070.06014.54
5.3.190.0030.04714.53
5.3.180.0100.07014.50
5.3.170.0100.06714.50
5.3.160.0070.05714.64
5.3.150.0170.06714.52
5.3.140.0100.05014.52
5.3.130.0000.08014.51
5.3.120.0030.04714.52
5.3.110.0030.04014.51
5.3.100.0070.05013.98
5.3.90.0030.03713.98
5.3.80.0030.03713.93
5.3.70.0130.07013.77
5.3.60.0100.06013.77
5.3.50.0030.04713.88
5.3.40.0100.06713.91
5.3.30.0070.07313.98
5.3.20.0030.06013.46
5.3.10.0100.03713.62
5.3.00.0030.03713.55
5.2.170.0070.06310.96
5.2.160.0030.05011.09
5.2.150.0030.07310.96
5.2.140.0030.06310.97
5.2.130.0000.04311.02
5.2.120.0000.03711.09
5.2.110.0070.02711.07
5.2.100.0000.04011.07
5.2.90.0070.05310.92
5.2.80.0070.06011.04
5.2.70.0030.04711.07
5.2.60.0100.04011.04
5.2.50.0030.05710.96
5.2.40.0070.04010.81
5.2.30.0100.05710.99
5.2.20.0000.06710.94
5.2.10.0030.03710.81
5.2.00.0000.03310.77
5.1.60.0000.03010.13
5.1.50.0000.0279.95
5.1.40.0030.05310.01
5.1.30.0030.04310.46
5.1.20.0070.02710.38
5.1.10.0100.02310.00
5.1.00.0070.05710.02
5.0.50.0030.0508.52
5.0.40.0030.0438.52
5.0.30.0100.0508.52
5.0.20.0030.0408.52
5.0.10.0000.0508.52
5.0.00.0000.0478.52
4.4.90.0030.0338.52
4.4.80.0070.0338.52
4.4.70.0000.0378.52
4.4.60.0000.0308.52
4.4.50.0030.0278.52
4.4.40.0000.0308.52
4.4.30.0000.0238.52
4.4.20.0000.0178.52
4.4.10.0030.0308.52
4.4.00.0030.0578.52
4.3.110.0100.0278.52
4.3.100.0030.0208.52
4.3.90.0070.0238.52
4.3.80.0030.0538.52
4.3.70.0000.0408.52
4.3.60.0100.0238.52
4.3.50.0030.0238.52
4.3.40.0100.0438.52
4.3.30.0000.0378.52
4.3.20.0030.0278.52
4.3.10.0000.0278.52
4.3.00.0100.0278.52

preferences:
47.92 ms | 401 KiB | 5 Q