3v4l.org

run code in 300+ PHP versions simultaneously
<?php function convert($url) { return preg_replace('#:\/\/([^.]*\.)?'.preg_quote('mydomain.tld').'#', '://example.dev', $url); } var_dump(convert('http://haha.com/ferfe')); var_dump(convert('https://haha.com/ferfe')); var_dump(convert('http://foo.haha.com/ferfe')); var_dump(convert('https://foo.haha.com/ferfe'));

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.01116.50
8.3.50.0140.00722.00
8.3.40.0120.00318.76
8.3.30.0040.01119.09
8.3.20.0040.00420.33
8.3.10.0040.00421.79
8.3.00.0080.00020.77
8.2.180.0120.00318.28
8.2.170.0100.01022.96
8.2.160.0100.00322.38
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0060.00317.65
8.2.110.0100.01321.03
8.2.100.0080.00317.91
8.2.90.0040.00419.13
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0040.00417.80
8.2.50.0040.00718.07
8.2.40.0080.00019.94
8.2.30.0040.00418.03
8.2.20.0080.00017.77
8.2.10.0040.00418.08
8.2.00.0050.00217.77
8.1.280.0140.00625.92
8.1.270.0000.00824.66
8.1.260.0000.00926.35
8.1.250.0050.00328.09
8.1.240.0040.00419.09
8.1.230.0000.01119.15
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.38
8.1.190.0050.00317.22
8.1.180.0000.00818.10
8.1.170.0030.00518.69
8.1.160.0040.00422.04
8.1.150.0070.00318.81
8.1.140.0040.00419.34
8.1.130.0070.00017.71
8.1.120.0050.00317.54
8.1.110.0050.00217.54
8.1.100.0040.00417.55
8.1.90.0050.00217.42
8.1.80.0040.00417.51
8.1.70.0000.00717.63
8.1.60.0040.00417.69
8.1.50.0040.00417.63
8.1.40.0080.00017.50
8.1.30.0000.00817.66
8.1.20.0040.00417.71
8.1.10.0030.00517.57
8.1.00.0040.00417.50
8.0.300.0070.00018.77
8.0.290.0040.00416.88
8.0.280.0080.00018.42
8.0.270.0040.00417.16
8.0.260.0000.00617.22
8.0.250.0030.00316.98
8.0.240.0000.00717.11
8.0.230.0000.00717.03
8.0.220.0030.00317.00
8.0.210.0050.00217.04
8.0.200.0030.00316.96
8.0.190.0030.00517.00
8.0.180.0000.00716.99
8.0.170.0080.00016.95
8.0.160.0000.00717.00
8.0.150.0000.00716.96
8.0.140.0030.00616.96
8.0.130.0000.00713.45
8.0.120.0040.00416.95
8.0.110.0000.00717.04
8.0.100.0030.00416.92
8.0.90.0040.00417.04
8.0.80.0150.00716.87
8.0.70.0040.00416.81
8.0.60.0050.00216.81
8.0.50.0000.00716.73
8.0.30.0120.01217.40
8.0.20.0100.00917.40
8.0.10.0030.00517.10
8.0.00.0070.01316.79
7.4.330.0030.00315.03
7.4.320.0000.00616.68
7.4.300.0040.00416.64
7.4.290.0040.00416.78
7.4.280.0110.00016.75
7.4.270.0070.00016.67
7.4.260.0030.00316.74
7.4.250.0050.00216.64
7.4.240.0040.00316.68
7.4.230.0000.00716.54
7.4.220.0110.00716.64
7.4.210.0110.00616.69
7.4.200.0050.00216.77
7.4.160.0140.00816.55
7.4.150.0200.00717.40
7.4.140.0100.00917.86
7.4.130.0080.00916.80
7.4.120.0070.01016.72
7.4.110.0160.00616.82
7.4.100.0160.00316.65
7.4.90.0110.00616.81
7.4.80.0070.01519.39
7.4.70.0040.01816.48
7.4.60.0120.00316.71
7.4.50.0000.00716.55
7.4.40.0110.00816.71
7.4.30.0170.01116.72
7.4.00.0070.01015.32
7.3.330.0000.00613.24
7.3.320.0000.00513.32
7.3.310.0030.00316.23
7.3.300.0000.00716.32
7.3.290.0080.00616.38
7.3.280.0140.00416.37
7.3.270.0150.01217.40
7.3.260.0090.00916.41
7.3.250.0100.01016.46
7.3.240.0040.01416.42
7.3.230.0070.01016.71
7.3.210.0100.00616.60
7.3.200.0000.01619.39
7.3.190.0060.01216.42
7.3.180.0060.00916.48
7.3.170.0080.01116.60
7.3.160.0060.00916.61
7.3.120.0070.01115.28
7.3.110.0030.01615.28
7.3.100.0080.00615.28
7.3.90.0030.01015.28
7.3.80.0110.00315.28
7.3.70.0100.00615.28
7.3.60.0000.01415.28
7.3.50.0070.00715.28
7.3.40.0000.01215.28
7.3.30.0090.00915.28
7.3.20.0040.00916.87
7.3.10.0030.01216.80
7.3.00.0120.00316.50
7.2.330.0100.01316.69
7.2.320.0110.00516.67
7.2.310.0100.00716.48
7.2.300.0150.00316.48
7.2.290.0090.00916.75
7.2.250.0140.00315.28
7.2.240.0100.01015.28
7.2.230.0060.00315.28
7.2.220.0060.00915.28
7.2.210.0060.00915.31
7.2.200.0090.00615.29
7.2.190.0030.01415.28
7.2.180.0070.00715.28
7.2.170.0060.00615.28
7.2.60.0070.01017.02
7.2.00.0030.00919.39
7.1.330.0070.01015.96
7.1.320.0040.01016.02
7.1.310.0040.00415.52
7.1.300.0120.00315.93
7.1.290.0030.00715.93
7.1.280.0100.00616.04
7.1.270.0030.00716.07
7.1.260.0090.00615.72
7.1.100.0000.01118.59
7.1.70.0000.00717.22
7.1.60.0070.01819.46
7.1.50.0070.01417.24
7.1.00.0070.07322.35
7.0.200.0150.00614.80
7.0.140.0030.03322.12
7.0.60.0200.07320.03
7.0.50.0070.04317.93
7.0.40.0200.06320.13
7.0.30.0230.07020.14
7.0.20.0230.05320.17
7.0.10.0100.05720.08
7.0.00.0000.05020.21
5.6.280.0000.07721.04
5.6.210.0100.07720.72
5.6.200.0130.05018.13
5.6.190.0030.07720.64
5.6.180.0130.04320.62
5.6.170.0470.06720.54
5.6.160.0030.09020.50
5.6.150.0070.05718.18
5.6.140.0030.05018.21
5.6.130.0070.05018.12
5.6.120.0100.04321.13
5.6.110.0100.08021.14
5.6.100.0070.08321.14
5.6.90.0200.07320.97
5.6.80.0100.07320.29
5.5.350.0300.07320.53
5.5.340.0000.04317.97
5.5.330.0030.08720.40
5.5.320.0030.08020.32
5.5.310.0230.08320.25
5.5.300.0000.04718.01
5.5.290.0030.07317.98
5.5.280.0170.07020.88
5.5.270.0130.07720.89
5.5.260.0000.04320.88
5.5.250.0000.08320.49
5.5.240.0000.04320.19
5.4.450.0570.05719.56
5.4.440.0270.05319.34
5.4.430.0230.05319.19
5.4.420.0070.06719.59
5.4.410.0100.06319.32
5.4.400.0170.05319.40
5.4.390.0370.04318.75
5.4.380.0170.06718.46
5.4.370.0170.05718.57
5.4.360.0130.06018.52
5.4.350.0170.06718.60
5.4.340.0170.05718.81
5.4.320.0170.06018.58
5.4.310.0200.05318.46
5.4.300.0230.05018.76
5.4.290.0300.04018.78
5.4.280.0300.04018.45
5.4.270.0230.06718.80
5.4.260.0200.05018.77
5.4.250.0400.05718.75
5.4.240.0170.05718.59
5.4.230.0200.06018.69
5.4.220.0170.05318.77
5.4.210.0230.04718.71
5.4.200.0200.05016.82
5.4.190.0170.05718.77
5.4.180.0170.05018.47
5.4.170.0070.07318.54
5.4.160.0130.05318.56
5.4.150.0170.07018.73
5.4.140.0200.07316.25
5.4.130.0270.06316.21
5.4.120.0300.06016.24
5.4.110.0200.05016.27
5.4.100.0070.07016.35
5.4.90.0230.05016.35
5.4.80.0230.04316.27
5.4.70.0270.04716.25
5.4.60.0200.05016.19
5.4.50.0200.04316.23
5.4.40.0300.06316.19
5.4.30.0270.04316.29
5.4.20.0230.04316.18
5.4.10.0130.05716.29
5.4.00.0300.04715.63
5.3.290.0170.06014.76
5.3.280.0170.07314.72
5.3.270.0100.06314.88
5.3.260.0230.05014.80
5.3.250.0070.06014.64
5.3.240.0130.05714.65
5.3.230.0100.05714.80
5.3.220.0170.05314.60
5.3.210.0130.05714.85
5.3.200.0230.04314.77
5.3.190.0200.05014.61
5.3.180.0130.06014.73
5.3.170.0100.05714.64
5.3.160.0100.05714.69
5.3.150.0230.04714.77
5.3.140.0100.05714.75
5.3.130.0230.04714.60
5.3.120.0170.06014.75
5.3.110.0130.06014.60
5.3.100.0200.05314.14
5.3.90.0170.05314.18
5.3.80.0130.05314.30
5.3.70.0170.05314.06
5.3.60.0130.05314.05
5.3.50.0130.05314.09
5.3.40.0130.05714.00
5.3.30.0070.05714.18
5.3.20.0100.05313.74
5.3.10.0070.05713.66
5.3.00.0100.06713.75
5.2.170.0230.05011.19
5.2.160.0100.06311.29
5.2.150.0170.04011.43
5.2.140.0100.04711.19
5.2.130.0070.04711.19
5.2.120.0170.03711.21
5.2.110.0130.04311.30
5.2.100.0170.03711.20
5.2.90.0130.04311.19
5.2.80.0130.04711.13
5.2.70.0170.04711.11
5.2.60.0100.05311.08
5.2.50.0100.04711.15
5.2.40.0170.04011.13
5.2.30.0130.04311.08
5.2.20.0200.03311.06
5.2.10.0270.04311.00
5.2.00.0130.04310.75
5.1.60.0130.04310.17
5.1.50.0100.03710.07
5.1.40.0130.03310.10
5.1.30.0100.04010.61
5.1.20.0100.04010.55
5.1.10.0200.04310.20
5.1.00.0130.05010.11
5.0.50.0230.0238.57
5.0.40.0100.0378.43
5.0.30.0130.0508.32
5.0.20.0070.0408.18
5.0.10.0100.0278.21
5.0.00.0030.0478.30
4.4.90.0170.0205.94
4.4.80.0030.0235.97
4.4.70.0100.0275.89
4.4.60.0100.0205.89
4.4.50.0000.0275.99
4.4.40.0000.0405.92
4.4.30.0130.0175.99
4.4.20.0070.0235.96
4.4.10.0030.0305.97
4.4.00.0070.0375.94
4.3.110.0100.0175.91
4.3.100.0100.0275.84
4.3.90.0070.0205.79
4.3.80.0000.0405.92
4.3.70.0030.0235.89
4.3.60.0100.0175.80
4.3.50.0070.0205.79
4.3.40.0070.0335.85
4.3.30.0030.0235.79
4.3.20.0030.0235.79
4.3.10.0030.0235.79
4.3.00.0030.03014.56

preferences:
59.57 ms | 401 KiB | 5 Q