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]+:|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.0110.00416.61
8.3.50.0070.00718.35
8.3.40.0080.00818.96
8.3.30.0040.01119.09
8.3.20.0040.00420.33
8.3.10.0060.00321.77
8.3.00.0080.00019.51
8.2.180.0070.00716.63
8.2.170.0090.00622.96
8.2.160.0070.00720.38
8.2.150.0030.00624.18
8.2.140.0080.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00019.38
8.2.110.0110.00019.24
8.2.100.0090.00317.75
8.2.90.0030.00519.36
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0090.00017.80
8.2.50.0050.00318.07
8.2.40.0030.00618.28
8.2.30.0000.00818.20
8.2.20.0040.00417.98
8.2.10.0030.00518.30
8.2.00.0030.00618.05
8.1.280.0030.02125.92
8.1.270.0050.00320.28
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0030.00722.14
8.1.230.0120.00019.43
8.1.220.0060.00317.77
8.1.210.0000.00818.77
8.1.200.0040.00417.48
8.1.190.0040.00417.47
8.1.180.0040.00418.10
8.1.170.0030.00520.46
8.1.160.0070.00022.13
8.1.150.0040.00419.00
8.1.140.0040.00417.58
8.1.130.0000.00717.84
8.1.120.0050.00217.69
8.1.110.0040.00417.52
8.1.100.0040.00417.66
8.1.90.0040.00417.66
8.1.80.0030.00517.63
8.1.70.0000.00817.65
8.1.60.0030.00617.66
8.1.50.0060.00317.77
8.1.40.0000.00817.58
8.1.30.0000.00817.68
8.1.20.0040.00417.72
8.1.10.0100.00017.59
8.1.00.0100.00017.60
8.0.300.0060.00318.77
8.0.290.0050.00216.88
8.0.280.0040.00318.41
8.0.270.0000.00717.22
8.0.260.0030.00317.26
8.0.250.0000.00717.13
8.0.240.0090.00017.13
8.0.230.0080.00017.08
8.0.220.0070.00017.06
8.0.210.0030.00316.98
8.0.200.0040.00417.01
8.0.190.0000.01117.00
8.0.180.0020.00517.01
8.0.170.0000.00717.09
8.0.160.0040.00416.98
8.0.150.0080.00017.07
8.0.140.0090.00016.92
8.0.130.0030.00313.49
8.0.120.0050.00217.14
8.0.110.0000.00817.13
8.0.100.0000.00816.95
8.0.90.0000.00717.08
8.0.80.0090.01217.12
8.0.70.0000.00817.00
8.0.60.0030.00617.12
8.0.50.0000.00716.98
8.0.30.0130.00817.34
8.0.20.0170.00517.40
8.0.10.0000.00817.29
8.0.00.0120.00516.98
7.4.330.0060.00015.06
7.4.320.0030.00316.95
7.4.300.0000.00716.95
7.4.290.0040.00416.82
7.4.280.0030.00516.91
7.4.270.0070.00016.82
7.4.260.0040.00416.79
7.4.250.0050.00216.84
7.4.240.0050.00216.82
7.4.230.0000.00717.00
7.4.220.0150.00816.77
7.4.210.0100.01016.84
7.4.200.0050.00217.00
7.4.160.0040.01216.65
7.4.150.0110.00817.40
7.4.140.0160.00717.86
7.4.130.0070.01416.71
7.4.120.0090.00916.75
7.4.110.0170.00716.65
7.4.100.0090.00916.57
7.4.90.0180.00416.62
7.4.80.0130.01019.39
7.4.70.0070.01016.70
7.4.60.0060.01616.75
7.4.50.0000.00716.71
7.4.40.0090.00816.82
7.4.30.0120.01016.82
7.4.00.0100.00615.39
7.3.330.0030.00313.25
7.3.320.0090.00413.22
7.3.310.0080.00016.57
7.3.300.0070.00016.40
7.3.290.0080.00816.46
7.3.280.0090.00916.40
7.3.270.0130.00517.40
7.3.260.0090.00916.46
7.3.250.0140.00316.41
7.3.240.0120.00616.47
7.3.230.0170.00316.39
7.3.210.0140.00416.69
7.3.200.0080.00819.39
7.3.190.0060.00916.55
7.3.180.0070.01016.49
7.3.170.0060.01116.81
7.3.160.0040.01216.76
7.3.10.0130.01016.56
7.3.00.0220.00716.44
7.2.330.0090.00916.76
7.2.320.0110.01116.81
7.2.310.0100.00616.63
7.2.300.0080.00816.83
7.2.290.0140.01116.70
7.2.130.0150.00716.66
7.2.120.0120.01016.80
7.2.110.0190.00616.80
7.2.100.0180.00716.46
7.2.90.0270.00316.57
7.2.80.0200.00616.63
7.2.70.0110.01916.86
7.2.60.0100.01016.81
7.2.50.0110.01116.64
7.2.40.0160.00816.46
7.2.30.0170.00516.68
7.2.20.0100.01016.62
7.2.10.0130.01116.64
7.2.00.0080.01118.24
7.1.250.0230.00315.82
7.1.100.0080.00418.40
7.1.70.0050.00317.49
7.1.60.0070.01719.50
7.1.50.0100.01416.89
7.1.00.0070.07022.36
7.0.200.0130.00615.09
7.0.140.0100.07022.07
7.0.60.0170.03320.01
7.0.50.0030.08317.84
7.0.40.0070.08720.06
7.0.30.0300.04720.07
7.0.20.0300.07320.23
7.0.10.0270.09020.11
7.0.00.0070.09020.14
5.6.280.0000.07320.89
5.6.210.0270.05020.52
5.6.200.0070.07018.18
5.6.190.0030.06020.31
5.6.180.0330.07720.61
5.6.170.0300.04020.41
5.6.160.0130.04720.48
5.6.150.0070.05018.08
5.6.140.0130.07318.09
5.6.130.0070.08318.18
5.6.120.0170.05721.02
5.6.110.0170.06721.09
5.6.100.0100.07721.04
5.6.90.0000.09320.96
5.6.80.0030.04020.39
5.6.70.0470.06320.34
5.5.350.0300.07720.40
5.5.340.0030.05717.92
5.5.330.0030.04020.23
5.5.320.0130.07320.41
5.5.310.0200.05320.27
5.5.300.0070.07717.91
5.5.290.0000.07017.91
5.5.280.0200.07020.65
5.5.270.0030.06320.79
5.5.260.0230.06720.84
5.5.250.0030.06020.58
5.5.240.0000.07020.37
5.4.450.0670.06319.54
5.4.440.1000.04319.47
5.4.430.0930.05319.55
5.4.420.0170.05019.23
5.4.410.0070.05718.81
5.4.400.0370.05718.69
5.4.390.0300.06318.68
5.4.380.0330.06018.68
5.4.370.1730.06318.56
5.4.360.0400.05318.47
5.4.350.0500.05718.59
5.4.340.0370.06018.63
5.4.320.0300.08018.52
5.4.310.0330.05718.77
5.4.300.0330.05718.72
5.4.290.0300.06018.48
5.4.280.0430.06018.59
5.4.270.0470.06018.67
5.4.260.0300.05718.64
5.4.250.1400.06018.52
5.4.240.0370.05718.70
5.4.230.0330.05318.61
5.4.220.0270.06018.70
5.4.210.0370.05018.70
5.4.200.0300.06016.55
5.4.190.0400.05018.48
5.4.180.0370.05018.70
5.4.170.0430.04718.70
5.4.160.1300.05718.56
5.4.150.0430.05718.56
5.4.140.0330.06716.16
5.4.130.0570.04016.37
5.4.120.0270.05316.20
5.4.110.0230.06316.19
5.4.100.0370.05716.10
5.4.90.0500.05316.21
5.4.80.1370.05716.33
5.4.70.0400.05716.02
5.4.60.0330.06316.14
5.4.50.0370.05316.09
5.4.40.0330.05016.29
5.4.30.0370.05716.21
5.4.20.0230.06016.05
5.4.10.0400.05316.32
5.4.00.0370.04715.59
5.3.290.0470.06014.61
5.3.280.0430.06014.53
5.3.270.0400.06714.66
5.3.260.0370.06014.61
5.3.250.0330.05714.56
5.3.240.0330.05314.57
5.3.230.0400.06014.55
5.3.220.0500.06314.61
5.3.210.0370.07014.64
5.3.200.0430.05014.67
5.3.190.0500.05014.60
5.3.180.0430.08314.49
5.3.170.1370.06014.52
5.3.160.0400.05014.56
5.3.150.0400.04714.52
5.3.140.0400.07314.52
5.3.130.2070.07714.54
5.3.120.0500.07014.46
5.3.110.0470.07014.62
5.3.100.2170.07014.08
5.3.90.0500.06314.05
5.3.80.0330.05713.95
5.3.70.1400.05313.99
5.3.60.0300.06713.98
5.3.50.0330.05713.88
5.3.40.0300.05713.94
5.3.30.0270.06013.84
5.3.20.0430.04313.64
5.3.10.0300.05313.69
5.3.00.0370.05013.63
5.2.170.0170.05311.21
5.2.160.0170.05311.13
5.2.150.0470.03011.20
5.2.140.0430.04311.17
5.2.130.0200.04711.09
5.2.120.0200.05011.05
5.2.110.0330.04011.14
5.2.100.0270.04011.16
5.2.90.0330.03711.13
5.2.80.0230.04711.08
5.2.70.0270.04711.15
5.2.60.0300.04711.02
5.2.50.0270.06011.08
5.2.40.0230.03711.02
5.2.30.0370.04011.03
5.2.20.0270.05711.00
5.2.10.0270.04310.86
5.2.00.1130.04710.69
5.1.60.0230.03710.02
5.1.50.0300.03710.12
5.1.40.1230.03310.00
5.1.30.0270.03310.47
5.1.20.0200.04010.42
5.1.10.0300.02710.11
5.1.00.0170.04010.11
5.0.50.0100.0378.68
5.0.40.0930.0338.48
5.0.30.0170.0438.27
5.0.20.0200.0238.31
5.0.10.0130.0308.27
5.0.00.0200.0338.15
4.4.90.1100.0205.93
4.4.80.0130.0235.90
4.4.70.0100.0275.91
4.4.60.0170.0235.88
4.4.50.0170.0235.83
4.4.40.0100.0475.95
4.4.30.0170.0175.93
4.4.20.0100.0305.96
4.4.10.1170.0275.93
4.4.00.0070.0475.91
4.3.110.0100.0305.84
4.3.100.0130.0275.83
4.3.90.0100.0235.87
4.3.80.0130.0335.80
4.3.70.0130.0205.83
4.3.60.0130.0205.90
4.3.50.0130.0305.91
4.3.40.1470.0475.84
4.3.30.0130.0235.75
4.3.20.0030.0235.75
4.3.10.0030.0235.75
4.3.00.0100.0236.73

preferences:
45.97 ms | 400 KiB | 5 Q