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]+:|xx\\\\|\/\/)))(\/?)/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.68
8.3.50.0060.01322.26
8.3.40.0120.00318.84
8.3.30.0070.00719.09
8.3.20.0080.00020.15
8.3.10.0040.00421.70
8.3.00.0080.00019.51
8.2.180.0120.00618.53
8.2.170.0090.01219.26
8.2.160.0030.01022.96
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0050.00319.37
8.2.110.0190.00322.25
8.2.100.0070.00417.75
8.2.90.0060.00319.25
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0050.00318.05
8.2.50.0040.00418.07
8.2.40.0030.00518.16
8.2.30.0040.00418.07
8.2.20.0080.00017.96
8.2.10.0040.00418.22
8.2.00.0040.00417.95
8.1.280.0160.00325.92
8.1.270.0080.00020.33
8.1.260.0050.00326.35
8.1.250.0030.00628.09
8.1.240.0060.00322.73
8.1.230.0090.00317.60
8.1.220.0030.00617.77
8.1.210.0060.00318.77
8.1.200.0000.01017.35
8.1.190.0050.00317.48
8.1.180.0050.00318.10
8.1.170.0030.00520.62
8.1.160.0000.00721.93
8.1.150.0000.00719.00
8.1.140.0000.00817.55
8.1.130.0040.00417.80
8.1.120.0000.00717.66
8.1.110.0040.00417.52
8.1.100.0040.00417.56
8.1.90.0040.00417.68
8.1.80.0040.00417.60
8.1.70.0000.00717.65
8.1.60.0040.00417.72
8.1.50.0000.00917.73
8.1.40.0050.00217.66
8.1.30.0040.00417.88
8.1.20.0030.00617.80
8.1.10.0000.00917.55
8.1.00.0030.00717.58
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00818.48
8.0.270.0070.00017.30
8.0.260.0000.00617.20
8.0.250.0030.00317.02
8.0.240.0030.00717.15
8.0.230.0040.00417.04
8.0.220.0000.00717.17
8.0.210.0040.00317.03
8.0.200.0030.00817.10
8.0.190.0030.00617.09
8.0.180.0000.00717.11
8.0.170.0000.00817.08
8.0.160.0070.00017.02
8.0.150.0100.00016.88
8.0.140.0040.00416.97
8.0.130.0080.00013.54
8.0.120.0050.00317.09
8.0.110.0000.00717.09
8.0.100.0000.00817.07
8.0.90.0040.00417.19
8.0.80.0120.00617.09
8.0.70.0030.00516.90
8.0.60.0000.00717.02
8.0.50.0000.00716.91
8.0.30.0100.01417.33
8.0.20.0110.01117.40
8.0.10.0000.00817.23
8.0.00.0130.00416.98
7.4.330.0000.00615.09
7.4.320.0030.00316.77
7.4.300.0040.00416.87
7.4.290.0000.00716.81
7.4.280.0030.00616.74
7.4.270.0000.00716.84
7.4.260.0040.00416.86
7.4.250.0040.00416.77
7.4.240.0040.00316.83
7.4.230.0040.00416.86
7.4.220.0110.00716.75
7.4.210.0080.00816.93
7.4.200.0040.00416.79
7.4.160.0030.01216.55
7.4.150.0040.01517.40
7.4.140.0160.00717.86
7.4.130.0090.01216.67
7.4.120.0070.01016.62
7.4.110.0000.01816.66
7.4.100.0150.00416.66
7.4.90.0100.00716.91
7.4.80.0100.01619.39
7.4.70.0000.01716.82
7.4.60.0130.00416.84
7.4.50.0060.00316.60
7.4.40.0110.01216.52
7.4.30.0070.01716.55
7.4.00.0070.00714.95
7.3.330.0030.00313.33
7.3.320.0090.00413.18
7.3.310.0030.00316.43
7.3.300.0030.00316.27
7.3.290.0060.01016.45
7.3.280.0130.00416.41
7.3.270.0070.01717.40
7.3.260.0070.01116.85
7.3.250.0100.00716.59
7.3.240.0120.00916.60
7.3.230.0070.01316.66
7.3.210.0180.00616.72
7.3.200.0040.01619.39
7.3.190.0060.00916.76
7.3.180.0040.01216.53
7.3.170.0100.00716.56
7.3.160.0130.00316.92
7.2.330.0120.01216.89
7.2.320.0030.01516.70
7.2.310.0110.00616.92
7.2.300.0060.01216.64
7.2.290.0160.00916.59
7.2.00.0060.00319.76
7.1.100.0120.01218.48
7.1.70.0030.00617.56
7.1.60.0070.01719.50
7.1.50.0140.01816.90
7.1.00.0030.07722.48
7.0.200.0180.00315.06
7.0.140.0030.07021.95
7.0.60.0130.07319.96
7.0.50.0030.05317.87
7.0.40.0100.08320.06
7.0.30.0300.07720.20
7.0.20.0270.07720.02
7.0.10.0300.07020.14
7.0.00.0100.08720.03
5.6.280.0070.07021.13
5.6.210.0070.06020.56
5.6.200.0130.05018.18
5.6.190.0030.05720.34
5.6.180.0200.04320.55
5.6.170.0370.05720.45
5.6.160.0070.06020.50
5.6.150.0130.08318.09
5.6.140.0200.07018.12
5.6.130.0130.04718.11
5.6.120.0030.08721.14
5.6.110.0170.07021.00
5.6.100.0100.05720.97
5.6.90.0000.04720.96
5.6.80.0030.03720.50
5.6.70.0400.06720.27
5.5.350.0330.04720.41
5.5.340.0100.07317.98
5.5.330.0070.03720.36
5.5.320.0000.04320.21
5.5.310.0370.07020.51
5.5.300.0030.05317.91
5.5.290.0030.07717.95
5.5.280.0070.04720.75
5.5.270.0170.07320.78
5.5.260.0070.08020.88
5.5.250.0100.07320.66
5.5.240.0070.04020.26
5.4.450.0200.07019.14
5.4.440.0130.06019.61
5.4.430.0400.05719.58
5.4.420.0900.05719.48
5.4.410.0030.06318.88
5.4.400.0570.06318.54
5.4.390.0470.06318.63
5.4.380.0470.08018.71
5.4.370.0400.06018.72
5.4.360.0500.05718.68
5.4.350.0600.06318.50
5.4.340.0570.06718.63
5.4.320.0500.06318.67
5.4.310.0300.07018.74
5.4.300.0430.06018.63
5.4.290.0470.05318.49
5.4.280.0400.06018.51
5.4.270.0570.06318.49
5.4.260.0630.07018.51
5.4.250.0630.07318.71
5.4.240.0400.07718.58
5.4.230.0500.07018.76
5.4.220.0600.07318.57
5.4.210.0170.06018.67
5.4.200.0630.05316.52
5.4.190.0500.05018.70
5.4.180.0330.07318.69
5.4.170.0470.06018.76
5.4.160.0500.05018.70
5.4.150.0330.06718.56
5.4.140.0500.06716.24
5.4.130.0430.07016.08
5.4.120.0430.06316.25
5.4.110.0330.06316.32
5.4.100.0330.06316.17
5.4.90.0670.06016.26
5.4.80.0200.06716.05
5.4.70.0400.06316.23
5.4.60.0500.05316.29
5.4.50.0530.06016.19
5.4.40.0470.05016.22
5.4.30.0470.06316.13
5.4.20.0400.06016.08
5.4.10.0470.05016.31
5.4.00.0300.06715.61
5.3.290.0370.06314.60
5.3.280.0470.05314.66
5.3.270.0430.06714.59
5.3.260.0400.05314.65
5.3.250.0370.06014.56
5.3.240.0470.04714.52
5.3.230.0330.06014.57
5.3.220.0330.06714.48
5.3.210.0400.06014.54
5.3.200.0370.05314.55
5.3.190.0470.04714.48
5.3.180.0530.06014.63
5.3.170.0430.07014.47
5.3.160.0500.07714.63
5.3.150.0630.04714.63
5.3.140.0330.05714.47
5.3.130.0270.06714.49
5.3.120.0300.07014.52
5.3.110.0700.05014.50
5.3.100.0330.07014.02
5.3.90.0370.06714.02
5.3.80.0500.07713.94
5.3.70.0770.05714.05
5.3.60.0430.06314.10
5.3.50.0330.06013.93
5.3.40.0300.06313.86
5.3.30.0530.06013.90
5.3.20.0300.05713.66
5.3.10.0400.04713.66
5.3.00.0400.05313.75
5.2.170.0200.04711.20
5.2.160.0330.05011.19
5.2.150.0230.05011.07
5.2.140.0070.04711.13
5.2.130.0200.05311.07
5.2.120.0100.05011.26
5.2.110.0330.04311.09
5.2.100.0370.04711.09
5.2.90.0200.06711.17
5.2.80.0330.06311.13
5.2.70.0400.05011.08
5.2.60.0300.04011.08
5.2.50.0230.05311.05
5.2.40.0370.04311.04
5.2.30.0200.06011.02
5.2.20.0300.05310.92
5.2.10.0170.04711.00
5.2.00.0230.06310.77
5.1.60.0200.0409.98
5.1.50.0170.05310.03
5.1.40.0270.0339.96
5.1.30.0330.03310.45
5.1.20.0230.03710.41
5.1.10.0130.04310.14
5.1.00.0300.03310.11
5.0.50.0100.0308.53
5.0.40.0030.0378.39
5.0.30.0100.0508.28
5.0.20.0130.0408.22
5.0.10.0170.0338.29
5.0.00.0130.0538.14
4.4.90.0100.0335.96
4.4.80.0100.0305.91
4.4.70.0200.0235.90
4.4.60.0170.0275.94
4.4.50.0130.0205.84
4.4.40.0070.0475.96
4.4.30.0070.0335.93
4.4.20.0170.0276.01
4.4.10.0200.0305.93
4.4.00.0130.0475.89
4.3.110.0130.0305.84
4.3.100.0100.0305.84
4.3.90.0100.0235.82
4.3.80.0070.0405.92
4.3.70.0170.0205.83
4.3.60.0130.0205.83
4.3.50.0130.0275.86
4.3.40.0030.0435.74
4.3.30.0070.0234.66
4.3.20.0030.0304.52
4.3.10.0070.0234.49
4.3.00.0100.0136.67

preferences:
55.12 ms | 401 KiB | 5 Q