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', '\\\\">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.70.0140.00318.55
8.3.60.0140.00718.43
8.3.50.0120.00722.00
8.3.40.0140.00019.00
8.3.30.0120.00318.87
8.3.20.0050.00320.16
8.3.10.0040.00421.88
8.3.00.0030.00519.51
8.2.190.0200.00016.88
8.2.180.0060.00916.63
8.2.170.0090.00622.96
8.2.160.0150.00020.47
8.2.150.0030.00624.18
8.2.140.0080.00424.66
8.2.130.0080.00026.16
8.2.120.0030.00519.36
8.2.110.0100.00019.45
8.2.100.0040.00817.88
8.2.90.0030.00519.08
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0080.00017.79
8.2.50.0040.00518.07
8.2.40.0030.00520.20
8.2.30.0040.00418.23
8.2.20.0040.00417.97
8.2.10.0090.00018.23
8.2.00.0060.00318.05
8.1.280.0060.01225.92
8.1.270.0080.00020.42
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.18
8.1.230.0090.00317.79
8.1.220.0000.00817.78
8.1.210.0000.00918.77
8.1.200.0040.00417.50
8.1.190.0000.00817.38
8.1.180.0030.00618.10
8.1.170.0030.00520.44
8.1.160.0050.00222.06
8.1.150.0050.00218.99
8.1.140.0040.00417.61
8.1.130.0030.00318.00
8.1.120.0040.00417.62
8.1.110.0040.00417.48
8.1.100.0000.00717.61
8.1.90.0040.00417.61
8.1.80.0000.00717.66
8.1.70.0030.00517.59
8.1.60.0090.00017.68
8.1.50.0040.00417.60
8.1.40.0030.00617.73
8.1.30.0040.00417.84
8.1.20.0060.00317.70
8.1.10.0030.00717.68
8.1.00.0030.00617.66
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0000.00718.45
8.0.270.0060.00317.36
8.0.260.0000.00717.22
8.0.250.0000.00817.16
8.0.240.0080.00017.02
8.0.230.0070.00017.11
8.0.220.0030.00417.16
8.0.210.0000.00717.07
8.0.200.0000.00816.99
8.0.190.0070.00317.11
8.0.180.0040.00417.14
8.0.170.0030.00516.98
8.0.160.0000.00817.17
8.0.150.0040.00416.99
8.0.140.0000.00717.07
8.0.130.0000.00813.52
8.0.120.0080.00016.98
8.0.110.0040.00416.96
8.0.100.0020.00517.11
8.0.90.0040.00417.09
8.0.80.0070.01017.19
8.0.70.0000.00817.04
8.0.60.0060.00317.16
8.0.50.0040.00417.13
8.0.30.0140.00817.26
8.0.20.0080.01217.40
8.0.10.0040.00417.23
8.0.00.0130.00417.05
7.4.330.0030.00315.11
7.4.320.0030.00316.80
7.4.300.0060.00016.87
7.4.290.0030.00316.78
7.4.280.0040.00416.89
7.4.270.0040.00416.82
7.4.260.0000.00716.80
7.4.250.0040.00416.76
7.4.240.0020.00516.80
7.4.230.0030.00316.86
7.4.220.0120.00916.70
7.4.210.0030.01216.75
7.4.200.0040.00416.97
7.4.160.0130.00316.80
7.4.150.0120.00617.40
7.4.140.0100.01317.86
7.4.130.0140.00416.74
7.4.120.0050.01316.78
7.4.110.0100.01316.83
7.4.100.0090.00916.75
7.4.90.0170.00816.54
7.4.80.0060.01519.39
7.4.70.0120.00416.92
7.4.60.0080.00816.76
7.4.50.0000.00716.69
7.4.40.0070.01016.81
7.4.30.0060.01216.61
7.4.00.0090.00614.95
7.3.330.0000.00613.25
7.3.320.0130.00013.16
7.3.310.0040.00416.38
7.3.300.0000.00716.23
7.3.290.0080.00716.48
7.3.280.0090.00916.41
7.3.270.0120.01217.40
7.3.260.0140.00716.77
7.3.250.0100.00716.56
7.3.240.0080.01216.86
7.3.230.0030.01516.58
7.3.210.0060.01216.81
7.3.200.0030.01419.39
7.3.190.0130.00316.49
7.3.180.0060.01016.40
7.3.170.0130.00616.38
7.3.160.0130.00316.70
7.2.330.0120.00616.93
7.2.320.0110.00616.70
7.2.310.0080.00916.77
7.2.300.0120.00616.66
7.2.290.0100.01316.74
7.2.00.0000.01319.53
7.1.100.0130.00618.13
7.1.70.0030.00617.15
7.1.60.0130.01319.50
7.1.50.0100.01617.16
7.1.00.0000.08022.34
7.0.200.0220.00315.11
7.0.140.0000.04022.11
7.0.60.0030.07319.91
7.0.50.0100.07317.94
7.0.40.0070.04720.33
7.0.30.0430.06320.06
7.0.20.0200.04020.21
7.0.10.0270.07720.18
7.0.00.0070.06020.34
5.6.280.0070.07021.09
5.6.210.0100.05720.69
5.6.200.0100.07718.22
5.6.190.0000.06020.27
5.6.180.0230.04020.58
5.6.170.0230.04020.67
5.6.160.0030.06020.54
5.6.150.0030.04318.14
5.6.140.0130.05718.07
5.6.130.0030.06018.16
5.6.120.0000.04721.11
5.6.110.0000.08721.13
5.6.100.0170.07320.98
5.6.90.0030.09021.01
5.6.80.0070.03720.42
5.6.70.0330.06020.37
5.5.350.0370.07020.38
5.5.340.0070.05718.02
5.5.330.0030.04020.28
5.5.320.0000.05320.21
5.5.310.0270.04020.50
5.5.300.0070.07317.87
5.5.290.0070.05017.96
5.5.280.0070.08320.90
5.5.270.0130.07720.87
5.5.260.0100.04320.79
5.5.250.0070.05720.50
5.5.240.0130.06720.35
5.4.450.0300.04319.25
5.4.440.0900.05019.48
5.4.430.0870.05319.48
5.4.420.0800.04719.51
5.4.410.0130.05018.79
5.4.400.0400.06318.77
5.4.390.0430.04718.59
5.4.380.0330.06018.63
5.4.370.0370.06018.45
5.4.360.0570.05718.50
5.4.350.0400.06318.46
5.4.340.0400.06018.49
5.4.320.0400.05018.77
5.4.310.0330.06718.50
5.4.300.0370.06318.79
5.4.290.0400.06318.63
5.4.280.0530.05718.71
5.4.270.0400.07718.49
5.4.260.0430.05718.52
5.4.250.0300.07018.46
5.4.240.0470.06718.55
5.4.230.0470.06718.62
5.4.220.0400.05318.76
5.4.210.0470.05018.51
5.4.200.0330.08016.48
5.4.190.0600.05718.59
5.4.180.0370.06318.48
5.4.170.0330.06718.75
5.4.160.0470.06718.71
5.4.150.1430.05318.71
5.4.140.0430.05316.21
5.4.130.0270.06716.09
5.4.120.0370.05016.23
5.4.110.0270.06016.31
5.4.100.0400.04716.24
5.4.90.0330.05316.36
5.4.80.1930.06316.11
5.4.70.0500.05016.02
5.4.60.0570.05716.03
5.4.50.0500.05716.21
5.4.40.0400.07016.04
5.4.30.0370.05016.23
5.4.20.0330.06716.19
5.4.10.0400.04716.05
5.4.00.0370.05715.60
5.3.290.0330.06714.84
5.3.280.0470.04714.59
5.3.270.0530.06014.55
5.3.260.0400.06014.61
5.3.250.0330.05314.52
5.3.240.0370.07014.59
5.3.230.0370.05314.55
5.3.220.0330.04714.54
5.3.210.0330.06014.64
5.3.200.0300.05714.48
5.3.190.0370.06314.57
5.3.180.1670.04014.48
5.3.170.0330.06314.61
5.3.160.0470.06314.53
5.3.150.0400.05714.54
5.3.140.1570.05014.54
5.3.130.0330.05714.58
5.3.120.0400.05714.51
5.3.110.0330.06014.47
5.3.100.2130.07714.05
5.3.90.0370.07714.12
5.3.80.0430.06314.01
5.3.70.0370.05013.93
5.3.60.0330.07013.99
5.3.50.0400.05013.90
5.3.40.0400.05313.86
5.3.30.0570.08713.84
5.3.20.0270.07313.72
5.3.10.0370.05313.58
5.3.00.0500.05013.62
5.2.170.0370.05311.20
5.2.160.0300.05311.18
5.2.150.0430.03311.12
5.2.140.0370.05311.16
5.2.130.0300.04311.12
5.2.120.0470.04011.05
5.2.110.0470.05311.13
5.2.100.0430.04311.14
5.2.90.0270.05311.14
5.2.80.0270.05011.07
5.2.70.0330.05311.16
5.2.60.0370.04311.08
5.2.50.0270.05711.23
5.2.40.0400.04311.07
5.2.30.0270.09010.95
5.2.20.0200.04010.93
5.2.10.1370.04010.91
5.2.00.0270.05310.73
5.1.60.0330.03710.04
5.1.50.0270.03710.03
5.1.40.1300.0479.95
5.1.30.0270.03710.38
5.1.20.0230.03710.45
5.1.10.0300.04010.12
5.1.00.0230.04010.09
5.0.50.0170.0278.57
5.0.40.0200.0238.57
5.0.30.0130.0508.26
5.0.20.0100.0338.29
5.0.10.0100.0338.36
5.0.00.0200.0378.29
4.4.90.0100.0235.94
4.4.80.0100.0235.88
4.4.70.0070.0275.88
4.4.60.0130.0235.94
4.4.50.0100.0235.91
4.4.40.0100.0435.82
4.4.30.0170.0205.91
4.4.20.0130.0305.96
4.4.10.0130.0335.97
4.4.00.0100.0505.90
4.3.110.0130.0235.80
4.3.100.0100.0235.86
4.3.90.0130.0205.89
4.3.80.0130.0305.80
4.3.70.0130.0235.89
4.3.60.0230.0105.87
4.3.50.0100.0235.77
4.3.40.0170.0335.88
4.3.30.0170.0175.75
4.3.20.0000.0335.75
4.3.10.0030.0275.75
4.3.00.0000.0236.67

preferences:
51.14 ms | 401 KiB | 5 Q