3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<HTML <p>my text 1</p> some other content <p>some other paragraph followed by an html line break</p><br> etc... HTML; $string = preg_replace('~</?[a-z]+>\R(*SKIP)(*FAIL)|$~m', '<br>', $string); var_export($string); echo "\n----\n"; var_export(json_encode($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.5.00.0090.01120.04
8.4.150.0020.00014.05
8.4.140.0120.01517.77
8.4.130.0130.00718.88
8.4.120.0120.00724.18
8.4.110.0050.00319.06
8.4.100.0070.00518.07
8.4.90.0040.00517.95
8.4.80.0110.00917.89
8.4.70.0040.00417.80
8.4.60.0110.00920.43
8.4.50.0040.00717.93
8.4.40.0040.01117.88
8.4.30.0150.00619.77
8.4.20.0070.01419.40
8.4.10.0060.00317.98
8.3.280.0090.01120.93
8.3.270.0110.00816.66
8.3.260.0110.00916.79
8.3.250.0090.00618.76
8.3.240.0110.00717.29
8.3.230.0130.00616.61
8.3.220.0130.00716.74
8.3.210.0030.00516.57
8.3.200.0060.00316.59
8.3.190.0100.00916.96
8.3.180.0120.00616.61
8.3.170.0090.00918.93
8.3.160.0080.00018.43
8.3.150.0060.01320.68
8.3.140.0100.01018.63
8.3.130.0000.00816.91
8.3.120.0110.00020.74
8.3.110.0030.00616.75
8.3.100.0060.00324.06
8.3.90.0030.00626.77
8.3.80.0040.00818.65
8.3.70.0000.01516.75
8.3.60.0120.00318.38
8.3.50.0070.00718.63
8.3.40.0070.00718.83
8.3.30.0150.00018.88
8.3.20.0040.00421.77
8.3.10.0080.00021.90
8.3.00.0040.00423.71
8.2.290.0130.00518.70
8.2.280.0090.00920.36
8.2.270.0160.00319.09
8.2.260.0070.01018.97
8.2.250.0030.00616.73
8.2.240.0050.00317.46
8.2.230.0100.00020.94
8.2.220.0030.00637.54
8.2.210.0040.00426.77
8.2.200.0060.00616.50
8.2.190.0120.00616.63
8.2.180.0070.01118.66
8.2.170.0090.00622.96
8.2.160.0110.00420.57
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0030.00521.13
8.2.120.0100.00726.35
8.2.110.0030.00722.25
8.2.100.0040.00817.84
8.2.90.0040.00418.16
8.2.80.0060.00318.03
8.2.70.0080.00017.80
8.2.60.0000.00817.93
8.2.50.0000.00818.16
8.2.40.0030.00619.07
8.2.30.0080.00021.24
8.2.20.0040.00418.13
8.2.10.0070.00018.04
8.2.00.0000.00719.33
8.1.330.0060.00421.79
8.1.320.0120.00916.32
8.1.310.0040.01118.51
8.1.300.0100.01018.35
8.1.290.0030.00630.84
8.1.280.0100.00625.92
8.1.270.0050.00323.77
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0070.00319.40
8.1.230.0120.00020.84
8.1.220.0000.00817.78
8.1.210.0100.00018.84
8.1.200.0030.00617.35
8.1.190.0000.00917.23
8.1.180.0000.00818.10
8.1.170.0040.00418.72
8.1.160.0000.00718.87
8.1.150.0000.00819.07
8.1.140.0030.00717.68
8.1.130.0000.00818.82
8.1.120.0030.00517.45
8.1.110.0040.00417.46
8.1.100.0030.00317.43
8.1.90.0050.00217.48
8.1.80.0040.00417.44
8.1.70.0040.00417.55
8.1.60.0100.00317.72
8.1.50.0030.00517.68
8.1.40.0040.00417.63
8.1.30.0040.00417.70
8.1.20.0000.00817.66
8.1.10.0040.00417.71
8.1.00.0000.00717.65
8.0.300.0060.00319.98
8.0.290.0040.00417.00
8.0.280.0000.00818.47
8.0.270.0040.00417.13
8.0.260.0030.00318.47
8.0.250.0030.00317.06
8.0.240.0030.00517.17
8.0.230.0020.00517.13
8.0.220.0080.00017.13
8.0.210.0040.00417.14
8.0.200.0000.00717.23
8.0.190.0040.00417.12
8.0.180.0070.00017.09
8.0.170.0040.00417.16
8.0.160.0070.00017.11
8.0.150.0090.00317.08
8.0.140.0030.00517.03
8.0.130.0000.00613.49
8.0.120.0050.00216.98
8.0.110.0060.00317.16
8.0.100.0000.00716.93
8.0.90.0070.00016.98
8.0.80.0060.01017.04
8.0.70.0040.00417.05
8.0.60.0040.00416.98
8.0.50.0030.00516.98
8.0.30.0050.01217.19
8.0.20.0140.00517.43
8.0.10.0000.00717.21
8.0.00.0120.00816.76
7.4.330.0050.00016.68
7.4.320.0000.00816.55
7.4.300.0060.00016.67
7.4.290.0000.00816.66
7.4.280.0030.00516.66
7.4.270.0070.00016.68
7.4.260.0070.00016.75
7.4.250.0000.00716.54
7.4.240.0000.00716.80
7.4.230.0000.00716.79
7.4.220.0000.00816.66
7.4.210.0090.00816.72
7.4.200.0000.00716.57
7.4.160.0070.01016.75
7.4.140.0100.00917.86
7.4.130.0120.00616.64
7.4.120.0110.00716.76
7.4.110.0100.00616.62
7.4.100.0000.02016.79
7.4.90.0100.00716.66
7.4.80.0070.01119.39
7.4.70.0040.01716.86
7.4.60.0030.01416.80
7.4.50.0040.01516.43
7.4.40.0040.01816.63
7.4.00.0050.00915.18
7.3.330.0000.00513.17
7.3.320.0030.00313.25
7.3.310.0000.00716.20
7.3.300.0030.00316.32
7.3.290.0040.00416.40
7.3.280.0090.00616.43
7.3.260.0110.01116.55
7.3.240.0080.00916.54
7.3.230.0100.00616.70
7.3.210.0140.00416.43
7.3.200.0030.01316.32
7.3.190.0130.00316.56
7.3.180.0100.00616.48
7.3.170.0090.01016.52
7.3.160.0090.00616.38
7.3.120.0130.00715.16
7.3.110.0090.00915.12
7.3.100.0130.00315.14
7.3.90.0070.00715.15
7.3.80.0030.00615.20
7.3.70.0090.00615.06
7.3.60.0040.01014.76
7.3.50.0130.00314.81
7.3.40.0070.00714.88
7.3.30.0070.00715.07
7.3.20.0040.01116.62
7.3.10.0030.01016.81
7.3.00.0040.01016.56
7.2.330.0110.00816.88
7.2.320.0080.00916.55
7.2.310.0030.01416.66
7.2.300.0160.00816.80
7.2.290.0110.00816.50
7.2.250.0040.01514.91
7.2.240.0100.01015.03
7.2.230.0100.00714.84
7.2.220.0070.00715.11
7.2.210.0040.00715.13
7.2.200.0100.00714.84
7.2.190.0000.00914.88
7.2.180.0040.00815.21
7.2.170.0030.01315.30
7.2.130.0040.01117.07
7.2.120.0070.00717.07
7.2.110.0060.00917.10
7.2.100.0000.01216.94
7.2.90.0080.00417.11
7.2.80.0050.00516.94
7.2.70.0080.00317.24
7.2.60.0060.00817.04
7.2.50.0030.01016.72
7.2.40.0700.01117.77
7.2.30.0780.00717.60
7.2.20.0450.00817.65
7.2.10.0420.00717.48
7.2.00.0430.00917.46
7.1.330.0090.00615.83
7.1.320.0030.01015.82
7.1.310.0080.00415.98
7.1.300.0060.00616.08
7.1.290.0090.00615.89
7.1.280.0040.01515.79
7.1.270.0000.00915.94
7.1.260.0030.00915.61
7.1.250.0040.00715.89
7.1.200.0060.00915.95
7.1.160.0960.00816.75
7.1.150.1500.01017.12
7.1.140.0800.00817.23
7.1.130.0810.00616.59
7.1.120.1890.00917.03
7.1.110.0870.00716.54
7.1.100.0750.01116.45
7.1.90.2340.00916.45
7.1.80.1780.01116.16
7.1.70.1850.00815.55
7.1.60.1300.01333.50
7.1.50.2240.00932.88
7.1.40.1240.01332.84
7.1.30.1160.01133.11
7.1.20.1040.01232.99
7.1.10.1620.01015.00
7.1.00.2180.00915.27

preferences:
35.14 ms | 403 KiB | 5 Q