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]+:|\\\\|\/\/)))(\/?)/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.43
8.3.50.0110.00718.16
8.3.40.0040.01118.96
8.3.30.0070.00719.08
8.3.20.0050.00320.42
8.3.10.0000.00721.78
8.3.00.0030.00617.75
8.2.180.0070.00718.54
8.2.170.0110.00422.96
8.2.160.0070.00720.31
8.2.150.0150.00624.18
8.2.140.0030.00624.66
8.2.130.0050.00326.16
8.2.120.0000.00819.73
8.2.110.0060.00322.27
8.2.100.0090.00317.88
8.2.90.0070.00019.20
8.2.80.0060.00317.97
8.2.70.0050.00317.50
8.2.60.0080.00018.04
8.2.50.0000.00918.07
8.2.40.0050.00320.00
8.2.30.0000.00818.04
8.2.20.0050.00317.91
8.2.10.0040.00418.27
8.2.00.0050.00317.89
8.1.280.0150.00625.92
8.1.270.0080.00020.20
8.1.260.0080.00026.35
8.1.250.0030.00628.09
8.1.240.0000.01022.71
8.1.230.0030.00917.60
8.1.220.0060.00317.89
8.1.210.0030.00518.77
8.1.200.0040.00417.48
8.1.190.0050.00317.35
8.1.180.0080.00018.10
8.1.170.0060.00320.47
8.1.160.0000.00821.92
8.1.150.0000.00818.97
8.1.140.0030.00617.71
8.1.130.0050.00217.88
8.1.120.0040.00417.53
8.1.110.0050.00217.54
8.1.100.0000.00717.62
8.1.90.0040.00417.55
8.1.80.0000.00717.60
8.1.70.0070.00017.65
8.1.60.0040.00417.78
8.1.50.0030.00617.65
8.1.40.0050.00317.68
8.1.30.0080.00017.82
8.1.20.0000.00717.70
8.1.10.0070.00317.61
8.1.00.0060.00617.58
8.0.300.0020.00518.77
8.0.290.0040.00416.75
8.0.280.0040.00418.44
8.0.270.0070.00017.20
8.0.260.0060.00017.29
8.0.250.0030.00317.09
8.0.240.0070.00317.18
8.0.230.0040.00417.09
8.0.220.0040.00417.09
8.0.210.0000.00717.05
8.0.200.0030.00717.16
8.0.190.0040.00717.09
8.0.180.0040.00417.13
8.0.170.0040.00416.99
8.0.160.0040.00416.97
8.0.150.0040.00416.85
8.0.140.0000.00716.90
8.0.130.0020.00513.44
8.0.120.0040.00417.09
8.0.110.0050.00217.11
8.0.100.0030.00516.90
8.0.90.0080.00016.97
8.0.80.0090.00917.18
8.0.70.0050.00317.14
8.0.60.0000.00816.97
8.0.50.0040.00416.99
8.0.30.0100.01217.41
8.0.20.0110.01017.40
8.0.10.0040.00417.08
8.0.00.0030.01616.86
7.4.330.0020.00215.29
7.4.320.0060.00016.76
7.4.300.0030.00316.89
7.4.290.0000.00716.80
7.4.280.0040.00416.88
7.4.270.0070.00016.83
7.4.260.0000.00716.76
7.4.250.0070.00016.77
7.4.240.0050.00216.81
7.4.230.0000.00716.69
7.4.220.0070.01116.85
7.4.210.0070.01016.91
7.4.200.0000.00716.96
7.4.160.0120.00416.80
7.4.150.0140.00617.40
7.4.140.0100.01517.86
7.4.130.0100.01116.65
7.4.120.0110.00816.80
7.4.110.0120.00916.74
7.4.100.0090.00916.79
7.4.90.0070.01116.58
7.4.80.0150.00919.39
7.4.70.0070.01016.59
7.4.60.0100.00716.74
7.4.50.0050.00316.82
7.4.40.0050.01116.68
7.4.30.0160.00416.63
7.4.00.0030.01515.29
7.3.330.0030.00313.25
7.3.320.0090.00413.40
7.3.310.0030.00316.25
7.3.300.0000.00716.46
7.3.290.0090.00716.43
7.3.280.0100.00716.47
7.3.270.0090.00917.40
7.3.260.0150.00316.82
7.3.250.0160.00716.60
7.3.240.0160.00616.36
7.3.230.0190.02016.49
7.3.210.0100.00716.46
7.3.200.0100.01319.39
7.3.190.0080.00816.50
7.3.180.0130.00316.48
7.3.170.0130.01016.53
7.3.160.0060.01016.53
7.3.10.0090.00516.85
7.3.00.0060.00416.70
7.2.330.0110.00716.77
7.2.320.0140.00316.88
7.2.310.0100.01016.89
7.2.300.0180.00416.76
7.2.290.0070.01816.82
7.2.130.0110.00517.05
7.2.120.0080.00316.99
7.2.110.0060.00916.72
7.2.100.0060.00416.90
7.2.90.0090.00517.00
7.2.80.0070.00517.00
7.2.70.0110.00516.96
7.2.60.0040.00817.03
7.2.50.0050.00717.00
7.2.40.0040.00716.84
7.2.30.0080.00317.07
7.2.20.0050.01017.10
7.2.10.0020.01116.93
7.2.00.0040.00717.99
7.1.250.0070.00715.83
7.1.200.0040.00415.70
7.1.100.0070.01318.64
7.1.70.0030.01317.41
7.1.60.0060.01919.50
7.1.50.0160.01317.24
7.1.00.0100.07022.36
7.0.200.0100.00714.99
7.0.140.0000.07022.00
7.0.60.0070.04019.82
7.0.50.0100.08017.93
7.0.40.0200.07020.07
7.0.30.0470.05720.19
7.0.20.0270.06320.16
7.0.10.0200.07320.20
7.0.00.0070.08720.02
5.6.280.0030.07020.92
5.6.210.0070.06720.68
5.6.200.0100.08318.18
5.6.190.0030.09320.38
5.6.180.0330.06320.61
5.6.170.0100.05020.38
5.6.160.0000.05320.38
5.6.150.0030.05018.11
5.6.140.0100.07718.13
5.6.130.0000.06018.11
5.6.120.0030.04321.11
5.6.110.0070.08321.13
5.6.100.0200.07021.13
5.6.90.0030.09021.12
5.6.80.0070.03720.50
5.5.350.0270.06720.50
5.5.340.0000.04317.90
5.5.330.0000.04320.40
5.5.320.0070.08020.47
5.5.310.0300.04720.34
5.5.300.0070.08317.92
5.5.290.0030.08718.02
5.5.280.0100.06320.95
5.5.270.0030.07720.79
5.5.260.0130.05720.89
5.5.250.0070.08720.70
5.5.240.0100.08320.12
5.4.450.0230.04019.21
5.4.440.0030.05019.49
5.4.430.0000.06319.56
5.4.420.0000.04019.40
5.4.410.0030.07319.02
5.4.400.0030.07719.07
5.4.390.0030.08019.21
5.4.380.0070.05019.22
5.4.370.0070.05019.09
5.4.360.0100.07319.10
5.4.350.0030.07019.11
5.4.340.0030.05019.08
5.4.320.0030.05018.81
5.4.310.0130.03718.79
5.4.300.0000.04319.08
5.4.290.0030.03718.91
5.4.280.0030.08019.21
5.4.270.0000.06719.08
5.4.260.0070.07318.79
5.4.250.0030.03718.89
5.4.240.0000.03719.08
5.4.230.0030.04019.13
5.4.220.0000.03719.09
5.4.210.0000.03719.08
5.4.200.0000.04019.08
5.4.190.0000.03718.80
5.4.180.0000.03718.91
5.4.170.0000.03719.08
5.4.160.0030.03318.86
5.4.150.0000.03718.86
5.4.140.0000.04016.29
5.4.130.0000.03716.25
5.4.120.0030.04016.45
5.4.110.0030.03316.39
5.4.100.0030.03316.18
5.4.90.0030.03316.23
5.4.80.0030.04316.37
5.4.70.0000.03316.29
5.4.60.0000.03316.20
5.4.50.0000.04016.31
5.4.40.0130.03716.40
5.4.30.0000.03316.32
5.4.20.0000.03316.43
5.4.10.0000.03316.27
5.4.00.0000.03315.89
5.3.290.0070.08014.71
5.3.280.0000.04014.64
5.3.270.0030.03314.45
5.3.260.0030.03314.45
5.3.250.0070.03014.55
5.3.240.0000.04014.63
5.3.230.0000.03714.69
5.3.220.0000.03714.52
5.3.210.0000.04014.50
5.3.200.0000.04014.41
5.3.190.0030.04014.47
5.3.180.0000.03714.40
5.3.170.0030.03314.51
5.3.160.0000.03714.47
5.3.150.0030.03314.49
5.3.140.0030.03714.50
5.3.130.0000.04014.38
5.3.120.0030.03314.39
5.3.110.0000.03714.59
5.3.100.0170.02714.12
5.3.90.0000.03713.89
5.3.80.0000.03713.81
5.3.70.0030.03013.85
5.3.60.0000.03313.91
5.3.50.0030.03013.79
5.3.40.0000.03314.04
5.3.30.0000.03313.74
5.3.20.0000.03313.47
5.3.10.0030.06013.60
5.3.00.0000.07313.47
5.2.170.0000.03012.11
5.2.160.0000.02712.11
5.2.150.0030.02712.11
5.2.140.0030.02712.11
5.2.130.0030.03012.11
5.2.120.0000.03012.11
5.2.110.0000.04012.11
5.2.100.0000.03712.11
5.2.90.0030.04312.11
5.2.80.0070.03012.11
5.2.70.0000.05712.11
5.2.60.0030.04012.11
5.2.50.0000.05012.11
5.2.40.0070.03312.11
5.2.30.0000.06312.11
5.2.20.0000.06312.11
5.2.10.0030.04312.11
5.2.00.0000.03712.11
5.1.60.0070.02712.11
5.1.50.0070.04712.11
5.1.40.0030.05712.11
5.1.30.0070.04012.11
5.1.20.0070.03012.11
5.1.10.0030.04312.11
5.1.00.0070.04712.11
5.0.50.0070.02012.11
5.0.40.0100.04012.11
5.0.30.0070.03012.11
5.0.20.0000.02712.11
5.0.10.0000.02712.11
5.0.00.0070.04012.11
4.4.90.0030.01712.11
4.4.80.0030.02012.11
4.4.70.0000.04012.11
4.4.60.0000.03712.11
4.4.50.0070.03012.11
4.4.40.0000.03012.11
4.4.30.0000.03712.11
4.4.20.0000.03712.11
4.4.10.0000.03712.11
4.4.00.0000.02712.11
4.3.110.0030.02012.11
4.3.100.0000.01712.11
4.3.90.0030.03312.11
4.3.80.0100.03012.11
4.3.70.0000.02312.11
4.3.60.0000.03712.11
4.3.50.0000.02712.11
4.3.40.0000.05712.11
4.3.30.0070.03312.11
4.3.20.0030.03712.11
4.3.10.0000.03712.11
4.3.00.0030.03712.11

preferences:
45.2 ms | 400 KiB | 5 Q