3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = "zcxczczxc\nsdfzzcxzxc\nasfasfa"; //$string = str_replace('<br />', '<br><br>', nl2br($strings)); $string =nl2br(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.00718.05
8.3.50.0130.00621.09
8.3.40.0100.00318.71
8.3.30.0070.00719.10
8.3.20.0070.00020.21
8.3.10.0080.00022.09
8.3.00.0040.00420.56
8.2.180.0080.00816.63
8.2.170.0040.01122.96
8.2.160.0040.01119.04
8.2.150.0080.00024.18
8.2.140.0110.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00419.79
8.2.110.0060.00322.25
8.2.100.0060.00619.28
8.2.90.0000.00918.94
8.2.80.0000.00817.97
8.2.70.0050.00317.49
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0040.00418.09
8.2.30.0040.00418.00
8.2.20.0040.00417.66
8.2.10.0040.00417.73
8.2.00.0070.00417.75
8.1.280.0090.00925.92
8.1.270.0030.00520.26
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0080.00023.84
8.1.230.0060.00619.07
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.13
8.1.190.0030.00517.51
8.1.180.0040.00418.57
8.1.170.0060.00318.53
8.1.160.0030.00522.03
8.1.150.0090.00018.53
8.1.140.0000.00717.38
8.1.130.0000.00717.74
8.1.120.0070.00017.37
8.1.110.0040.00417.36
8.1.100.0000.00817.43
8.1.90.0070.00017.42
8.1.80.0040.00317.43
8.1.70.0070.00017.38
8.1.60.0050.00317.41
8.1.50.0040.00417.37
8.1.40.0000.00817.38
8.1.30.0000.00717.52
8.1.20.0000.00817.56
8.1.10.0060.00317.40
8.1.00.0040.00417.44
8.0.300.0060.00318.77
8.0.290.0050.00317.04
8.0.280.0050.00318.36
8.0.270.0030.00317.13
8.0.260.0080.00016.73
8.0.250.0070.00016.87
8.0.240.0040.00417.00
8.0.230.0030.00316.76
8.0.220.0040.00416.78
8.0.210.0000.00716.81
8.0.200.0000.00616.77
8.0.190.0000.00716.85
8.0.180.0000.00916.74
8.0.170.0050.00316.88
8.0.160.0000.00816.87
8.0.150.0080.00016.68
8.0.140.0000.00716.80
8.0.130.0000.00613.27
8.0.120.0030.00516.68
8.0.110.0050.00216.71
8.0.100.0000.00716.78
8.0.90.0030.00516.74
8.0.80.0060.00916.79
8.0.70.0000.00816.83
8.0.60.0000.00716.79
8.0.50.0030.00316.79
8.0.30.0110.00717.05
8.0.20.0100.01017.40
8.0.10.0000.00716.93
8.0.00.0060.01216.69
7.4.330.0030.00315.00
7.4.320.0000.00616.39
7.4.300.0000.00616.33
7.4.290.0070.00016.46
7.4.280.0090.00016.53
7.4.270.0070.00016.57
7.4.260.0020.00516.56
7.4.250.0040.00416.43
7.4.240.0040.00416.46
7.4.230.0000.00616.33
7.4.220.0070.01116.48
7.4.210.0070.00916.51
7.4.200.0000.00716.61
7.4.190.0030.00316.50
7.4.160.0000.01516.39
7.4.150.0090.01017.40
7.4.140.0080.01117.86
7.4.130.0120.00616.43
7.4.120.0070.01016.36
7.4.110.0100.00616.38
7.4.100.0060.01516.47
7.4.90.0070.01016.29
7.4.80.0170.00019.39
7.4.70.0110.00516.28
7.4.60.0100.00716.52
7.4.50.0000.00416.46
7.4.40.0100.00322.77
7.4.30.0070.00716.29
7.4.00.0060.01014.93
7.3.330.0030.00312.93
7.3.320.0050.00013.05
7.3.310.0040.00416.12
7.3.300.0030.00316.23
7.3.290.0000.01416.16
7.3.280.0050.01316.20
7.3.270.0070.01117.40
7.3.260.0130.00316.19
7.3.250.0100.00716.29
7.3.240.0150.00716.40
7.3.230.0130.00416.39
7.3.210.0060.00916.09
7.3.200.0080.00819.39
7.3.190.0090.00616.31
7.3.180.0060.00916.10
7.3.170.0070.01016.42
7.3.160.0140.00316.52
7.3.120.0070.01014.70
7.3.10.0040.00916.63
7.3.00.0080.00816.80
7.2.330.0100.00716.69
7.2.320.0070.01216.77
7.2.310.0060.01016.67
7.2.300.0170.00716.53
7.2.290.0060.00916.33
7.2.130.0080.00416.78
7.2.120.0070.00716.71
7.2.110.0100.00316.79
7.2.100.0070.00716.95
7.2.90.0070.00616.90
7.2.80.0030.01016.96
7.2.70.0040.00816.62
7.2.60.0030.00916.70
7.2.50.0040.01016.81
7.2.40.0070.00716.98
7.2.30.0000.01316.76
7.2.20.0100.00716.88
7.2.10.0070.00716.95
7.2.00.0060.00316.62
7.1.250.0030.00615.69
7.1.200.0040.01115.65
7.1.100.0100.00718.31
7.1.70.0000.01816.99
7.1.60.0070.01819.82
7.1.50.0030.01616.87
7.1.00.0030.05022.49
7.0.200.0030.00716.46
7.0.140.0030.07322.21
7.0.60.0130.09319.93
7.0.50.0130.07717.83
7.0.40.0030.04319.96
7.0.30.0330.08020.17
7.0.20.0300.08720.21
7.0.10.0270.08720.21
7.0.00.0070.08020.17
5.6.280.0100.06721.10
5.6.210.0130.05320.72
5.6.200.0070.07318.13
5.6.190.0130.07720.46
5.6.180.3300.03320.61
5.6.170.0270.07320.38
5.6.160.0070.03720.70
5.6.150.0030.08318.09
5.6.140.0130.04018.18
5.6.130.0200.07018.11
5.6.120.0070.08321.11
5.6.110.0030.04720.98
5.6.100.0100.07320.97
5.6.90.0100.07721.00
5.6.80.0070.08020.38
5.5.350.0270.04020.51
5.5.340.0030.04718.02
5.5.330.0100.07320.28
5.5.320.0300.05720.28
5.5.310.0270.07720.29
5.5.300.0000.06018.02
5.5.290.0030.04317.92
5.5.280.0070.08020.79
5.5.270.0130.07720.75
5.5.260.0100.08020.86
5.5.250.0070.05020.79
5.5.240.0230.07320.14
5.4.450.0630.06019.64
5.4.440.0630.05719.45
5.4.430.0770.07019.44
5.4.420.0100.06019.57
5.4.410.0730.06019.49
5.4.400.0330.06018.77
5.4.390.0370.07018.54
5.4.380.0270.05318.62
5.4.370.0300.04018.48
5.4.360.0200.05018.61
5.4.350.0100.06311.97
5.4.340.0120.04211.97
5.4.320.0070.03512.46
5.4.310.0070.03912.45
5.4.300.0060.03512.45
5.4.290.0070.04012.45
5.4.280.0060.03912.35
5.4.270.0040.03712.35
5.4.260.0040.03912.34
5.4.250.0170.05318.76
5.4.240.0030.06018.76
5.4.230.0100.04718.73
5.4.220.0070.05318.67
5.4.210.0100.05018.87
5.4.200.0130.05018.67
5.4.190.0200.04018.68
5.4.180.0170.05318.77
5.4.170.0030.06018.95
5.4.160.0170.04318.81
5.4.150.0200.04018.98
5.4.140.0000.05716.50
5.4.130.0030.05016.23
5.4.120.0030.05316.25
5.4.110.0100.05316.41
5.4.100.0070.04716.25
5.4.90.0030.05016.27
5.4.80.0100.04316.42
5.4.70.0070.06016.44
5.4.60.0070.05016.44
5.4.50.0070.04716.45
5.4.40.0000.05716.39
5.4.30.0070.04716.11
5.4.20.0100.04316.33
5.4.10.0000.05716.39
5.4.00.0100.04715.74
5.3.290.0050.04012.80
5.3.280.0030.05314.60
5.3.270.0130.06714.75
5.3.260.0070.05714.75
5.3.250.0230.03714.77
5.3.240.0100.04314.62
5.3.230.0030.07014.59
5.3.220.0200.04314.57
5.3.210.0130.04714.33
5.3.200.0070.04714.45
5.3.190.0100.04714.52
5.3.180.0070.05014.55
5.3.170.0070.05014.39
5.3.160.0070.05014.71
5.3.150.0000.05714.58
5.3.140.0100.04714.42
5.3.130.0170.04314.54
5.3.120.0100.04714.55
5.3.110.0070.05314.41
5.3.100.0100.06014.04
5.3.90.0000.05714.01
5.3.80.0100.04714.16
5.3.70.0070.05313.87
5.3.60.0070.05014.09
5.3.50.0100.04713.89
5.3.40.0070.05013.80
5.3.30.0070.04713.77
5.3.20.0170.03713.68
5.3.10.0100.04313.43
5.3.00.0130.04313.69
5.2.170.0100.04011.29
5.2.160.0030.04311.17
5.2.150.0070.04011.16
5.2.140.0070.04011.13
5.2.130.0030.06010.98
5.2.120.0030.04011.10
5.2.110.0100.05011.00
5.2.100.0030.04011.10
5.2.90.0000.04311.04
5.2.80.0100.04010.84
5.2.70.0030.06311.10
5.2.60.0030.04310.96
5.2.50.0070.03711.03
5.2.40.0100.03311.00
5.2.30.0030.04011.08
5.2.20.0030.04711.06
5.2.10.0070.03710.77
5.2.00.0100.03310.88
5.1.60.0070.03010.05
5.1.50.0000.0439.90
5.1.40.0000.0479.88
5.1.30.0070.03310.23
5.1.20.0070.03310.56
5.1.10.0030.03310.09
5.1.00.0000.0379.96
5.0.50.0000.0339.43
5.0.40.0070.0239.43
5.0.30.0030.0409.43
5.0.20.0070.0209.43
5.0.10.0030.0309.43
5.0.00.0000.0479.43
4.4.90.0000.0239.43
4.4.80.0030.0209.43
4.4.70.0000.0239.43
4.4.60.0000.0239.43
4.4.50.0000.0239.43
4.4.40.0030.0339.43
4.4.30.0030.0239.43
4.4.20.0030.0209.43
4.4.10.0070.0179.43
4.4.00.0030.0309.43
4.3.110.0000.0239.43
4.3.100.0000.0239.43
4.3.90.0070.0179.43
4.3.80.0000.0379.43
4.3.70.0030.0209.43
4.3.60.0030.0209.43
4.3.50.0030.0209.43
4.3.40.0130.0209.43
4.3.30.0000.0239.43
4.3.20.0000.0339.43
4.3.10.0030.0209.43
4.3.00.0130.0207.59

preferences:
42.22 ms | 401 KiB | 5 Q