3v4l.org

run code in 300+ PHP versions simultaneously
<?php // eliminar esta etiqueta usando expresiones regulares php // https://es.stackoverflow.com/q/131277/127 $str = '<p><img src="img/something.jpg" width="1249124" height="20" alt="foo" /></p>'; $str = preg_replace('%(.*?)<p>\s*(<img[^<]+?)\s*</p>(.*)%is', '$1$2$3', $str); //Imprimir el resultado echo $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.0000.01518.30
8.3.50.0070.00716.52
8.3.40.0090.00918.75
8.3.30.0180.00418.96
8.3.20.0060.00620.37
8.3.10.0080.00021.89
8.3.00.0080.00019.36
8.2.180.0110.01116.75
8.2.170.0140.00022.96
8.2.160.0090.00620.58
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0090.00619.97
8.2.110.0040.00722.29
8.2.100.0040.00817.84
8.2.90.0050.00318.03
8.2.80.0040.00418.95
8.2.70.0050.00317.63
8.2.60.0030.00617.88
8.2.50.0040.00417.75
8.2.40.0000.00821.14
8.2.30.0000.00719.57
8.2.20.0000.00818.20
8.2.10.0040.00418.05
8.2.00.0000.00718.38
8.1.280.0070.01125.92
8.1.270.0030.00620.31
8.1.260.0090.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00622.02
8.1.230.0040.00820.88
8.1.220.0080.00017.76
8.1.210.0040.00418.91
8.1.200.0030.00617.47
8.1.190.0060.00617.25
8.1.180.0050.00318.10
8.1.170.0050.00319.03
8.1.160.0000.00718.79
8.1.150.0000.00820.20
8.1.140.0000.00719.11
8.1.130.0070.00019.40
8.1.120.0000.00817.51
8.1.110.0080.00017.61
8.1.100.0070.00017.43
8.1.90.0040.00417.47
8.1.80.0060.00317.58
8.1.70.0030.00317.52
8.1.60.0070.00317.57
8.1.50.0080.00017.51
8.1.40.0000.00817.48
8.1.30.0040.00417.73
8.1.20.0000.00717.64
8.1.10.0080.00017.57
8.1.00.0060.00317.45
8.0.300.0060.00320.08
8.0.290.0030.00516.75
8.0.280.0000.00718.46
8.0.270.0070.00017.24
8.0.260.0030.00317.01
8.0.250.0030.00617.00
8.0.240.0080.00017.04
8.0.230.0000.00717.01
8.0.220.0000.00717.04
8.0.210.0000.00717.04
8.0.200.0000.01117.00
8.0.190.0000.00717.01
8.0.180.0040.00416.92
8.0.170.0000.00817.00
8.0.160.0040.00416.97
8.0.150.0030.00316.93
8.0.140.0030.00516.92
8.0.130.0000.00513.40
8.0.120.0040.00416.85
8.0.110.0070.00017.02
8.0.100.0070.00016.85
8.0.90.0070.00016.96
8.0.80.0090.00917.02
8.0.70.0000.00717.04
8.0.60.0040.00417.00
8.0.50.0040.00417.00
8.0.30.0110.00817.16
8.0.20.0140.01317.40
8.0.10.0000.00817.10
8.0.00.0120.00916.79
7.4.330.0050.00016.55
7.4.320.0000.00616.61
7.4.300.0030.00316.75
7.4.290.0030.00316.68
7.4.280.0060.00316.72
7.4.270.0040.00416.75
7.4.260.0000.00716.56
7.4.250.0050.00216.61
7.4.240.0070.00016.59
7.4.230.0000.00716.83
7.4.220.0070.00016.82
7.4.210.0110.00416.77
7.4.200.0050.00316.49
7.4.160.0110.00516.70
7.4.150.0030.01417.40
7.4.140.0100.01317.86
7.4.130.0060.00916.61
7.4.120.0100.01116.55
7.4.110.0030.01316.73
7.4.100.0070.01016.71
7.4.90.0060.01016.68
7.4.80.0120.00619.39
7.4.70.0100.00716.72
7.4.60.0030.01316.50
7.4.50.0100.00716.76
7.4.40.0120.00416.57
7.4.00.0090.00615.21
7.3.330.0060.00013.20
7.3.320.0070.00013.08
7.3.310.0040.00416.43
7.3.300.0000.00616.20
7.3.290.0040.01116.36
7.3.280.0100.00716.37
7.3.270.0280.02517.40
7.3.260.0100.00616.54
7.3.250.0110.00716.43
7.3.240.0080.01016.57
7.3.230.0070.01016.47
7.3.210.0100.00716.46
7.3.200.0030.01316.60
7.3.190.0040.01216.30
7.3.180.0090.01216.32
7.3.170.0060.01016.55
7.3.160.0110.00416.64
7.2.330.0150.00916.79
7.2.320.0140.00716.70
7.2.310.0140.00316.67
7.2.300.0110.00816.55
7.2.290.0120.00616.72
7.2.60.0130.00017.13
7.2.10.0320.00618.06
7.2.00.0220.01018.25
7.1.200.0040.01115.85
7.1.130.0270.00817.04
7.1.120.0250.00717.28
7.1.110.0230.00916.35
7.1.100.0270.00616.30
7.1.90.0310.00516.58
7.1.80.0280.01316.25
7.1.70.0270.00915.29
7.1.60.0380.01433.42
7.1.50.0310.01233.03
7.1.40.0710.01632.76
7.1.30.0590.00632.88
7.1.20.0330.01433.12
7.1.10.0320.01214.95
7.1.00.0200.00915.13

preferences:
55.79 ms | 401 KiB | 5 Q