3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '1<script>2</script>3<script>4</script>5'; $txt = preg_replace("/<script>.*?<\/script>/s", '', $html); var_dump($txt); //135 ←と表示したい。 //例2 $html = 'a<script>s</script>b<script>-</script>c'; $txt = preg_replace("/<script>.*?<\/script>/s", '', $html); var_dump($txt); //abc ←と表示したい。 $html = '1<script>2</script>3<script>4</script>5'; $txt = preg_replace("/<script>.*<\/script>/s", '', $html); var_dump($txt); //135 ←と表示したい。 //例2 $html = 'a<script>s</script>b<script>-</script>c'; $txt = preg_replace("/<script>.*<\/script>/s", '', $html); var_dump($txt); //abc ←と表示したい。

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.70.0070.00718.56
8.3.60.0100.01318.39
8.3.50.0080.00816.65
8.3.40.0130.00318.77
8.3.30.0070.01118.84
8.3.20.0090.00020.13
8.3.10.0090.00022.09
8.3.00.0050.00519.56
8.2.190.0090.00616.63
8.2.180.0070.00718.51
8.2.170.0090.00922.96
8.2.160.0120.00619.34
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00021.05
8.2.110.0030.00619.21
8.2.100.0070.00717.91
8.2.90.0040.00419.08
8.2.80.0080.00017.97
8.2.70.0080.00017.63
8.2.60.0060.00317.79
8.2.50.0030.00618.10
8.2.40.0060.00322.18
8.2.30.0000.00819.20
8.2.20.0040.00418.07
8.2.10.0030.00618.17
8.2.00.0030.00618.15
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0040.00422.36
8.1.230.0040.00719.05
8.1.220.0050.00317.74
8.1.210.0040.00718.77
8.1.200.0000.00817.23
8.1.190.0040.00419.00
8.1.180.0030.00618.10
8.1.170.0090.00018.36
8.1.160.0040.00419.10
8.1.150.0050.00218.88
8.1.140.0040.00418.89
8.1.130.0040.00420.70
8.1.120.0000.00717.49
8.1.110.0030.00617.64
8.1.100.0000.00817.54
8.1.90.0000.00717.47
8.1.80.0000.00717.59
8.1.70.0000.00717.48
8.1.60.0040.00417.71
8.1.50.0000.00817.62
8.1.40.0060.00317.55
8.1.30.0040.00417.76
8.1.20.0030.00517.78
8.1.10.0040.00417.68
8.1.00.0040.00417.54
8.0.300.0000.00718.77
8.0.290.0060.00316.88
8.0.280.0000.00718.42
8.0.270.0050.00317.42
8.0.260.0030.00318.79
8.0.250.0000.00717.02
8.0.240.0030.00517.09
8.0.230.0040.00416.89
8.0.220.0040.00416.92
8.0.210.0040.00416.99
8.0.200.0060.00017.01
8.0.190.0000.00817.05
8.0.180.0040.00416.99
8.0.170.0000.00716.92
8.0.160.0060.00317.03
8.0.150.0040.00416.87
8.0.140.0040.00416.88
8.0.130.0040.00413.39
8.0.120.0000.00716.88
8.0.110.0090.00017.05
8.0.100.0040.00416.95
8.0.90.0070.00016.90
8.0.80.0030.01816.94
8.0.70.0080.00016.80
8.0.60.0000.00717.01
8.0.50.0000.00817.02
8.0.30.0100.00817.02
8.0.20.0120.01217.42
8.0.10.0000.00717.02
8.0.00.0110.01116.95
7.4.330.0020.00215.55
7.4.320.0060.00016.82
7.4.300.0000.00616.67
7.4.290.0000.00816.70
7.4.280.0030.00516.66
7.4.270.0040.00416.77
7.4.260.0080.00316.66
7.4.250.0050.00316.63
7.4.240.0000.00716.61
7.4.230.0000.00716.80
7.4.220.0140.00916.64
7.4.210.0040.01616.67
7.4.200.0050.00316.80
7.4.160.0110.00616.57
7.4.150.0040.01317.40
7.4.140.0120.00617.86
7.4.130.0150.00916.75
7.4.120.0100.00816.54
7.4.110.0100.00716.60
7.4.100.0100.00816.39
7.4.90.0150.00316.43
7.4.80.0060.01119.39
7.4.70.0060.01016.61
7.4.60.0080.00816.61
7.4.50.0100.00316.50
7.4.40.0060.01016.46
7.4.30.0140.00316.68
7.4.00.0060.01215.16
7.3.330.0060.00013.15
7.3.320.0060.00013.13
7.3.310.0030.00316.45
7.3.300.0070.00016.18
7.3.290.0080.00816.33
7.3.280.0060.01016.33
7.3.270.0030.01417.40
7.3.260.0130.00616.47
7.3.250.0130.00916.63
7.3.240.0080.01116.38
7.3.230.0090.00916.38
7.3.210.0150.00316.50
7.3.200.0060.01016.41
7.3.190.0040.01216.39
7.3.180.0080.01216.41
7.3.170.0100.00616.49
7.3.160.0060.01016.60
7.3.120.0070.01014.73
7.3.110.0100.00614.92
7.3.100.0090.00614.93
7.3.90.0000.01514.54
7.3.80.0070.00714.92
7.3.70.0000.01015.02
7.3.60.0000.01414.49
7.3.50.0000.01114.88
7.3.40.0060.00614.88
7.3.30.0030.01014.55
7.3.20.0080.00316.74
7.3.10.0110.00216.49
7.3.00.0060.00716.52
7.2.330.0110.00716.55
7.2.320.0120.00916.58
7.2.310.0100.01316.66
7.2.300.0080.00816.59
7.2.290.0070.01016.72
7.2.240.0100.00615.24
7.2.230.0030.00915.24
7.2.220.0070.00415.16
7.2.210.0000.01015.09
7.2.200.0030.00914.82
7.2.190.0130.00315.07
7.2.180.0030.01315.27
7.2.170.0030.00614.87
7.2.160.0080.00415.19
7.2.150.0070.00716.86
7.2.140.0030.01216.73
7.2.130.0060.00816.77
7.2.120.0070.00916.47
7.2.110.0060.00916.61
7.2.100.0130.00616.79
7.2.90.0120.01216.79
7.2.80.0090.00916.58
7.2.70.0100.00816.63
7.2.60.0100.00816.71
7.2.50.0120.00816.77
7.2.40.0110.00516.70
7.2.30.0160.00816.80
7.2.20.0140.00516.76
7.2.10.0100.00716.92
7.2.00.0090.01216.90
7.1.330.0110.00316.04
7.1.320.0060.00315.86
7.1.310.0030.00715.84
7.1.300.0070.00316.08
7.1.290.0070.00415.94
7.1.280.0030.00715.75
7.1.270.0130.00315.76
7.1.260.0070.00715.81
7.1.250.0120.01115.53
7.1.200.0080.00315.87
7.1.80.3220.01316.58
7.1.70.2510.01015.55
7.1.60.2810.00733.60
7.1.50.2400.01333.00
7.1.40.2240.00632.82
7.1.30.5360.01632.73
7.1.20.1970.01932.71
7.1.10.1780.01314.89
7.1.00.2080.01515.02
7.0.200.2960.01314.72
7.0.190.3400.01315.08
7.0.180.2130.01014.50
7.0.170.2970.00914.75
7.0.160.2220.01314.42
7.0.150.2150.00614.71
7.0.140.1810.01514.46
7.0.130.2120.01214.65
7.0.120.1750.00914.71
7.0.110.2080.01314.64
7.0.100.2100.01314.60
7.0.90.1640.00614.59
7.0.80.1840.01114.66
7.0.70.1970.01314.64
7.0.60.1670.00514.28
7.0.50.1700.01314.68
7.0.40.1690.01014.74
7.0.30.1610.00014.70
7.0.20.1990.01314.66
7.0.10.1700.00914.52
7.0.00.2030.01314.71

preferences:
48.08 ms | 401 KiB | 5 Q