3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pre ="<a href=\""; $post= "</a>"; $in = array('http://">http', 'ftp://">ftp', 'mailto://">mailto', '#">HASH', '//">2xfw slash', '\\\\">2x Bw slash', 'file://">file', 'relative/path">relative/path' ); $replacements = array('/((?:href|src) *= *[\'"](?!(http|ftp|mailto|file|javascript|#|[a-z]+:|'. preg_quote('yyyy\\\\',"/"). '|\/\/)))(\/?)/i' => "$1" . "http://www.server.tld/ABSOLUTE/PATH/" ); foreach($in as $test) { echo "\n". '<<pre>'; $r = $pre . $test . $post; echo "$r \t\t=>\t\t" . preg_replace(array_keys($replacements), $replacements, $r); echo '</pre>'; }

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.0030.01718.61
8.3.50.0090.00918.57
8.3.40.0120.00919.09
8.3.30.0070.00719.23
8.3.20.0080.00020.19
8.3.10.0080.00021.91
8.3.00.0090.00017.75
8.2.180.0060.01618.79
8.2.170.0000.01419.25
8.2.160.0100.00322.96
8.2.150.0100.01024.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.73
8.2.110.0000.01019.21
8.2.100.0040.00718.09
8.2.90.0080.00019.36
8.2.80.0030.00517.97
8.2.70.0040.00417.75
8.2.60.0000.00817.93
8.2.50.0060.00318.07
8.2.40.0040.00420.13
8.2.30.0060.00318.11
8.2.20.0030.00517.96
8.2.10.0040.00418.21
8.2.00.0000.00918.09
8.1.280.0150.00625.92
8.1.270.0060.00320.38
8.1.260.0000.00726.35
8.1.250.0030.00628.09
8.1.240.0040.00422.72
8.1.230.0070.00317.89
8.1.220.0000.00817.79
8.1.210.0050.00318.77
8.1.200.0040.00417.38
8.1.190.0040.00417.47
8.1.180.0070.00018.10
8.1.170.0040.00420.42
8.1.160.0030.00521.99
8.1.150.0000.00818.99
8.1.140.0030.00617.64
8.1.130.0040.00417.91
8.1.120.0040.00417.68
8.1.110.0030.00517.60
8.1.100.0000.00717.62
8.1.90.0000.00717.55
8.1.80.0050.00317.64
8.1.70.0040.00417.52
8.1.60.0040.00417.77
8.1.50.0000.00817.59
8.1.40.0020.00517.63
8.1.30.0040.00417.86
8.1.20.0000.00817.73
8.1.10.0000.01017.69
8.1.00.0080.00317.68
8.0.300.0050.00218.77
8.0.290.0050.00316.88
8.0.280.0040.00418.53
8.0.270.0000.00717.30
8.0.260.0000.00717.21
8.0.250.0030.00317.12
8.0.240.0030.00617.01
8.0.230.0030.00317.11
8.0.220.0030.00317.13
8.0.210.0040.00417.02
8.0.200.0090.00017.09
8.0.190.0100.00017.14
8.0.180.0000.00717.02
8.0.170.0000.00817.06
8.0.160.0000.00716.96
8.0.150.0070.00316.98
8.0.140.0050.00217.03
8.0.130.0040.00413.45
8.0.120.0040.00416.97
8.0.110.0040.00417.07
8.0.100.0030.00516.95
8.0.90.0040.00416.99
8.0.80.0080.00817.07
8.0.70.0000.00716.97
8.0.60.0070.00017.19
8.0.50.0040.00417.00
8.0.30.0120.01317.32
8.0.20.0100.01017.40
8.0.10.0000.00817.19
8.0.00.0040.01417.07
7.4.330.0000.00615.18
7.4.320.0030.00316.71
7.4.300.0000.00616.79
7.4.290.0050.00216.90
7.4.280.0000.00716.95
7.4.270.0050.00216.75
7.4.260.0070.00016.72
7.4.250.0000.00816.87
7.4.240.0040.00416.76
7.4.230.0000.00716.70
7.4.220.0090.01216.77
7.4.210.0100.00716.76
7.4.200.0030.00316.64
7.4.160.0090.00616.59
7.4.150.0080.01117.40
7.4.140.0140.01217.86
7.4.130.0080.01216.72
7.4.120.0070.01216.64
7.4.110.0120.00616.80
7.4.100.0030.01416.77
7.4.90.0180.00016.69
7.4.80.0050.01419.39
7.4.70.0070.01016.97
7.4.60.0070.01016.66
7.4.50.0000.00816.48
7.4.40.0160.00916.82
7.4.30.0100.01016.64
7.4.00.0040.01115.06
7.3.330.0060.00013.29
7.3.320.0150.00013.30
7.3.310.0030.00316.31
7.3.300.0000.00716.44
7.3.290.0060.00916.45
7.3.280.0070.00916.47
7.3.270.0100.00717.40
7.3.260.0110.00816.78
7.3.250.0110.00716.48
7.3.240.0100.01316.59
7.3.230.0090.01016.57
7.3.210.0140.00716.84
7.3.200.0120.02819.39
7.3.190.0090.00616.76
7.3.180.0100.00716.46
7.3.170.0090.00916.75
7.3.160.0070.01016.52
7.2.330.0100.01316.74
7.2.320.0110.00816.77
7.2.310.0120.00616.75
7.2.300.0090.01216.73
7.2.290.0080.01416.75
7.2.00.0060.00619.53
7.1.100.0120.01218.35
7.1.70.0070.01017.30
7.1.60.0070.01819.50
7.1.50.0220.00916.90
7.1.00.0130.06722.43
7.0.200.0120.00615.02
7.0.140.0100.06722.06
7.0.60.0100.08319.92
7.0.50.0070.08317.87
7.0.40.0100.08320.20
7.0.30.0170.04720.03
7.0.20.0330.08320.19
7.0.10.0330.08320.03
7.0.00.0100.04020.35
5.6.280.0000.07720.98
5.6.210.0070.07320.47
5.6.200.0100.08318.18
5.6.190.0100.07720.60
5.6.180.0170.04320.53
5.6.170.0270.08020.48
5.6.160.0070.08720.49
5.6.150.0070.08018.15
5.6.140.0030.08718.18
5.6.130.0070.08018.20
5.6.120.0030.09320.88
5.6.110.0100.08320.98
5.6.100.0200.07320.98
5.6.90.0030.04320.98
5.6.80.0000.04020.37
5.6.70.0430.06020.32
5.5.350.0270.07320.38
5.5.340.0100.05318.02
5.5.330.0070.04020.19
5.5.320.0000.04320.39
5.5.310.0300.07320.28
5.5.300.0030.08317.88
5.5.290.0070.04017.95
5.5.280.0100.07720.78
5.5.270.0200.07020.87
5.5.260.0000.09720.64
5.5.250.0170.07720.68
5.5.240.0100.07020.32
5.4.450.0270.04719.32
5.4.440.0270.04719.32
5.4.430.0700.06019.36
5.4.420.0070.05719.41
5.4.410.0170.06318.96
5.4.400.0530.05718.72
5.4.390.0430.06718.69
5.4.380.0500.05718.50
5.4.370.0630.05018.70
5.4.360.0530.06018.50
5.4.350.0470.07018.69
5.4.340.0370.07718.74
5.4.320.0800.06018.68
5.4.310.0530.07318.58
5.4.300.0400.05018.50
5.4.290.0300.05718.59
5.4.280.0470.06018.71
5.4.270.0600.07718.71
5.4.260.0430.05718.75
5.4.250.0470.05318.71
5.4.240.0600.05318.68
5.4.230.0530.05718.43
5.4.220.0370.07318.71
5.4.210.0400.07018.65
5.4.200.0270.05716.46
5.4.190.0330.06018.64
5.4.180.0530.05718.70
5.4.170.0530.07318.48
5.4.160.0470.07318.53
5.4.150.0530.04718.70
5.4.140.0430.06716.33
5.4.130.0470.07016.20
5.4.120.0600.06016.37
5.4.110.0330.05016.31
5.4.100.0470.05716.12
5.4.90.0300.07316.13
5.4.80.0600.04316.15
5.4.70.0600.07016.23
5.4.60.0530.05716.02
5.4.50.0430.06716.20
5.4.40.0430.07016.18
5.4.30.0370.06716.27
5.4.20.0600.06716.23
5.4.10.0370.06316.23
5.4.00.0370.05015.77
5.3.290.0430.08314.59
5.3.280.0630.06314.64
5.3.270.0630.06014.76
5.3.260.0500.06314.58
5.3.250.0500.07714.52
5.3.240.0330.07014.76
5.3.230.0430.08014.53
5.3.220.0500.07314.50
5.3.210.0570.06314.52
5.3.200.0570.05714.54
5.3.190.0500.08014.48
5.3.180.0530.06714.55
5.3.170.0470.06714.60
5.3.160.0530.07314.48
5.3.150.0470.05714.54
5.3.140.0300.06314.55
5.3.130.0500.04714.63
5.3.120.0570.06014.52
5.3.110.0470.07314.64
5.3.100.0300.06313.94
5.3.90.0330.05313.98
5.3.80.0470.05713.98
5.3.70.0430.06014.01
5.3.60.0330.07013.96
5.3.50.0470.06713.88
5.3.40.0570.04713.90
5.3.30.0370.06013.99
5.3.20.0570.06313.67
5.3.10.0300.07013.63
5.3.00.0370.06713.55
5.2.170.0470.04711.36
5.2.160.0330.05311.08
5.2.150.0470.04711.18
5.2.140.0470.05011.18
5.2.130.0430.04711.09
5.2.120.0300.06011.07
5.2.110.0500.05311.17
5.2.100.0470.04711.24
5.2.90.0470.05011.14
5.2.80.0470.04711.07
5.2.70.0330.04711.15
5.2.60.0400.06011.04
5.2.50.0370.05011.04
5.2.40.0230.04711.22
5.2.30.0300.06010.95
5.2.20.0370.04010.90
5.2.10.0270.05010.97
5.2.00.0330.03310.71
5.1.60.0100.04310.02
5.1.50.0130.0439.95
5.1.40.0100.04710.01
5.1.30.0270.05310.47
5.1.20.0200.05010.33
5.1.10.0300.03310.14
5.1.00.0300.04710.19
5.0.50.0230.0238.59
5.0.40.0130.0308.42
5.0.30.0170.0478.35
5.0.20.0130.0308.24
5.0.10.0230.0308.36
5.0.00.0130.0438.24
4.4.90.0170.0205.92
4.4.80.0070.0275.83
4.4.70.0130.0275.91
4.4.60.0130.0235.91
4.4.50.0100.0235.83
4.4.40.0130.0405.93
4.4.30.0130.0275.88
4.4.20.0130.0335.99
4.4.10.0070.0336.01
4.4.00.0170.0335.89
4.3.110.0200.0205.81
4.3.100.0100.0305.88
4.3.90.0100.0205.84
4.3.80.0130.0435.80
4.3.70.0070.0275.92
4.3.60.0070.0235.80
4.3.50.0170.0275.87
4.3.40.0230.0375.87
4.3.30.0130.0234.57
4.3.20.0100.0274.67
4.3.10.0070.0234.54
4.3.00.0000.0236.67

preferences:
45.95 ms | 400 KiB | 5 Q