3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = '<p>my text 1</p> some other content <p>some other paragraph followed by an html line break</p><br> etc...'; $text = nl2br($text); $regex= '#<\/p>(<br\s?\/?>)#'; $text = preg_replace($regex, '</p>', $text); echo $text;

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.5.00.0100.01120.02
8.4.150.0030.00014.05
8.4.140.0150.00717.63
8.4.130.0120.00918.14
8.4.120.0110.00920.49
8.4.110.0040.00622.65
8.4.100.0110.00917.85
8.4.90.0080.00322.29
8.4.80.0130.00619.78
8.4.70.0080.01318.24
8.4.60.0120.00818.70
8.4.50.0060.00520.56
8.4.40.0060.00317.99
8.4.30.0030.00717.64
8.4.20.0130.00919.67
8.4.10.0060.00317.69
8.3.280.0110.00918.53
8.3.270.0150.00616.56
8.3.260.0130.00716.50
8.3.250.0110.00818.81
8.3.240.0100.00916.78
8.3.230.0090.00816.49
8.3.220.0080.00919.10
8.3.210.0080.01018.50
8.3.200.0110.00416.72
8.3.190.0080.00117.10
8.3.180.0090.00516.64
8.3.170.0090.00916.98
8.3.160.0030.01118.57
8.3.150.0120.00617.23
8.3.140.0030.01317.04
8.3.130.0030.00718.41
8.3.120.0090.00020.75
8.3.110.0030.00618.29
8.3.100.0040.00416.59
8.3.90.0110.00726.77
8.3.80.0090.00016.88
8.3.70.0190.00316.58
8.3.60.0110.01118.30
8.3.50.0040.00918.30
8.3.40.0120.00618.88
8.3.30.0120.00318.72
8.3.20.0040.00421.85
8.3.10.0060.00321.86
8.3.00.0100.01023.68
8.2.290.0030.00420.29
8.2.280.0130.00718.54
8.2.270.0130.00617.11
8.2.260.0040.00418.32
8.2.250.0050.00318.45
8.2.240.0090.00617.17
8.2.230.0090.00020.94
8.2.220.0060.00324.06
8.2.210.0120.00826.77
8.2.200.0070.00418.42
8.2.190.0070.01416.58
8.2.180.0120.00325.92
8.2.170.0090.00918.95
8.2.160.0030.01020.52
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0040.00421.25
8.2.120.0040.00426.35
8.2.110.0100.00020.56
8.2.100.0130.00018.03
8.2.90.0040.00417.88
8.2.80.0000.00819.02
8.2.70.0000.01018.04
8.2.60.0030.00518.22
8.2.50.0030.00518.10
8.2.40.0040.00419.34
8.2.30.0000.00719.13
8.2.20.0060.00318.13
8.2.10.0000.00818.10
8.2.00.0050.00219.19
8.1.330.0090.01023.86
8.1.320.0120.00616.34
8.1.310.0030.01418.19
8.1.300.0090.00618.44
8.1.290.0090.00330.84
8.1.280.0160.00325.92
8.1.270.0080.00022.07
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0060.00622.00
8.1.230.0090.00323.85
8.1.220.0040.00417.77
8.1.210.0050.00318.77
8.1.200.0000.01017.35
8.1.190.0050.00317.23
8.1.180.0030.00718.10
8.1.170.0080.00018.61
8.1.160.0040.00419.06
8.1.150.0000.00818.99
8.1.140.0040.00419.37
8.1.130.0030.00318.93
8.1.120.0000.00717.45
8.1.110.0030.00617.41
8.1.100.0030.00517.42
8.1.90.0060.00317.54
8.1.80.0050.00317.42
8.1.70.0080.00317.49
8.1.60.0030.00917.64
8.1.50.0080.00017.59
8.1.40.0040.00417.45
8.1.30.0050.00317.71
8.1.20.0070.00017.63
8.1.10.0040.00417.58
8.1.00.0030.00617.66
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0070.00018.44
8.0.270.0030.00317.18
8.0.260.0000.00617.19
8.0.250.0060.00017.08
8.0.240.0070.00017.00
8.0.230.0070.00017.02
8.0.220.0000.00716.86
8.0.210.0000.00716.83
8.0.200.0000.00717.00
8.0.190.0030.00517.03
8.0.180.0040.00416.87
8.0.170.0060.00316.84
8.0.160.0060.00316.96
8.0.150.0060.00316.96
8.0.140.0030.00316.90
8.0.130.0000.00613.39
8.0.120.0000.00916.94
8.0.110.0070.00016.88
8.0.100.0030.00516.93
8.0.90.0000.00716.86
8.0.80.0130.00216.99
8.0.70.0050.00216.98
8.0.60.0040.00416.90
8.0.50.0000.00716.77
8.0.30.0090.00817.11
8.0.20.0150.00417.40
8.0.10.0040.00417.14
8.0.00.0100.00816.75
7.4.330.0000.00516.81
7.4.320.0030.00316.74
7.4.300.0070.00016.78
7.4.290.0000.00816.70
7.4.280.0000.00716.52
7.4.270.0030.00916.64
7.4.260.0050.00316.63
7.4.250.0040.00316.70
7.4.240.0000.00816.73
7.4.230.0030.00316.77
7.4.220.0040.00416.84
7.4.210.0100.00516.73
7.4.200.0000.00716.64
7.4.160.0050.01116.65
7.4.140.0090.00917.86
7.4.130.0090.00916.70
7.4.120.0090.00916.62
7.4.110.0110.00616.54
7.4.100.0100.00716.76
7.4.90.0040.01316.84
7.4.80.0130.00719.39
7.4.70.0130.00616.55
7.4.60.0080.00816.70
7.4.50.0080.00816.49
7.4.40.0090.00616.49
7.4.10.0120.00614.93
7.4.00.0080.00915.05
7.3.330.0000.00513.16
7.3.320.0000.00613.15
7.3.310.0030.00316.13
7.3.300.0000.00616.33
7.3.290.0070.00016.38
7.3.280.0050.01216.36
7.3.260.0070.01116.48
7.3.240.0100.00816.36
7.3.230.0120.00916.29
7.3.210.0070.01016.29
7.3.200.0190.00316.31
7.3.190.0070.01016.48
7.3.180.0070.01516.45
7.3.170.0120.00916.42
7.3.160.0080.00816.45
7.3.130.0080.00815.11
7.3.120.0100.00614.72
7.3.110.0030.01314.95
7.3.100.0030.01015.21
7.3.90.0140.00415.20
7.3.80.0070.00714.86
7.3.70.0030.01214.87
7.3.60.0070.00714.73
7.3.50.0030.01114.95
7.3.40.0060.00914.91
7.3.30.0100.00014.93
7.3.20.0030.01316.81
7.3.10.0030.00616.66
7.3.00.0110.00016.91
7.2.330.0060.01116.68
7.2.320.0110.01316.68
7.2.310.0080.01116.68
7.2.300.0110.01116.62
7.2.290.0050.01316.61
7.2.260.0070.00714.84
7.2.250.0100.00715.13
7.2.240.0080.00615.33
7.2.230.0080.00314.97
7.2.220.0070.00715.22
7.2.210.0080.00815.23
7.2.200.0090.00914.90
7.2.190.0060.00315.13
7.2.180.0100.00315.04
7.2.170.0040.01115.01
7.2.160.0050.00515.28
7.2.150.0070.01017.07
7.2.140.0070.00717.19
7.2.130.0070.00717.21
7.2.120.0030.01017.13
7.2.110.0110.00416.79
7.2.100.0120.00317.06
7.2.90.0100.00717.02
7.2.80.0060.00917.09
7.2.70.0000.00916.96
7.2.60.0070.00716.99
7.2.50.0000.01017.12
7.2.40.4220.01117.69
7.2.30.2640.00617.71
7.2.20.0080.00917.52
7.2.10.0280.00917.62
7.2.00.0120.01017.60
7.1.330.0030.01216.06
7.1.320.0040.00715.96
7.1.310.0040.00415.91
7.1.300.0060.00815.93
7.1.290.0080.00416.08
7.1.280.0110.00415.91
7.1.270.0060.00816.09
7.1.260.0120.00315.94
7.1.250.0000.01315.83
7.1.240.0000.01015.67
7.1.230.0060.00615.73
7.1.220.0060.00615.77
7.1.210.0030.00715.92
7.1.200.0030.01015.85
7.1.190.0070.00415.77
7.1.180.0030.00916.03
7.1.170.0070.00715.70
7.1.160.3180.00916.46
7.1.150.2990.00516.52
7.1.140.0110.00716.39
7.1.130.0100.01016.49
7.1.120.0130.01016.34
7.1.110.0090.00616.13
7.1.100.0100.00616.17
7.1.90.0080.00616.22
7.1.80.0320.00416.31
7.1.70.0420.00915.81
7.1.60.0140.01024.50
7.1.50.3110.00824.38
7.1.40.5600.00424.14
7.1.30.0230.01224.21
7.1.20.0170.01224.30
7.1.10.0090.00715.39
7.1.00.0060.00915.33
7.0.330.0090.00615.26
7.0.320.0030.01015.56
7.0.310.0030.01015.69
7.0.300.0030.01015.24
7.0.290.0070.01015.25
7.0.280.0000.01115.66
7.0.270.0000.01315.79
7.0.260.0110.00615.20
7.0.250.0030.00615.84
7.0.240.0060.00915.39
7.0.230.0050.00515.53
7.0.220.0090.00315.40
7.0.210.0080.00415.68
7.0.200.0070.01015.72
7.0.190.0090.00615.53
7.0.180.0000.01415.41
7.0.170.0100.00615.59
7.0.160.0030.00615.66
7.0.150.0060.00615.44
7.0.140.0090.00615.43
7.0.130.0030.01015.30
7.0.120.0030.00615.65
7.0.110.0070.00315.68
7.0.100.0070.00415.75
7.0.90.0100.00315.50
7.0.80.0040.01115.39
7.0.70.0070.00715.54
7.0.60.0030.00915.52
7.0.50.0110.00415.70
7.0.40.0030.01213.68
7.0.30.0120.00313.73
7.0.20.0030.01013.73
7.0.10.0090.00913.63
7.0.00.0050.00513.74
5.6.400.0070.00314.17
5.6.390.0060.00914.48
5.6.380.0070.00314.29
5.6.370.0070.00714.24
5.6.360.0070.00314.30
5.6.350.0180.00014.18
5.6.340.0060.00914.47
5.6.330.0060.00614.61
5.6.320.0030.01414.54
5.6.310.0060.00614.19
5.6.300.0130.00314.24
5.6.290.0070.00714.59
5.6.280.0030.01314.54
5.6.270.0090.00614.25
5.6.260.0000.01514.38
5.6.250.0120.00314.23
5.6.240.0060.00814.61
5.6.230.0060.00914.32
5.6.220.0070.01014.64
5.6.210.0040.01114.36
5.6.200.0030.00914.20
5.6.190.0080.00814.23
5.6.180.0030.00614.13
5.6.170.0110.00614.38
5.6.160.0040.00914.40
5.6.150.0090.00614.40
5.6.140.0100.00314.56
5.6.130.0040.01414.12
5.6.120.0000.01414.55
5.6.110.0060.00914.40
5.6.100.0040.01214.39
5.6.90.0100.00714.14
5.6.80.0030.01014.28
5.6.70.0090.00614.42
5.6.60.0030.00614.27
5.6.50.0000.01614.12
5.6.40.0000.01414.36
5.6.30.0040.00714.28
5.6.20.0040.01114.34
5.6.10.0100.00314.41
5.6.00.0050.00514.16

preferences:
32.47 ms | 403 KiB | 5 Q