3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<!doctype html> <html> <head> <script type="text/javascript">alert(fasdfsd)</script> <meta charset="utf-8"> <script type="text/javascript"> var fasdfsd="fasdfsd"; </script> <script type="text/javascript" src="http://google.adv.js"></script> <title> hey </title> <script> alert("hello"); </script> <script type="text/javascript" src="lfasd.js"></script> </head> <body> hey </body> </html>'; $str = preg_replace("@<script[^>]*?>.*?</script>@siu","",$str); $str = preg_replace("/(\n)*/","\n",$str); echo html_entity_decode($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.0120.00618.68
8.3.50.0080.01322.11
8.3.40.0140.00019.04
8.3.30.0040.01119.22
8.3.20.0080.00020.24
8.3.10.0080.00023.52
8.3.00.0040.00419.11
8.2.180.0190.00316.88
8.2.170.0140.00422.96
8.2.160.0140.00022.34
8.2.150.0050.00324.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0050.00321.03
8.2.110.0060.00320.50
8.2.100.0080.00317.84
8.2.90.0000.00817.88
8.2.80.0000.00918.86
8.2.70.0040.00717.80
8.2.60.0000.00817.91
8.2.50.0000.00719.16
8.2.40.0060.00619.37
8.2.30.0050.00219.40
8.2.20.0040.00417.94
8.2.10.0040.00418.24
8.2.00.0050.00217.96
8.1.280.0100.01025.92
8.1.270.0060.00318.87
8.1.260.0000.00926.35
8.1.250.0040.00428.09
8.1.240.0060.00323.83
8.1.230.0040.00817.89
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00717.13
8.1.190.0000.00917.48
8.1.180.0000.00719.04
8.1.170.0030.00518.64
8.1.160.0000.01019.09
8.1.150.0060.00318.79
8.1.140.0000.00817.66
8.1.130.0070.00017.97
8.1.120.0000.00717.62
8.1.110.0050.00317.54
8.1.100.0000.00717.56
8.1.90.0040.00417.49
8.1.80.0040.00417.44
8.1.70.0090.00017.44
8.1.60.0030.00517.69
8.1.50.0000.00917.60
8.1.40.0030.00517.55
8.1.30.0000.00817.79
8.1.20.0040.00417.58
8.1.10.0080.00017.63
8.1.00.0040.00417.57
8.0.300.0040.00418.77
8.0.290.0040.00417.00
8.0.280.0070.00018.52
8.0.270.0000.00717.20
8.0.260.0000.00717.25
8.0.250.0030.00317.18
8.0.240.0030.00317.16
8.0.230.0070.00017.17
8.0.220.0000.00717.05
8.0.210.0040.00417.08
8.0.200.0030.00317.10
8.0.190.0040.00417.13
8.0.180.0000.00817.13
8.0.170.0030.00517.13
8.0.160.0000.00716.96
8.0.150.0000.00717.03
8.0.140.0070.00016.98
8.0.130.0060.00013.45
8.0.120.0000.00817.09
8.0.110.0050.00317.14
8.0.100.0050.00317.16
8.0.90.0000.00717.06
8.0.80.0140.01017.03
8.0.70.0040.00417.13
8.0.60.0070.00017.08
8.0.50.0040.00417.17
8.0.30.0050.01817.12
8.0.20.0160.00717.40
8.0.10.0040.00416.95
8.0.00.0150.00516.85
7.4.330.0050.00015.03
7.4.320.0030.00316.79
7.4.300.0000.00616.84
7.4.290.0030.00316.74
7.4.280.0020.00516.84
7.4.270.0000.00816.78
7.4.260.0000.00716.85
7.4.250.0000.00716.64
7.4.240.0020.00516.73
7.4.230.0000.00716.82
7.4.220.0120.00616.72
7.4.210.0130.00316.61
7.4.200.0070.00016.75
7.4.160.0120.00416.71
7.4.150.0130.00717.40
7.4.140.0120.01317.86
7.4.130.0130.00716.79
7.4.120.0140.00416.69
7.4.110.0120.01216.69
7.4.100.0090.00916.73
7.4.90.0030.01316.60
7.4.80.0060.01219.39
7.4.70.0130.00316.69
7.4.60.0030.01316.72
7.4.50.0000.00916.68
7.4.40.0090.01216.61
7.4.30.0140.00316.60
7.4.00.0130.00315.35
7.3.330.0000.00613.20
7.3.320.0000.00613.10
7.3.310.0050.00416.27
7.3.300.0070.00016.26
7.3.290.0040.01116.38
7.3.280.0110.00616.35
7.3.270.0110.00717.40
7.3.260.0100.00716.32
7.3.250.0070.01316.51
7.3.240.0040.01316.45
7.3.230.0100.00716.46
7.3.210.0080.00916.68
7.3.200.0000.01819.39
7.3.190.0060.00916.53
7.3.180.0090.01216.40
7.3.170.0100.00716.46
7.3.160.0090.00916.39
7.3.10.0090.00416.69
7.3.00.0080.00616.77
7.2.330.0100.00716.65
7.2.320.0130.00416.84
7.2.310.0170.00316.55
7.2.300.0080.00816.58
7.2.290.0030.01516.88
7.2.130.0070.00916.85
7.2.120.0070.01217.06
7.2.110.0100.00716.86
7.2.100.0120.00517.10
7.2.90.0170.00716.91
7.2.80.0150.00417.03
7.2.70.0100.00917.08
7.2.60.0090.00517.10
7.2.50.0090.01017.05
7.2.40.0110.00817.11
7.2.30.0100.01317.01
7.2.20.0090.00717.10
7.2.10.0060.01216.93
7.2.00.0070.00817.81
7.1.250.0070.01215.93
7.1.240.0080.00415.98
7.1.230.0030.01015.75
7.1.220.0080.00415.79
7.1.210.0070.00715.92
7.1.200.0070.00715.93
7.1.190.0030.00915.97
7.1.180.0030.01215.93
7.1.170.0100.00615.86
7.1.160.0040.01215.80
7.1.150.0030.00915.86
7.1.140.0090.00016.09
7.1.130.0000.01016.04
7.1.120.0070.01015.98
7.1.110.0040.00815.86
7.1.100.0010.00716.99
7.1.90.0030.01216.00
7.1.80.0060.00616.00
7.1.70.0060.00816.57
7.1.60.0020.00917.61
7.1.50.0090.00916.62
7.1.40.0040.00715.59
7.1.30.0040.00715.97
7.1.20.0030.00615.97
7.1.10.0100.00315.81
7.1.00.0030.04419.08
7.0.330.0060.00615.52
7.0.320.0040.00815.53
7.0.310.0030.00815.78
7.0.300.0000.01015.50
7.0.290.0110.00415.15
7.0.280.0030.00615.34
7.0.270.0040.01115.39
7.0.260.0030.01315.52
7.0.250.0030.00915.63
7.0.240.0090.00615.39
7.0.230.0030.00915.66
7.0.220.0110.00615.55
7.0.210.0070.00715.54
7.0.200.0060.00816.17
7.0.190.0060.00915.48
7.0.180.0070.00715.63
7.0.170.0080.00415.45
7.0.160.0030.01315.50
7.0.150.0080.00615.20
7.0.140.0090.03218.75
7.0.130.0100.00315.54
7.0.120.0000.01115.41
7.0.110.0070.00715.65
7.0.100.0030.01015.59
7.0.90.0070.00715.56
7.0.80.0070.01015.57
7.0.70.0070.00715.71
7.0.60.0030.03617.80
7.0.50.0100.03516.85
7.0.40.0050.04816.73
7.0.30.0100.02816.88
7.0.20.0180.04416.91
7.0.10.0070.03417.02
7.0.00.0080.03216.88
5.6.380.0000.01414.22
5.6.370.0040.00814.49
5.6.360.0100.00314.30
5.6.350.0060.00614.23
5.6.340.0100.00714.26
5.6.330.0060.00614.33
5.6.320.0100.00614.66
5.6.310.0160.00014.36
5.6.300.0030.00914.30
5.6.290.0030.01314.65
5.6.280.0080.03817.74
5.6.270.0130.00314.41
5.6.260.0040.01114.32
5.6.250.0110.00414.23
5.6.240.0060.00914.53
5.6.230.0000.00914.54
5.6.220.0000.01314.46
5.6.210.0080.04317.25
5.6.200.0100.04516.12
5.6.190.0020.03917.29
5.6.180.0230.03817.41
5.6.170.0210.03917.19
5.6.160.0060.02317.30
5.6.150.0080.02216.21
5.6.140.0090.02516.29
5.6.130.0080.03716.24
5.6.120.0030.02317.63
5.6.110.0010.02717.79
5.6.100.0070.02417.59
5.6.90.0110.04417.64
5.6.80.0100.04217.29
5.6.70.0040.00814.09
5.6.60.0050.00514.11
5.6.50.0040.00814.04
5.6.40.0090.00613.87
5.6.30.0030.01314.00
5.6.20.0060.00614.04
5.6.10.0030.00614.01
5.6.00.0030.01313.77
5.5.380.0030.00311.20
5.5.370.0070.00711.00
5.5.360.0060.00310.91
5.5.350.0080.04615.78
5.5.340.0120.03614.40
5.5.330.0080.03715.35
5.5.320.0210.03815.47
5.5.310.0130.03915.74
5.5.300.0110.03914.41
5.5.290.0090.03914.28
5.5.280.0050.04615.84
5.5.270.0030.04215.84
5.5.260.0030.03415.68
5.5.250.0050.04615.77
5.5.240.0060.03615.52
5.5.230.0030.00710.95
5.5.220.0040.00410.81
5.5.210.0040.00411.01
5.5.200.0030.00610.97
5.5.190.0030.00710.93
5.5.180.0070.00311.02
5.5.170.0030.00710.73
5.5.160.0030.00611.09
5.5.150.0000.00810.92
5.5.140.0110.00010.81
5.5.130.0030.01011.02
5.5.120.0000.01110.77
5.5.110.0000.01010.78
5.5.100.0000.01110.86
5.5.90.0120.00010.95
5.5.80.0030.00811.00
5.5.70.0000.00711.06
5.5.60.0060.00310.99
5.5.50.0030.00610.65
5.5.40.0080.00310.97
5.5.30.0030.00710.84
5.5.20.0030.00310.75
5.5.10.0030.00810.95
5.5.00.0030.01010.71
5.4.450.0110.02615.26
5.4.440.0220.03015.28
5.4.430.0280.02515.30
5.4.420.0280.02515.17
5.4.410.0170.03515.12
5.4.400.0250.04015.12
5.4.390.0180.03114.75
5.4.380.0210.02814.88
5.4.370.0260.02514.80
5.4.360.0120.03214.70
5.4.350.0210.03014.81
5.4.340.0150.03114.88
5.4.330.0070.00310.78
5.4.320.0180.03314.84
5.4.310.0310.03514.68
5.4.300.0260.04114.76
5.4.290.0340.03514.88
5.4.280.0170.03514.80
5.4.270.0220.03114.72
5.4.260.0320.02714.75
5.4.250.0200.03014.76
5.4.240.0270.03314.90
5.4.230.0330.03214.88
5.4.220.0150.03614.66
5.4.210.0250.02814.82
5.4.200.0100.03313.80
5.4.190.0200.03014.60
5.4.180.0210.03214.77
5.4.170.0160.03614.60
5.4.160.0210.03114.54
5.4.150.0270.02514.98
5.4.140.0210.03113.53
5.4.130.0270.02313.54
5.4.120.0170.03213.55
5.4.110.0280.02813.64
5.4.100.0200.02813.38
5.4.90.0220.03113.58
5.4.80.0200.02713.45
5.4.70.0180.02813.49
5.4.60.0170.02613.47
5.4.50.0170.02813.51
5.4.40.0160.02813.63
5.4.30.0170.03213.53
5.4.20.0180.02813.52
5.4.10.0170.02913.64
5.4.00.0220.02913.45
5.3.290.0210.03012.53
5.3.280.0170.03212.54
5.3.270.0240.03012.62
5.3.260.0210.03212.55
5.3.250.0310.02712.60
5.3.240.0170.03112.52
5.3.230.0220.02712.52
5.3.220.0250.03012.55
5.3.210.0180.03112.54
5.3.200.0270.02612.50
5.3.190.0160.03212.50
5.3.180.0220.02512.47
5.3.170.0190.02712.51
5.3.160.0130.03012.51
5.3.150.0160.02712.48
5.3.140.0170.02612.56
5.3.130.0230.02812.58
5.3.120.0200.03112.45
5.3.110.0270.03412.45
5.3.100.0200.03012.28
5.3.90.0160.03312.21
5.3.80.0240.02812.28
5.3.70.0220.02812.27
5.3.60.0150.03512.24
5.3.50.0160.03412.20
5.3.40.0270.02212.17
5.3.30.0240.02512.17
5.3.20.0170.02712.05
5.3.10.0370.02512.09
5.3.00.0270.03312.04
5.2.170.0210.02510.81
5.2.160.0180.01810.76
5.2.150.0100.03110.79
5.2.140.0220.02310.79
5.2.130.0110.02310.80
5.2.120.0170.03310.79
5.2.110.0220.02810.74
5.2.100.0180.02710.77
5.2.90.0170.02810.71
5.2.80.0130.02310.74
5.2.70.0140.02810.78
5.2.60.0320.02910.86
5.2.50.0210.02010.71
5.2.40.0100.02510.75
5.2.30.0160.02010.79
5.2.20.0160.02510.72
5.2.10.0130.02210.76
5.2.00.0170.02710.60
5.1.60.0120.01510.24
5.1.50.0140.01810.25
5.1.40.0130.01510.28
5.1.30.0130.01810.41
5.1.20.0080.02510.51
5.1.10.0150.02510.26
5.1.00.0080.02310.27
5.0.50.0080.0209.89
5.0.40.0050.0179.89
5.0.30.0050.0279.89
5.0.20.0070.0159.89
5.0.10.0070.0159.89
5.0.00.0080.0259.89
4.4.90.0050.0199.89
4.4.80.0080.0139.89
4.4.70.0050.0159.89
4.4.60.0030.0169.89
4.4.50.0050.0129.89
4.4.40.0080.0189.89
4.4.30.0050.0149.89
4.4.20.0080.0139.89
4.4.10.0020.0179.89
4.4.00.0050.0259.89
4.3.110.0130.0079.89
4.3.100.0050.0159.89
4.3.90.0060.0119.89
4.3.80.0030.0229.89
4.3.70.0080.0119.89
4.3.60.0080.0109.89
4.3.50.0170.0079.89
4.3.40.0100.0179.89
4.3.30.0070.0159.89
4.3.20.0030.0149.89
4.3.10.0020.0139.89
4.3.00.0040.0158.83

preferences:
55.59 ms | 401 KiB | 5 Q