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', '\\\\hostname\\xyz\\Informatiker.mp4"> bs bs', '&#92;&#92;hostname&#92;xyz&#92;Informatiker.mp4"> BS2', '\\\\">2x Bw slash', 'file://">file', 'relative/path">relative/path' ); $replacements = array('/((?:href|src) *= *[\'"](?!(http|ftp|mailto|file|javascript|#|[a-z]+:|\\\\|\/\/)))(\/?)/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.0140.00718.68
8.3.50.0130.00622.10
8.3.40.0150.00018.84
8.3.30.0120.00319.16
8.3.20.0080.00020.07
8.3.10.0080.00021.90
8.3.00.0030.00519.51
8.2.180.0180.00317.00
8.2.170.0120.00922.96
8.2.160.0140.00019.31
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0000.00726.16
8.2.120.0030.00619.61
8.2.110.0100.00019.30
8.2.100.0060.00617.75
8.2.90.0080.00019.35
8.2.80.0050.00317.97
8.2.70.0000.00917.63
8.2.60.0060.00317.80
8.2.50.0040.00418.07
8.2.40.0030.00620.01
8.2.30.0000.00818.25
8.2.20.0040.00418.04
8.2.10.0000.00818.37
8.2.00.0030.00618.05
8.1.280.0090.00925.92
8.1.270.0000.00820.12
8.1.260.0050.00326.35
8.1.250.0020.00528.09
8.1.240.0100.00022.05
8.1.230.0090.00317.76
8.1.220.0030.00617.77
8.1.210.0040.00418.77
8.1.200.0060.00317.38
8.1.190.0000.00917.38
8.1.180.0030.00518.10
8.1.170.0090.00020.56
8.1.160.0080.00022.07
8.1.150.0000.00718.99
8.1.140.0040.00417.69
8.1.130.0030.00317.84
8.1.120.0030.00617.67
8.1.110.0050.00217.62
8.1.100.0030.00617.64
8.1.90.0000.00817.63
8.1.80.0030.00517.54
8.1.70.0000.00717.64
8.1.60.0030.00617.64
8.1.50.0000.00817.60
8.1.40.0000.01017.59
8.1.30.0000.00817.81
8.1.20.0040.00417.82
8.1.10.0040.00817.59
8.1.00.0080.00417.65
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0070.00018.49
8.0.270.0000.00817.30
8.0.260.0000.00617.22
8.0.250.0030.00317.14
8.0.240.0090.00017.14
8.0.230.0030.00617.09
8.0.220.0000.00717.17
8.0.210.0000.00717.03
8.0.200.0000.01017.12
8.0.190.0000.01017.05
8.0.180.0040.00417.14
8.0.170.0040.00417.01
8.0.160.0040.00417.03
8.0.150.0040.00417.07
8.0.140.0040.00417.02
8.0.130.0000.00713.50
8.0.120.0040.00417.09
8.0.110.0000.00817.02
8.0.100.0000.00817.14
8.0.90.0040.00417.03
8.0.80.0130.00317.05
8.0.70.0050.00317.07
8.0.60.0050.00317.20
8.0.50.0000.00816.99
8.0.30.0180.00716.97
8.0.20.0140.00817.40
8.0.10.0040.00417.12
8.0.00.0100.00816.93
7.4.330.0000.00515.23
7.4.320.0030.00316.70
7.4.300.0000.00716.89
7.4.290.0030.00516.87
7.4.280.0030.00516.79
7.4.270.0000.00816.78
7.4.260.0070.00016.64
7.4.250.0030.00516.69
7.4.240.0040.00316.84
7.4.230.0000.00716.70
7.4.220.0160.00716.91
7.4.210.0060.00916.91
7.4.200.0030.00316.99
7.4.160.0040.01216.69
7.4.150.0130.00717.40
7.4.140.0110.00917.86
7.4.130.0140.00816.68
7.4.120.0130.00516.84
7.4.110.0090.00916.83
7.4.100.0090.00916.91
7.4.90.0090.00916.63
7.4.80.0110.00819.39
7.4.70.0120.00816.85
7.4.60.0090.01016.64
7.4.50.0000.00916.85
7.4.40.0110.00516.83
7.4.30.0100.01016.59
7.4.00.0090.00815.12
7.3.330.0030.00313.23
7.3.320.0140.00013.25
7.3.310.0040.00416.44
7.3.300.0080.00016.47
7.3.290.0100.00616.42
7.3.280.0070.01116.44
7.3.270.0070.01117.40
7.3.260.0150.00316.48
7.3.250.0090.01216.46
7.3.240.0090.00916.87
7.3.230.0120.00816.70
7.3.210.0120.00716.45
7.3.200.0090.01319.39
7.3.190.0090.00616.37
7.3.180.0060.01016.32
7.3.170.0140.01016.85
7.3.160.0080.00816.41
7.3.120.0100.01014.43
7.3.110.0140.00715.04
7.3.100.0070.00715.24
7.3.90.0050.00514.86
7.3.80.0060.00914.96
7.3.70.0060.00615.16
7.3.60.0080.00814.87
7.3.50.0120.00315.12
7.3.40.0030.01314.65
7.3.30.0040.01114.80
7.3.20.0040.01117.04
7.3.10.0040.00916.80
7.3.00.0050.01116.53
7.2.330.0120.00916.74
7.2.320.0030.01316.66
7.2.310.0070.01016.83
7.2.300.0150.00316.79
7.2.290.0130.01016.84
7.2.250.0000.01915.01
7.2.240.0100.00715.39
7.2.230.0070.01315.21
7.2.220.0090.00615.27
7.2.210.0070.00714.95
7.2.200.0000.01515.15
7.2.190.0070.00714.93
7.2.180.0030.00815.34
7.2.170.0030.01215.12
7.2.130.0100.00317.03
7.2.120.0060.00917.01
7.2.110.0030.00917.11
7.2.100.0070.00717.00
7.2.90.0080.00417.16
7.2.80.0080.00317.11
7.2.70.0060.00317.13
7.2.60.0000.01516.70
7.2.50.0000.01616.78
7.2.40.0060.00917.21
7.2.30.0050.00516.86
7.2.20.0030.00716.99
7.2.10.0030.00717.18
7.2.00.0060.00418.25
7.1.330.0110.00415.95
7.1.320.0060.00916.00
7.1.310.0070.00715.77
7.1.300.0030.01115.93
7.1.290.0040.01115.70
7.1.280.0070.00716.18
7.1.270.0100.01015.98
7.1.260.0130.00615.95
7.1.250.0040.01216.01
7.1.100.0080.00818.41
7.1.70.0070.01017.31
7.1.60.0120.00017.59
7.1.50.0160.00616.90
7.1.00.0000.08022.39
7.0.200.0070.00716.79
7.0.140.0070.03021.95
7.0.110.0100.04019.94
7.0.100.0100.03720.10
7.0.90.0100.04320.04
7.0.80.0130.06719.90
7.0.70.0170.07719.91
7.0.60.0030.08019.96
7.0.50.0100.08019.96
7.0.40.0030.04719.66
7.0.30.0200.07019.75
7.0.20.0170.07019.84
7.0.10.0030.05319.83
7.0.00.0070.05019.73
5.6.280.0030.04321.04
5.6.260.0130.06720.68
5.6.250.0100.04720.59
5.6.240.0030.04320.47
5.6.230.0030.07720.69
5.6.220.0030.09020.68
5.6.210.0170.07320.68
5.6.200.0170.06720.66
5.6.190.0130.07320.86
5.6.180.0130.07020.59
5.6.170.0070.04720.70
5.6.160.0070.06720.59
5.6.150.0030.08320.70
5.6.140.0200.07320.52
5.6.130.0100.06020.61
5.6.120.0100.05020.55
5.6.110.0070.08320.55
5.6.100.0130.07020.67
5.6.90.0130.05720.70
5.6.80.0100.06720.04
5.6.70.0070.08020.00
5.6.60.0100.07020.07
5.6.50.0100.07320.00
5.6.40.0100.07719.91
5.6.30.0100.07020.00
5.6.20.0100.08019.98
5.6.10.0030.04320.06
5.6.00.0070.05019.91
5.5.380.0070.04720.52
5.5.370.0130.07320.41
5.5.360.0030.09020.50
5.5.350.0170.07320.46
5.5.340.0170.07720.80
5.5.330.0070.08020.81
5.5.320.0200.07021.03
5.5.310.0130.06720.79
5.5.300.0100.07720.91
5.5.290.0070.09020.78
5.5.280.0100.07320.95
5.5.270.0200.07020.96
5.5.260.0130.07320.79
5.5.250.0070.08020.69
5.5.240.0000.08020.13
5.5.230.0030.08720.34
5.5.220.0070.06020.36
5.5.210.0070.08020.22
5.5.200.0130.07020.36
5.5.190.0100.07320.38
5.5.180.0070.06320.02
5.5.160.0000.08020.21
5.5.150.0000.05020.32
5.5.140.0070.03720.05
5.5.130.0170.06020.25
5.5.120.0100.07320.20
5.5.110.0100.05720.05
5.5.100.0030.08020.05
5.5.90.0100.07320.04
5.5.80.0100.06320.07
5.5.70.0070.05020.20
5.5.60.0070.08020.13
5.5.50.0070.07319.96
5.5.40.0100.06320.21
5.5.30.0100.06720.08
5.5.20.0170.07020.22
5.5.10.0100.08020.11
5.5.00.0070.06720.12
5.4.450.0030.08019.34
5.4.440.0030.08019.60
5.4.430.0100.07019.42
5.4.420.0100.07019.44
5.4.410.0130.06319.22
5.4.400.0030.08019.03
5.4.390.0170.06019.18
5.4.380.0130.07018.95
5.4.370.0100.07718.95
5.4.360.0070.07018.95
5.4.350.0130.06719.16
5.4.340.0000.08319.27
5.4.320.0130.04019.02
5.4.310.0100.06719.12
5.4.300.0030.07719.02
5.4.290.0070.06319.16
5.4.280.0070.03719.16
5.4.270.0000.07718.98
5.4.260.0100.06319.11
5.4.250.0130.05718.99
5.4.240.0070.07019.17
5.4.230.0070.06719.07
5.4.220.0070.05019.07
5.4.210.0130.07319.02
5.4.200.0030.06318.98
5.4.190.0070.08018.92
5.4.180.0070.07719.09
5.4.170.0170.07018.91
5.4.160.0100.07318.93
5.4.150.0000.08019.08
5.4.140.0100.04016.16
5.4.130.0170.02716.16
5.4.120.0000.07316.44
5.4.110.0070.07316.23
5.4.100.0030.06716.19
5.4.90.0070.07316.28
5.4.80.0000.07016.36
5.4.70.0070.04716.39
5.4.60.0070.06716.50
5.4.50.0100.07016.48
5.4.40.0070.07016.40
5.4.30.0130.06316.10
5.4.20.0100.07016.46
5.4.10.0070.07016.35
5.4.00.0100.04015.79
5.3.290.0070.04314.61
5.3.280.0070.07714.63
5.3.270.0030.08714.55
5.3.260.0100.07014.46
5.3.250.0100.07314.63
5.3.240.0030.07714.55
5.3.230.0070.04314.48
5.3.220.0070.07714.36
5.3.210.0000.08314.66
5.3.200.0000.08314.51
5.3.190.0070.05714.45
5.3.180.0070.07014.50
5.3.170.0030.04314.57
5.3.160.0130.06714.64
5.3.150.0130.07314.56
5.3.140.0100.07714.40
5.3.130.0100.07014.47
5.3.120.0070.05714.43
5.3.110.0070.07014.58
5.3.100.0030.07014.14
5.3.90.0030.07314.03
5.3.80.0000.05013.97
5.3.70.0070.07313.84
5.3.60.0100.07013.95
5.3.50.0030.08013.81
5.3.40.0130.06713.88
5.3.30.0000.07313.80
5.3.20.0100.06713.58
5.3.10.0200.06013.67
5.3.00.0070.07013.66
5.2.170.0170.04011.87
5.2.160.0030.05711.87
5.2.150.0030.05711.87
5.2.140.0070.06011.87
5.2.130.0070.06311.87
5.2.120.0070.05711.87
5.2.110.0030.05311.87
5.2.100.0030.06011.87
5.2.90.0100.06011.87
5.2.80.0030.04011.87
5.2.70.0000.05011.87
5.2.60.0030.06711.87
5.2.50.0070.04711.87
5.2.40.0100.04011.87
5.2.30.0030.06311.87
5.2.20.0070.06311.87
5.2.10.0030.06011.87
5.2.00.0130.05311.87
5.1.60.0070.05011.87
5.1.50.0070.04711.87
5.1.40.0100.05011.87
5.1.30.0070.06311.87
5.1.20.0000.03711.87
5.1.10.0070.05011.87
5.1.00.0030.03311.87
5.0.50.0130.01311.87
5.0.40.0030.04311.87
5.0.30.0070.06011.87
5.0.20.0000.04011.87
5.0.10.0030.03711.87
5.0.00.0000.05711.87
4.4.90.0000.03711.87
4.4.80.0030.03711.87
4.4.70.0000.03711.87
4.4.60.0070.03011.87
4.4.50.0000.03711.87
4.4.40.0030.05311.87
4.4.30.0030.03711.87
4.4.20.0000.03711.87
4.4.10.0000.03011.87
4.4.00.0030.04711.87
4.3.110.0070.03011.87
4.3.100.0070.03011.87
4.3.90.0030.01711.87
4.3.80.0070.05011.87
4.3.70.0070.03011.87
4.3.60.0030.03011.87
4.3.50.0000.03311.87
4.3.40.0030.03711.87
4.3.30.0000.04011.87
4.3.20.0030.01711.87
4.3.10.0000.03011.87
4.3.00.0000.03711.87

preferences:
50.03 ms | 401 KiB | 5 Q