3v4l.org

run code in 300+ PHP versions simultaneously
<?php // get host name from URL preg_match('@^(?:http://)?([^/]+)@i', "http://example.uk.com", $matches); $host = $matches[1]; // get last two segments of host name preg_match('/([^.]+)\.[^.]+$/', $host, $matches); echo "domain name is: {$matches[1]}\n";

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.0090.00918.43
8.3.50.0090.00721.15
8.3.40.0070.00718.94
8.3.30.0060.00920.21
8.3.20.0000.00818.83
8.3.10.0040.00421.05
8.3.00.0080.00022.27
8.2.180.0100.01016.38
8.2.170.0070.00722.96
8.2.160.0100.00720.35
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0070.00021.03
8.2.110.0090.00020.96
8.2.100.0080.00418.11
8.2.90.0040.00419.36
8.2.80.0080.00017.97
8.2.70.0000.00817.88
8.2.60.0040.00417.93
8.2.50.0080.00018.16
8.2.40.0060.00320.46
8.2.30.0000.00919.25
8.2.20.0070.00017.88
8.2.10.0040.00417.78
8.2.00.0000.00817.82
8.1.280.0110.00625.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0140.00028.09
8.1.240.0070.00322.62
8.1.230.0070.00422.13
8.1.220.0000.00817.75
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0000.00819.14
8.1.180.0060.00318.10
8.1.170.0080.00018.70
8.1.160.0000.00718.92
8.1.150.0040.00420.17
8.1.140.0070.00017.60
8.1.130.0070.00017.82
8.1.120.0040.00417.51
8.1.110.0000.00717.48
8.1.100.0000.00917.57
8.1.90.0030.00317.61
8.1.80.0000.00717.56
8.1.70.0000.00717.57
8.1.60.0050.00317.71
8.1.50.0050.00317.59
8.1.40.0060.00317.60
8.1.30.0040.00417.62
8.1.20.0000.00917.80
8.1.10.0070.00017.71
8.1.00.0030.00617.64
8.0.300.0040.00418.77
8.0.290.0070.00416.75
8.0.280.0030.00318.40
8.0.270.0050.00317.28
8.0.260.0060.00016.97
8.0.250.0070.00017.02
8.0.240.0030.00617.06
8.0.230.0030.00417.11
8.0.220.0000.00717.07
8.0.210.0000.00716.92
8.0.200.0000.00617.16
8.0.190.0040.00417.12
8.0.180.0000.00716.97
8.0.170.0040.00417.01
8.0.160.0070.00016.94
8.0.150.0030.00517.02
8.0.140.0000.00817.02
8.0.130.0000.00613.56
8.0.120.0030.00516.92
8.0.110.0070.00316.88
8.0.100.0000.00716.94
8.0.90.0040.00416.93
8.0.80.0070.01417.11
8.0.70.0040.00417.04
8.0.60.0000.00717.03
8.0.50.0050.00216.91
8.0.30.0150.00617.07
8.0.20.0110.00817.40
8.0.10.0040.00417.16
8.0.00.0100.01016.86
7.4.330.0050.00016.75
7.4.320.0000.00716.75
7.4.300.0070.00016.68
7.4.290.0070.00016.61
7.4.280.0000.00716.62
7.4.270.0030.00316.74
7.4.260.0000.00513.54
7.4.250.0030.00616.71
7.4.240.0030.00316.62
7.4.230.0040.00416.85
7.4.220.0060.01516.76
7.4.210.0090.00616.70
7.4.200.0070.00016.66
7.4.190.0030.00316.92
7.4.160.0030.01316.82
7.4.150.0140.01017.40
7.4.140.0100.00617.86
7.4.130.0100.00716.75
7.4.120.0100.01116.74
7.4.110.0100.00716.68
7.4.100.0030.01316.84
7.4.90.0090.01316.63
7.4.80.0110.00719.39
7.4.70.0140.00816.76
7.4.60.0060.01016.59
7.4.50.0040.00416.45
7.4.40.0090.00922.77
7.4.30.0130.00716.58
7.4.00.0070.01115.27
7.3.330.0030.00313.24
7.3.320.0030.00313.24
7.3.310.0040.00416.36
7.3.300.0070.00016.31
7.3.290.0070.00716.36
7.3.280.0080.00916.39
7.3.270.0100.00717.40
7.3.260.0120.00818.24
7.3.250.0140.00416.61
7.3.240.0160.00616.75
7.3.230.0030.01416.39
7.3.210.0110.01416.58
7.3.200.0090.01519.39
7.3.190.0100.00716.62
7.3.180.0110.00616.55
7.3.170.0090.00616.48
7.3.160.0070.01416.47
7.3.120.0070.01014.93
7.3.10.0100.00716.66
7.3.00.0040.01116.74
7.2.330.0140.00316.78
7.2.320.0060.01616.86
7.2.310.0090.00916.65
7.2.300.0070.01316.74
7.2.290.0160.00716.86
7.2.130.0150.01116.76
7.2.120.0150.01116.87
7.2.110.0080.00816.67
7.2.100.0110.01516.73
7.2.90.0030.01316.82
7.2.80.0060.01016.83
7.2.70.0230.00317.05
7.2.60.0070.01016.73
7.2.50.0100.01016.63
7.2.40.0350.00316.63
7.2.30.0080.01117.13
7.2.20.0090.00916.91
7.2.10.0110.01116.58
7.2.00.0040.01117.03
7.1.250.0040.01115.40
7.1.70.0160.00617.50
7.1.60.0070.01719.17
7.1.50.0000.01017.15
7.1.00.0030.03322.39
7.0.200.0000.00716.91
7.0.140.0030.07322.00
7.0.110.0030.08019.89
7.0.100.0070.08019.93
7.0.90.0030.09019.98
7.0.80.0030.08720.05
7.0.70.0130.07720.00
7.0.60.0070.08320.00
7.0.50.0130.07720.36
7.0.40.0030.07720.05
7.0.30.0100.07019.95
7.0.20.0030.08320.27
7.0.10.0100.04320.04
7.0.00.0070.05720.07
5.6.280.0000.07720.89
5.6.250.0100.08020.62
5.6.240.0200.07020.58
5.6.230.0000.05320.55
5.6.220.0070.08320.67
5.6.210.0100.07720.68
5.6.200.0170.07321.22
5.6.190.0030.08320.99
5.6.180.0170.07721.14
5.6.170.0200.07320.98
5.6.160.0100.04720.93
5.6.150.0000.04320.97
5.6.140.0000.04721.11
5.6.130.0000.04720.94
5.6.120.0030.04321.11
5.6.110.0000.04320.97
5.6.100.0000.04321.25
5.6.90.0070.04021.12
5.6.80.0070.05020.43
5.6.70.0070.04020.64
5.6.60.0030.04020.48
5.6.50.0000.04320.48
5.6.40.0070.03720.49
5.6.30.0070.07020.50
5.6.20.0000.04320.31
5.6.10.0030.04020.27
5.6.00.0030.04020.42
5.5.380.0000.08020.34
5.5.370.0030.08320.54
5.5.360.0130.06720.31
5.5.350.0100.04720.43
5.5.340.0170.07021.04
5.5.330.0070.08320.81
5.5.320.0100.07720.96
5.5.310.0030.09020.77
5.5.300.0030.04020.96
5.5.290.0000.06320.95
5.5.280.0030.04320.73
5.5.270.0100.03320.73
5.5.260.0070.04020.85
5.5.250.0030.07320.77
5.5.240.0070.03720.25
5.5.230.0070.07320.25
5.5.220.0070.04320.27
5.5.210.0000.04020.26
5.5.200.0030.05320.16
5.5.190.0070.03320.04
5.5.180.0030.04720.21
5.5.160.0070.03720.04
5.5.150.0070.03320.36
5.5.140.0070.03720.21
5.5.130.0130.02720.32
5.5.120.0030.04020.36
5.5.110.0070.03720.38
5.5.100.0030.05720.00
5.5.90.0000.05020.09
5.5.80.0070.03719.99
5.5.70.0070.03719.95
5.5.60.0030.03720.26
5.5.50.0000.04020.13
5.5.40.0070.03720.08
5.5.30.0070.03320.12
5.5.20.0000.04320.04
5.5.10.0030.04019.93
5.5.00.0030.05720.00
5.4.450.0000.04319.28
5.4.440.0070.06019.44
5.4.430.0000.04319.50
5.4.420.0070.03719.44
5.4.410.0000.04019.14
5.4.400.0030.03719.27
5.4.390.0100.03019.16
5.4.380.0070.04019.18
5.4.370.0100.03019.15
5.4.360.0030.03719.17
5.4.350.0030.07319.18
5.4.340.0030.03719.00
5.4.320.0000.04018.95
5.4.310.0000.04018.95
5.4.300.0030.03718.94
5.4.290.0030.03719.00
5.4.280.0100.03018.98
5.4.270.0100.04018.89
5.4.260.0000.04019.04
5.4.250.0070.03319.07
5.4.240.0100.03018.96
5.4.230.0070.03719.00
5.4.220.0000.04019.00
5.4.210.0000.04018.96
5.4.200.0030.03719.17
5.4.190.0070.03319.16
5.4.180.0170.04018.92
5.4.170.0030.04019.16
5.4.160.0100.05319.00
5.4.150.0030.05319.15
5.4.140.0030.07716.31
5.4.130.0100.06716.44
5.4.120.0030.08016.26
5.4.110.0100.06716.50
5.4.100.0100.06716.41
5.4.90.0000.07716.38
5.4.80.0170.03016.39
5.4.70.0130.06316.21
5.4.60.0100.06316.50
5.4.50.0030.06716.40
5.4.40.0070.05016.41
5.4.30.0070.08016.26
5.4.20.0130.07016.42
5.4.10.0070.04316.48
5.4.00.0100.05315.93
5.3.290.0100.03314.55
5.3.280.0000.04314.47
5.3.270.0070.03314.40
5.3.260.0030.03714.62
5.3.250.0030.04014.44
5.3.240.0130.06714.55
5.3.230.0130.07014.59
5.3.220.0000.07714.44
5.3.210.0070.06014.51
5.3.200.0100.05014.56
5.3.190.0000.05014.57
5.3.180.0070.07314.46
5.3.170.0070.07014.44
5.3.160.0030.08014.66
5.3.150.0100.06714.45
5.3.140.0070.06314.55
5.3.130.0000.05014.41
5.3.120.0070.07014.62
5.3.110.0100.05714.34
5.3.100.0030.06314.05
5.3.90.0100.06713.91
5.3.80.0030.07013.89
5.3.70.0000.06713.89
5.3.60.0070.08013.92
5.3.50.0070.04313.83
5.3.40.0130.06013.88
5.3.30.0100.07013.75
5.3.20.0030.06713.59
5.3.10.0070.07013.50
5.3.00.0000.04713.73
5.2.170.0070.06710.93
5.2.160.0030.03711.08
5.2.150.0070.04711.16
5.2.140.0100.05311.09
5.2.130.0170.04011.05
5.2.120.0130.04311.05
5.2.110.0030.03711.04
5.2.100.0030.05711.02
5.2.90.0030.05310.98
5.2.80.0070.06011.13
5.2.70.0030.06311.11
5.2.60.0070.06010.94
5.2.50.0030.04311.07
5.2.40.0030.05711.05
5.2.30.0030.06011.14
5.2.20.0130.05310.86
5.2.10.0030.06010.86
5.2.00.0030.06010.61
5.1.60.0030.05010.14
5.1.50.0000.0539.93
5.1.40.0070.0479.88
5.1.30.0030.03310.24
5.1.20.0100.05310.43
5.1.10.0170.04710.00
5.1.00.0070.05010.21
5.0.50.0030.0478.79
5.0.40.0030.0438.32
5.0.30.0030.0678.13
5.0.20.0000.0308.27
5.0.10.0030.0378.13
5.0.00.0030.0338.14
4.4.90.0000.0307.98
4.4.80.0030.0337.98
4.4.70.0000.0407.98
4.4.60.0030.0377.98
4.4.50.0070.0337.98
4.4.40.0070.0477.98
4.4.30.0000.0407.98
4.4.20.0000.0377.98
4.4.10.0030.0307.98
4.4.00.0100.0477.98
4.3.110.0000.0337.98
4.3.100.0000.0377.98
4.3.90.0070.0137.98
4.3.80.0030.0307.98
4.3.70.0030.0277.98
4.3.60.0000.0337.98
4.3.50.0000.0307.98
4.3.40.0030.0537.98
4.3.30.0070.0307.98
4.3.20.0030.0207.98
4.3.10.0000.0237.98
4.3.00.0000.0377.98

preferences:
56.49 ms | 400 KiB | 5 Q