3v4l.org

run code in 300+ PHP versions simultaneously
<?php function convert($url) { return preg_replace(':\/\/([^.]*\.)?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.75
8.3.50.0130.00622.05
8.3.40.0070.01118.67
8.3.30.0100.00718.95
8.3.20.0040.00420.34
8.3.10.0080.00021.95
8.3.00.0060.00320.94
8.2.180.0180.00325.92
8.2.170.0040.01122.96
8.2.160.0070.00722.09
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00317.90
8.2.110.0030.00620.26
8.2.100.0060.00617.91
8.2.90.0050.00319.00
8.2.80.0000.00817.97
8.2.70.0000.00817.38
8.2.60.0080.00017.80
8.2.50.0050.00518.07
8.2.40.0040.00419.63
8.2.30.0000.00717.93
8.2.20.0030.00617.52
8.2.10.0050.00217.95
8.2.00.0000.00717.50
8.1.280.0070.01125.92
8.1.270.0060.00924.66
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00622.20
8.1.230.0110.00018.97
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0080.00017.23
8.1.190.0080.00017.10
8.1.180.0070.00018.10
8.1.170.0050.00318.58
8.1.160.0000.00721.99
8.1.150.0040.00418.81
8.1.140.0040.00419.05
8.1.130.0000.00717.72
8.1.120.0000.00717.39
8.1.110.0000.00717.23
8.1.100.0050.00317.24
8.1.90.0000.00717.38
8.1.80.0040.00417.23
8.1.70.0000.00717.35
8.1.60.0060.00317.51
8.1.50.0080.00017.39
8.1.40.0030.00717.46
8.1.30.0030.00617.59
8.1.20.0030.00517.66
8.1.10.0040.00417.36
8.1.00.0000.00817.21
8.0.300.0040.00418.77
8.0.290.0030.00516.63
8.0.280.0030.00318.32
8.0.270.0040.00417.20
8.0.260.0000.00617.12
8.0.250.0030.00316.90
8.0.240.0040.00416.88
8.0.230.0070.00016.80
8.0.220.0030.00316.90
8.0.210.0040.00416.77
8.0.200.0000.00716.86
8.0.190.0030.00616.91
8.0.180.0000.00816.86
8.0.170.0000.00816.74
8.0.160.0000.00816.76
8.0.150.0000.00716.80
8.0.140.0040.00416.83
8.0.130.0000.00613.25
8.0.120.0000.00816.66
8.0.110.0070.00016.82
8.0.100.0060.00316.78
8.0.90.0000.00816.86
8.0.80.0120.00416.74
8.0.70.0000.00716.81
8.0.60.0000.00716.83
8.0.50.0080.00016.88
8.0.30.0080.01717.09
8.0.20.0130.01017.40
8.0.10.0050.00316.89
8.0.00.0080.01016.67
7.4.330.0080.00015.03
7.4.320.0060.00016.29
7.4.300.0030.00316.44
7.4.290.0000.00716.34
7.4.280.0030.00816.37
7.4.270.0030.00316.59
7.4.260.0000.00916.49
7.4.250.0040.00416.48
7.4.240.0020.00516.54
7.4.230.0040.00416.30
7.4.220.0080.01516.44
7.4.210.0120.00416.48
7.4.200.0000.00716.65
7.4.160.0120.01216.45
7.4.150.0150.00417.40
7.4.140.0110.00817.86
7.4.130.0110.01116.48
7.4.120.0080.00816.44
7.4.110.0090.00916.29
7.4.100.0120.00316.55
7.4.90.0120.00616.29
7.4.80.0050.01319.39
7.4.70.0160.00616.64
7.4.60.0080.00816.54
7.4.50.0050.00016.52
7.4.40.0100.00616.50
7.4.30.0110.01316.68
7.4.00.0070.01114.79
7.3.330.0000.00513.12
7.3.320.0030.00313.32
7.3.310.0040.00416.14
7.3.300.0060.00016.13
7.3.290.0090.00516.26
7.3.280.0100.00816.24
7.3.270.0170.00817.40
7.3.260.0060.01116.32
7.3.250.0160.00516.33
7.3.240.0100.00716.28
7.3.230.0110.00716.39
7.3.210.0110.00516.43
7.3.200.0060.01119.39
7.3.190.0100.01016.23
7.3.180.0150.00016.31
7.3.170.0130.00316.29
7.3.160.0120.00316.53
7.3.120.0050.01314.89
7.3.110.0090.00914.68
7.3.100.0110.00414.79
7.3.90.0060.00614.86
7.3.80.0070.00314.67
7.3.70.0100.00514.67
7.3.60.0050.00814.61
7.3.50.0050.00514.70
7.3.40.0070.00214.43
7.3.30.0080.00614.55
7.3.20.0090.00416.40
7.3.10.0090.00516.63
7.3.00.0080.00416.53
7.2.330.0090.00916.64
7.2.320.0130.00316.41
7.2.310.0090.00916.54
7.2.300.0080.00816.60
7.2.290.0180.00416.66
7.2.250.0090.00914.83
7.2.240.0070.01214.80
7.2.230.0100.00714.84
7.2.220.0030.01214.93
7.2.210.0060.00814.92
7.2.200.0040.01114.59
7.2.190.0070.00614.78
7.2.180.0030.01114.80
7.2.170.0020.01114.68
7.2.60.0030.01216.71
7.2.00.0080.00319.21
7.1.330.0100.00615.93
7.1.320.0100.00615.59
7.1.310.0070.00515.66
7.1.300.0060.00415.65
7.1.290.0040.00915.52
7.1.280.0050.00515.68
7.1.270.0070.00515.72
7.1.260.0020.01215.67
7.1.100.0000.01118.09
7.1.70.0060.00616.87
7.1.60.0070.01719.46
7.1.50.0100.01416.91
7.1.00.0030.07722.30
7.0.200.0110.00414.68
7.0.140.0100.07022.01
7.0.60.0070.07720.07
7.0.50.0130.04317.87
7.0.40.0170.08320.11
7.0.30.0370.05720.03
7.0.20.0270.06720.19
7.0.10.0070.07720.07
7.0.00.0030.08320.22
5.6.280.0100.06320.91
5.6.210.0170.05020.75
5.6.200.0030.06318.25
5.6.190.0030.08320.63
5.6.180.0330.06720.47
5.6.170.0230.08020.39
5.6.160.0100.08320.46
5.6.150.0030.04318.16
5.6.140.0070.05018.14
5.6.130.0000.08718.26
5.6.120.0130.04020.98
5.6.110.0000.04721.02
5.6.100.0070.06720.97
5.6.90.0030.04021.11
5.6.80.0130.04720.51
5.5.350.0270.08020.53
5.5.340.0030.06018.05
5.5.330.0200.04320.27
5.5.320.0000.04320.29
5.5.310.0200.06020.30
5.5.300.0170.08017.98
5.5.290.0100.08018.01
5.5.280.0100.07720.74
5.5.270.0030.08720.66
5.5.260.0030.05020.65
5.5.250.0030.08320.69
5.5.240.0070.08020.19
5.4.450.0770.06719.45
5.4.440.0370.05019.48
5.4.430.0200.06019.61
5.4.420.0300.04719.47
5.4.410.0130.05719.09
5.4.400.0170.05319.00
5.4.390.0230.05318.59
5.4.380.0200.05718.63
5.4.370.0200.05318.74
5.4.360.0230.05318.75
5.4.350.0330.07018.75
5.4.340.0230.05018.75
5.4.320.0230.05318.55
5.4.310.0270.05018.76
5.4.300.0330.06018.51
5.4.290.0200.05018.72
5.4.280.0200.05018.74
5.4.270.0300.06018.76
5.4.260.0200.04718.73
5.4.250.0170.06718.80
5.4.240.0200.07318.75
5.4.230.0200.06018.52
5.4.220.0230.05318.55
5.4.210.0170.07018.77
5.4.200.0130.06016.55
5.4.190.0300.05718.73
5.4.180.0200.07018.77
5.4.170.0270.05018.74
5.4.160.0330.06018.75
5.4.150.0270.06318.76
5.4.140.0130.05316.21
5.4.130.0200.04316.32
5.4.120.0200.06016.45
5.4.110.0030.06016.32
5.4.100.0200.04716.24
5.4.90.0100.08016.29
5.4.80.0170.06716.17
5.4.70.0170.06716.18
5.4.60.0170.05016.23
5.4.50.0230.04316.23
5.4.40.0170.05016.25
5.4.30.0200.04716.40
5.4.20.0170.05716.25
5.4.10.0200.05016.25
5.4.00.0170.06015.70
5.3.290.0130.06014.71
5.3.280.0200.05314.64
5.3.270.0100.06014.66
5.3.260.0170.06314.63
5.3.250.0170.06314.65
5.3.240.0070.06314.73
5.3.230.0130.06314.62
5.3.220.0230.06714.63
5.3.210.0270.07014.73
5.3.200.0400.05014.79
5.3.190.0270.06714.56
5.3.180.0270.06714.61
5.3.170.0100.05714.69
5.3.160.0230.06714.61
5.3.150.0200.05314.73
5.3.140.0230.04314.53
5.3.130.0200.05014.57
5.3.120.0230.04714.55
5.3.110.0230.05014.55
5.3.100.0130.05714.07
5.3.90.0230.05314.06
5.3.80.0170.05714.04
5.3.70.0170.06014.05
5.3.60.0230.04314.05
5.3.50.0230.06014.05
5.3.40.0200.05713.97
5.3.30.0100.08014.07
5.3.20.0170.05013.85
5.3.10.0270.04013.64
5.3.00.0170.05313.69
5.2.170.0170.03711.16
5.2.160.0100.04311.13
5.2.150.0230.04011.20
5.2.140.0200.04011.16
5.2.130.0100.04311.20
5.2.120.0130.04011.10
5.2.110.0130.04311.20
5.2.100.0100.04311.13
5.2.90.0070.04711.15
5.2.80.0330.04011.13
5.2.70.0030.05011.14
5.2.60.0170.04011.09
5.2.50.0100.04711.01
5.2.40.0130.04011.09
5.2.30.0130.04711.07
5.2.20.0130.04711.06
5.2.10.0170.03710.86
5.2.00.0170.03310.71
5.1.60.0200.02310.09
5.1.50.0100.0379.99
5.1.40.0100.03710.05
5.1.30.0100.03710.38
5.1.20.0000.04710.35
5.1.10.0170.03310.06
5.1.00.0100.03710.15
5.0.50.0130.0338.62
5.0.40.0070.0308.45
5.0.30.0200.0438.23
5.0.20.0030.0338.22
5.0.10.0130.0278.27
5.0.00.0070.0478.20
4.4.90.0070.0235.89
4.4.80.0100.0205.91
4.4.70.0070.0305.88
4.4.60.0030.0235.88
4.4.50.0030.0276.02
4.4.40.0030.0405.92
4.4.30.0100.0275.88
4.4.20.0100.0276.07
4.4.10.0130.0175.95
4.4.00.0000.0475.93
4.3.110.0100.0205.82
4.3.100.0030.0235.89
4.3.90.0000.0335.80
4.3.80.0030.0405.83
4.3.70.0070.0275.84
4.3.60.0070.0305.83
4.3.50.0100.0175.81
4.3.40.0100.0405.79
4.3.30.0130.0205.79
4.3.20.0070.0275.79
4.3.10.0100.0235.79
4.3.00.0100.01714.56

preferences:
44.58 ms | 401 KiB | 5 Q