3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = nl2br("foo\nbar"); // nl2br doesn't remove the \n $str = str_replace("\n", "", $str); echo nl2br($str); ?>

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.0080.00818.55
8.3.50.0060.01621.92
8.3.40.0040.01118.56
8.3.30.0140.00020.21
8.3.20.0000.00918.75
8.3.10.0080.00020.92
8.3.00.0080.00019.69
8.2.180.0070.01116.32
8.2.170.0070.00722.96
8.2.160.0030.01020.38
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0060.00326.16
8.2.120.0000.00919.66
8.2.110.0090.00022.08
8.2.100.0000.01117.72
8.2.90.0000.00817.91
8.2.80.0000.00817.97
8.2.70.0050.00317.50
8.2.60.0060.00317.93
8.2.50.0000.01118.07
8.2.40.0040.00418.09
8.2.30.0000.00721.27
8.2.20.0080.00017.64
8.2.10.0000.00817.53
8.2.00.0120.00017.61
8.1.280.0040.01125.92
8.1.270.0020.00523.99
8.1.260.0140.00026.35
8.1.250.0000.00828.09
8.1.240.0050.00522.22
8.1.230.0080.00320.91
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0130.00017.00
8.1.190.0080.00017.40
8.1.180.0050.00218.10
8.1.170.0030.00618.55
8.1.160.0040.00418.76
8.1.150.0040.00418.47
8.1.140.0080.00017.38
8.1.130.0070.00017.71
8.1.120.0030.00617.29
8.1.110.0080.00017.43
8.1.100.0070.00017.31
8.1.90.0040.00417.43
8.1.80.0000.00717.26
8.1.70.0000.00717.34
8.1.60.0030.00617.52
8.1.50.0000.00817.39
8.1.40.0040.00417.34
8.1.30.0080.00017.50
8.1.20.0000.00817.45
8.1.10.0040.00417.51
8.1.00.0050.00517.45
8.0.300.0000.00720.07
8.0.290.0000.00717.15
8.0.280.0000.00718.37
8.0.270.0000.00717.20
8.0.260.0030.00316.77
8.0.250.0050.00216.84
8.0.240.0040.00416.91
8.0.230.0000.00716.93
8.0.220.0030.00316.82
8.0.210.0070.00016.79
8.0.200.0040.00416.76
8.0.190.0070.00016.85
8.0.180.0030.00516.69
8.0.170.0040.00416.80
8.0.160.0000.00716.71
8.0.150.0050.00216.79
8.0.140.0030.00516.78
8.0.130.0070.00013.22
8.0.120.0040.00416.81
8.0.110.0080.00016.83
8.0.100.0000.00716.85
8.0.90.0000.00716.63
8.0.80.0120.00416.79
8.0.70.0000.00816.77
8.0.60.0040.00416.61
8.0.50.0050.00316.70
8.0.30.0110.01116.92
8.0.20.0110.00717.40
8.0.10.0040.00416.79
8.0.00.0110.00816.47
7.4.330.0060.00016.79
7.4.320.0030.00316.52
7.4.300.0030.00616.43
7.4.290.0070.00016.38
7.4.280.0030.00516.43
7.4.270.0030.00616.38
7.4.260.0030.00313.15
7.4.250.0070.00016.38
7.4.240.0050.00316.56
7.4.230.0040.00416.61
7.4.220.0070.01016.43
7.4.210.0070.00816.39
7.4.200.0000.00716.41
7.4.190.0050.00216.61
7.4.160.0070.01016.44
7.4.150.0110.00617.40
7.4.140.0090.00717.86
7.4.130.0090.00916.33
7.4.120.0080.01116.37
7.4.110.0070.01116.57
7.4.100.0040.01716.52
7.4.90.0070.01516.26
7.4.80.0060.01519.39
7.4.70.0090.00616.28
7.4.60.0070.01016.40
7.4.50.0030.00516.43
7.4.40.0070.00722.77
7.4.30.0110.00616.41
7.4.00.0100.00314.92
7.3.330.0050.00013.03
7.3.320.0000.00512.87
7.3.310.0030.00316.18
7.3.300.0000.00616.18
7.3.290.0110.00416.12
7.3.280.0070.00916.11
7.3.270.0110.00817.40
7.3.260.0110.00818.24
7.3.250.0110.00916.16
7.3.240.0140.00716.16
7.3.230.0160.00016.39
7.3.210.0080.00816.52
7.3.200.0120.00919.39
7.3.190.0110.00716.22
7.3.180.0090.00616.14
7.3.170.0130.00316.27
7.3.160.0040.01116.39
7.3.120.0100.00314.82
7.3.00.0030.01216.27
7.2.330.0030.01416.68
7.2.320.0030.01316.18
7.2.310.0090.00916.72
7.2.300.0040.01316.38
7.2.290.0120.00316.31
7.2.130.0070.00716.54
7.2.120.0080.00416.36
7.2.110.0040.01116.45
7.2.100.0360.01015.30
7.2.90.0070.00915.34
7.2.80.0090.00615.63
7.2.70.0170.00515.17
7.2.60.0100.00715.49
7.2.50.0220.01115.49
7.2.40.1510.01015.75
7.2.30.0110.00515.90
7.2.20.0500.00615.78
7.2.10.0160.00815.63
7.2.00.0920.00916.99
7.1.250.0070.00715.41
7.1.240.0100.01015.82
7.1.230.0180.00615.69
7.1.220.0200.00714.53
7.1.210.0600.00614.70
7.1.200.0540.00514.51
7.1.190.0560.01414.74
7.1.180.0520.00414.43
7.1.170.0120.01014.51
7.1.160.0710.00814.70
7.1.150.0270.00814.74
7.1.140.0860.00614.65
7.1.130.0140.00514.68
7.1.120.0970.00714.71
7.1.110.1160.00814.42
7.1.100.1000.01015.75
7.1.90.1290.00614.56
7.1.80.0800.01014.51
7.1.70.0530.00815.24
7.1.60.0740.00921.49
7.1.50.0650.01421.03
7.1.40.2050.00823.39
7.1.30.0690.00923.47
7.1.20.0940.00523.48
7.1.10.0690.00314.54
7.1.00.0380.02517.19
7.0.330.0030.01015.03
7.0.320.0120.00915.20
7.0.310.0150.00614.39
7.0.300.1850.00514.13
7.0.290.0340.00814.39
7.0.280.0880.01114.33
7.0.270.1850.00414.34
7.0.260.1100.00914.37
7.0.250.1420.01114.40
7.0.240.1360.00314.28
7.0.230.1050.01314.35
7.0.220.0880.00914.23
7.0.210.1110.00814.32
7.0.200.0250.00415.12
7.0.190.0690.00714.49
7.0.180.0840.00914.37
7.0.170.0590.00714.39
7.0.160.0640.00814.34
7.0.150.0500.00614.45
7.0.140.0370.03116.88
7.0.130.0560.00814.33
7.0.120.0450.00814.18
7.0.110.0550.01114.32
7.0.100.0530.03116.24
7.0.90.0440.03016.17
7.0.80.0350.02116.21
7.0.70.0450.03316.12
7.0.60.0380.02416.30
7.0.50.0320.03516.41
7.0.40.0360.03016.33
7.0.30.0300.03216.34
7.0.20.0250.03416.35
7.0.10.0310.03016.35
7.0.00.0370.02516.31
5.6.380.0090.00514.09
5.6.370.0120.00714.03
5.6.360.0200.00214.17
5.6.350.0100.01114.12
5.6.340.0170.00714.10
5.6.330.0120.01014.05
5.6.320.0100.01114.26
5.6.310.0130.00914.07
5.6.300.0180.00514.31
5.6.290.0080.01314.21
5.6.280.0060.03516.52
5.6.270.0190.00314.40
5.6.260.0100.01014.30
5.6.250.0090.02716.21
5.6.240.0120.03016.39
5.6.230.0110.02016.37
5.6.220.0100.03516.26
5.6.210.0130.02816.29
5.6.200.0080.03816.38
5.6.190.0120.02616.44
5.6.180.0180.03016.37
5.6.170.0110.03416.48
5.6.160.0130.02516.51
5.6.150.0160.02316.48
5.6.140.0120.01816.64
5.6.130.0110.02016.47
5.6.120.0130.01616.41
5.6.110.0130.01816.38
5.6.100.0090.01816.35
5.6.90.0140.01616.53
5.6.80.0120.01616.07
5.6.70.0080.02716.22
5.6.60.0100.03016.11
5.6.50.0110.02016.31
5.6.40.0110.01616.20
5.6.30.0100.01916.19
5.6.20.0070.02116.19
5.6.10.0110.01516.22
5.6.00.0100.01916.15
5.5.380.0070.02614.21
5.5.370.0090.03214.19
5.5.360.0120.02614.19
5.5.350.0080.03014.21
5.5.340.0070.03314.29
5.5.330.0090.03314.24
5.5.320.0050.03514.31
5.5.310.0080.02014.31
5.5.300.0090.02114.26
5.5.290.0100.01714.27
5.5.280.0050.02214.33
5.5.270.0060.01914.35
5.5.260.0080.01814.30
5.5.250.0110.01414.15
5.5.240.0070.01814.10
5.5.230.0110.01414.01
5.5.220.0110.02114.04
5.5.210.0120.01214.05
5.5.200.0070.01514.03
5.5.190.0060.01914.08
5.5.180.0070.01814.10
5.5.170.0110.00614.08
5.5.160.0070.01614.08
5.5.150.0070.01714.08
5.5.140.0060.02514.08
5.5.130.0080.01614.07
5.5.120.0090.01614.06
5.5.110.0070.01714.11
5.5.100.0110.01314.02
5.5.90.0060.01814.04
5.5.80.0080.01814.04
5.5.70.0080.01614.02
5.5.60.0060.02014.02
5.5.50.0080.01414.00
5.5.40.0070.01814.03
5.5.30.0090.02614.08
5.5.20.0120.01114.01
5.5.10.0050.02014.02
5.5.00.0070.01814.02
5.4.450.0080.01713.86
5.4.440.0080.01613.80
5.4.430.0070.01713.85
5.4.420.0100.01513.83
5.4.410.0060.01613.77
5.4.400.0070.01513.67
5.4.390.0060.02813.66
5.4.380.0120.02313.71
5.4.370.0130.02613.59
5.4.360.0070.02013.68
5.4.350.0090.01313.68
5.4.340.0120.01613.72
5.4.330.0060.00711.00
5.4.320.0080.01913.70
5.4.310.0090.01513.69
5.4.300.0070.01713.63
5.4.290.0060.01613.63
5.4.280.0040.01913.65
5.4.270.0070.01513.65
5.4.260.0080.02513.70
5.4.250.0060.02013.65
5.4.240.0070.01913.71
5.4.230.0080.01713.68
5.4.220.0110.01913.67
5.4.210.0040.01713.71
5.4.200.0070.01513.67
5.4.190.0070.01413.59
5.4.180.0030.01813.66
5.4.170.0080.01913.71
5.4.160.0070.01713.65
5.4.150.0100.01413.72
5.4.140.0080.01512.77
5.4.130.0040.01812.81
5.4.120.0060.01912.71
5.4.110.0100.01312.79
5.4.100.0070.01612.81
5.4.90.0090.01912.75
5.4.80.0100.02612.78
5.4.70.0050.02912.80
5.4.60.0070.02412.76
5.4.50.0090.02712.82
5.4.40.0110.01912.75
5.4.30.0060.01712.81
5.4.20.0080.02412.78
5.4.10.0060.03112.81
5.4.00.0070.02912.61
5.3.290.0090.01512.17
5.3.280.0080.01512.19
5.3.270.0110.01212.20
5.3.260.0040.01612.16
5.3.250.0050.01512.19
5.3.240.0080.01412.15
5.3.230.0100.01412.19
5.3.220.0060.01612.13
5.3.210.0080.01512.17
5.3.200.0070.01512.16
5.3.190.0080.02912.14
5.3.180.0120.01512.17
5.3.170.0100.02312.19
5.3.160.0080.03012.14
5.3.150.0080.01812.14
5.3.140.0070.02712.15
5.3.130.0080.02812.16
5.3.120.0100.01412.18
5.3.110.0060.03312.19
5.3.100.0090.01711.95
5.3.90.0070.02311.98
5.3.80.0100.01611.99
5.3.70.0070.02912.00
5.3.60.0090.02112.00
5.3.50.0110.01611.96
5.3.40.0080.02911.97
5.3.30.0090.02711.89
5.3.20.0060.02911.88
5.3.10.0090.02311.88
5.3.00.0080.02411.87

preferences:
44.25 ms | 401 KiB | 5 Q