3v4l.org

run code in 300+ PHP versions simultaneously
<?php $expr = '! ^ (?: (?P<scheme> [a-z][a-z0-9.]* ) : )? (?: // (?<authority> (?: (?P<user> [^:@]+ ) (?: : (?P<pass> [^@]+ ) )? @ )? (?P<host> [^:/]+ ) (?: : (?P<port> [0-9]+ ) )? ) )? (?: / (?P<path> /[^?#]+ ) )? (?: \? (?P<query> [^#]+ ) )? (?: # (?P<fragment> .+ ) )? $ !ix'; $urls = [ 'http://host.com/path', 'http://user@host.com/path', 'http://user:pass@host.com/path', 'http://user:pass@host.com:8080/path', '//user:pass@host.com:8080/path', 'http://user:pass@host.com:8080/path?query#fragment', ]; foreach ($urls as $str) { echo "$str\n"; preg_match($expr, $str, $matches); foreach ($matches as $key => $match) { if (!is_int($key) && $match !== '') { echo "$key: $match\n"; } } echo "\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.70.0150.00416.63
8.3.60.0180.00718.46
8.3.50.0110.00522.10
8.3.40.0040.01118.79
8.3.30.0100.00719.08
8.3.20.0050.00320.16
8.3.10.0040.00423.53
8.3.00.0030.00520.89
8.2.180.0100.00716.75
8.2.170.0150.00322.96
8.2.160.0060.00820.22
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0040.00419.38
8.2.110.0030.00620.40
8.2.100.0090.00318.03
8.2.90.0050.00319.17
8.2.80.0030.00617.97
8.2.70.0060.00317.75
8.2.60.0040.00418.03
8.2.50.0030.00518.07
8.2.40.0000.00819.77
8.2.30.0040.00418.29
8.2.20.0110.00017.85
8.2.10.0000.00718.16
8.2.00.0040.00419.57
8.1.280.0090.00625.92
8.1.270.0000.00824.04
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0090.00023.83
8.1.230.0080.00417.60
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0030.00617.60
8.1.190.0040.00417.36
8.1.180.0000.00818.10
8.1.170.0040.00418.72
8.1.160.0000.00722.10
8.1.150.0040.00418.71
8.1.140.0040.00417.68
8.1.130.0040.00417.54
8.1.120.0070.00017.61
8.1.110.0000.00717.55
8.1.100.0000.00717.70
8.1.90.0000.00717.65
8.1.80.0050.00317.57
8.1.70.0070.00017.55
8.1.60.0090.00017.61
8.1.50.0000.00817.70
8.1.40.0040.00417.59
8.1.30.0060.00317.81
8.1.20.0040.00417.79
8.1.10.0080.00017.68
8.1.00.0000.00917.46
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0050.00218.52
8.0.270.0000.00717.21
8.0.260.0090.00016.99
8.0.250.0030.00317.12
8.0.240.0060.00317.04
8.0.230.0070.00017.16
8.0.220.0040.00417.07
8.0.210.0030.00317.02
8.0.200.0030.00317.08
8.0.190.0050.00317.04
8.0.180.0070.00016.96
8.0.170.0000.00817.09
8.0.160.0030.00516.97
8.0.150.0030.00617.02
8.0.140.0000.00717.04
8.0.130.0000.00613.52
8.0.120.0000.00817.05
8.0.110.0040.00416.96
8.0.100.0040.00416.93
8.0.90.0040.00417.05
8.0.80.0100.00616.98
8.0.70.0000.00717.05
8.0.60.0040.00316.95
8.0.50.0000.00716.88
8.0.30.0100.01017.26
8.0.20.0120.00817.40
8.0.10.0000.00717.11
8.0.00.0110.00716.93
7.4.330.0000.00515.23
7.4.320.0060.00016.82
7.4.300.0030.00316.74
7.4.290.0080.00016.71
7.4.280.0030.00716.79
7.4.270.0000.00716.83
7.4.260.0000.00816.80
7.4.250.0050.00316.70
7.4.240.0020.00516.72
7.4.230.0070.00016.62
7.4.220.0140.00316.74
7.4.210.0100.01016.86
7.4.200.0000.00716.91
7.4.160.0130.01316.83
7.4.150.0150.00317.40
7.4.140.0100.00717.86
7.4.130.0110.00616.67
7.4.120.0100.01116.70
7.4.110.0110.01416.53
7.4.100.0060.01216.61
7.4.90.0150.00316.63
7.4.80.0110.00619.39
7.4.70.0100.01016.96
7.4.60.0030.01516.77
7.4.50.0020.00216.85
7.4.40.0120.00616.56
7.4.30.0080.01216.79
7.4.10.0080.01216.80
7.4.00.0070.01115.62
7.3.330.0000.00713.36
7.3.320.0020.00213.20
7.3.310.0030.00516.33
7.3.300.0000.00716.38
7.3.290.0180.00016.47
7.3.280.0080.00816.48
7.3.270.0090.00817.40
7.3.260.0160.00316.82
7.3.250.0040.01316.66
7.3.240.0040.01316.70
7.3.230.0100.00716.65
7.3.210.0030.01316.70
7.3.200.0070.01819.39
7.3.190.0150.00316.52
7.3.180.0040.01216.79
7.3.170.0100.00716.45
7.3.160.0100.00716.54
7.3.130.0160.00316.54
7.3.120.0060.00915.56
7.3.110.0020.01515.75
7.3.100.0030.01215.70
7.3.90.0070.00715.77
7.3.80.0090.00515.86
7.3.70.0070.00715.89
7.3.60.0050.01115.62
7.3.50.0050.00915.81
7.3.40.0050.00715.63
7.3.30.0100.00315.81
7.3.20.0020.01217.63
7.3.10.0110.00217.53
7.3.00.0070.00717.71
7.2.330.0100.01616.73
7.2.320.0140.00416.68
7.2.310.0030.01416.97
7.2.300.0180.00016.68
7.2.290.0100.00616.87
7.2.260.0140.00316.68
7.2.250.0070.01215.83
7.2.240.0100.00816.04
7.2.230.0070.00816.01
7.2.220.0050.01215.99
7.2.210.0060.00715.91
7.2.200.0070.00915.91
7.2.190.0050.00915.99
7.2.180.0050.00915.98
7.2.170.0080.00415.91
7.2.160.0110.00316.55
7.2.150.0080.00318.49
7.2.140.0040.00818.58
7.2.130.0080.00818.43
7.2.120.0000.01018.64
7.2.110.0080.00418.55
7.2.100.0030.01018.69
7.2.90.0040.00718.38
7.2.80.0000.01418.50
7.2.70.0070.00718.55
7.2.60.0000.01418.38
7.2.50.0090.00618.63
7.2.40.0040.00818.51
7.2.30.0030.01418.71
7.2.20.0000.01218.50
7.2.10.0000.01718.54
7.2.00.0080.00719.09
7.1.330.0020.01516.78
7.1.320.0060.01116.83
7.1.310.0070.00716.84
7.1.300.0050.00916.67
7.1.290.0030.00916.92
7.1.280.0010.00916.81
7.1.270.0100.00416.62
7.1.260.0080.00516.58
7.1.250.0070.01017.57
7.1.240.0060.00617.67
7.1.230.0070.00317.56
7.1.220.0030.01017.58
7.1.210.0060.00317.28
7.1.200.0120.00617.47
7.1.190.0120.00617.52
7.1.180.0060.00917.55
7.1.170.0040.01217.41
7.1.160.0190.00017.36
7.1.150.0190.00017.54
7.1.140.0060.00617.54
7.1.130.0000.01517.45
7.1.120.0040.01417.58
7.1.110.0070.00317.70
7.1.100.0080.01218.06
7.1.90.0030.01417.57
7.1.80.0070.00717.48
7.1.70.0080.00517.48
7.1.60.0090.01018.62
7.1.50.0020.01117.37
7.1.40.0030.01617.66
7.1.30.0100.01017.58
7.1.20.0030.01317.52
7.1.10.0030.00817.75
7.1.00.0050.04020.01
7.0.330.0080.00317.07
7.0.320.0000.01417.18
7.0.310.0030.01217.16
7.0.300.0000.00917.16
7.0.290.0060.00617.22
7.0.280.0060.00617.27
7.0.270.0030.01017.22
7.0.260.0040.01417.01
7.0.250.0000.01117.43
7.0.240.0030.01317.24
7.0.230.0040.01117.20
7.0.220.0070.00717.24
7.0.210.0070.00717.07
7.0.200.0040.00517.12
7.0.190.0040.00817.36
7.0.180.0070.00716.97
7.0.170.0090.00917.14
7.0.160.0120.00617.20
7.0.150.0040.01117.36
7.0.140.0070.04019.62
7.0.130.0060.01017.14
7.0.120.0070.01017.26
7.0.110.0100.00717.31
7.0.100.0040.00817.22
7.0.90.0070.00717.23
7.0.80.0090.00317.33
7.0.70.0040.00817.12
7.0.60.0130.02818.53
7.0.50.0050.04917.48
7.0.40.0090.04617.77
7.0.30.0220.03917.55
7.0.20.0170.04017.65
7.0.10.0080.04517.57
7.0.00.0050.04017.68
5.6.400.0060.00915.99
5.6.390.0040.00715.89
5.6.380.0030.01316.03
5.6.370.0060.00915.67
5.6.360.0070.00715.98
5.6.350.0030.01415.64
5.6.340.0030.01015.80
5.6.330.0040.01415.84
5.6.320.0080.00815.96
5.6.310.0070.00716.09
5.6.300.0060.00916.17
5.6.290.0030.01316.00
5.6.280.0070.04218.54
5.6.270.0000.01416.08
5.6.260.0110.00715.93
5.6.250.0120.00615.87
5.6.240.0090.00616.18
5.6.230.0060.00915.95
5.6.220.0060.01016.07
5.6.210.0080.04218.42
5.6.200.0110.04117.09
5.6.190.0120.04718.17
5.6.180.0060.02318.26
5.6.170.0200.03818.17
5.6.160.0050.02518.17
5.6.150.0030.03217.07
5.6.140.0080.03617.26
5.6.130.0040.02516.98
5.6.120.0080.04318.39
5.6.110.0030.04418.40
5.6.100.0070.03018.47
5.6.90.0090.04618.50
5.6.80.0070.04218.12
5.6.70.0110.00415.86
5.6.60.0120.00615.75
5.6.50.0040.01416.06
5.6.40.0080.00315.81
5.6.30.0120.00615.62
5.6.20.0090.00615.66
5.6.10.0060.01215.87
5.6.00.0070.00715.96
5.5.380.0030.01316.13
5.5.370.0140.00015.95
5.5.360.0080.00815.84
5.5.350.1830.02718.03
5.5.340.0080.02716.98
5.5.330.0080.03217.95
5.5.320.0130.02618.05
5.5.310.0140.04518.07
5.5.300.0070.04216.85
5.5.290.0050.03016.86
5.5.280.0050.02918.26
5.5.270.0170.02218.50
5.5.260.0060.04618.43
5.5.250.0070.04118.33
5.5.240.0170.03517.91
5.5.230.0090.00615.75
5.5.220.0100.00715.86
5.5.210.0070.01015.86
5.5.200.0050.00515.83
5.5.190.0030.01415.65
5.5.180.0080.00315.82
5.5.170.0000.01815.75
5.5.160.0110.00415.70
5.5.150.0030.01515.68
5.5.140.0030.01415.77
5.5.130.0040.01115.67
5.5.120.0090.00615.81
5.5.110.0090.00615.99
5.5.100.0030.01015.91
5.5.90.0070.01015.77
5.5.80.0030.01315.76
5.5.70.0060.01315.79
5.5.60.0040.01415.71
5.5.50.0070.01015.75
5.5.40.0060.00915.62
5.5.30.0030.01015.75
5.5.20.0030.00615.84
5.5.10.0060.00915.77
5.5.00.0060.00815.79
5.4.450.1680.02416.12
5.4.440.2000.02016.03
5.4.430.2070.02315.93
5.4.420.1940.02216.12
5.4.410.1820.02515.93
5.4.400.1910.02115.93
5.4.390.1770.02215.93
5.4.380.2060.02115.90
5.4.370.1740.01916.03
5.4.360.1770.02315.69
5.4.350.1790.02115.96
5.4.340.1830.02015.65
5.4.330.0030.00912.54
5.4.320.1870.01815.81
5.4.310.1630.02415.61
5.4.300.1930.02215.85
5.4.290.1800.02315.82
5.4.280.1760.02015.76
5.4.270.1830.02615.71
5.4.260.0050.02315.87
5.4.250.0920.02015.80
5.4.240.1780.02015.69
5.4.230.1600.02515.78
5.4.220.1780.02315.80
5.4.210.1850.02015.88
5.4.200.1700.02115.83
5.4.190.1780.02115.86
5.4.180.1760.02115.89
5.4.170.1650.02515.79
5.4.160.0990.02115.96
5.4.150.0070.03915.97
5.4.140.1820.02214.43
5.4.130.1770.02414.42
5.4.120.1680.02114.54
5.4.110.1710.02014.45
5.4.100.1780.02014.31
5.4.90.1790.02314.59
5.4.80.2080.01814.39
5.4.70.1700.01814.38
5.4.60.1800.02114.49
5.4.50.1670.02614.54
5.4.40.1680.02514.51
5.4.30.1540.01314.47
5.4.20.1720.01714.48
5.4.10.1670.02214.48
5.4.00.1700.02314.09
5.3.290.1700.01813.66
5.3.280.1780.02613.50
5.3.270.2070.02413.65
5.3.260.0080.01813.51
5.3.250.0050.02013.59
5.3.240.1780.02313.52
5.3.230.1750.02013.68
5.3.220.1670.02213.77
5.3.210.1820.02313.53
5.3.200.1680.02813.50
5.3.190.1850.01913.64
5.3.180.1780.02213.57
5.3.170.1740.02413.68
5.3.160.1860.02313.67
5.3.150.1790.02113.64
5.3.140.1690.02113.71
5.3.130.1760.02113.70
5.3.120.1940.02613.58
5.3.110.1690.02113.67
5.3.100.1820.02813.25
5.3.90.1420.02013.32
5.3.80.1670.01913.16
5.3.70.1750.02513.36
5.3.60.1820.02313.31
5.3.50.1750.02013.25
5.3.40.1820.02613.20
5.3.30.1780.01813.17
5.3.20.1800.02113.16
5.3.10.1780.02812.93
5.3.00.1700.02013.09
5.2.170.3330.03311.24
5.2.160.2830.02711.00
5.2.150.3000.02310.98
5.2.140.2930.02711.30
5.2.130.2770.02710.95
5.2.120.3000.03010.99
5.2.110.2830.02711.04
5.2.100.2930.03010.94
5.2.90.2930.02711.11
5.2.80.2930.03010.93
5.2.70.2870.03310.94
5.2.60.2730.03310.92
5.2.50.2930.02310.87
5.2.40.2430.02710.90
5.2.30.2230.03010.98
5.2.20.2330.03010.98
5.2.10.2470.03010.78
5.2.00.2500.03010.81
5.1.60.2330.0239.86
5.1.50.2700.0239.97
5.1.40.2370.02310.09
5.1.30.2300.02710.29
5.1.20.2170.03010.52
5.1.10.2200.02310.04
5.1.00.2170.02710.04
5.0.50.1100.0208.55
5.0.40.1230.0138.32
5.0.30.1370.0338.38
5.0.20.1200.0138.32
5.0.10.1400.0208.32
5.0.00.1300.0338.32
4.4.90.1370.0178.32
4.4.80.1370.0208.32
4.4.70.1170.0138.32
4.4.60.1130.0178.32
4.4.50.1270.0178.32
4.4.40.1170.0278.32
4.4.30.1400.0208.32
4.4.20.1370.0138.32
4.4.10.1100.0178.32
4.4.00.1100.0238.32
4.3.110.1130.0138.32
4.3.100.1170.0138.32
4.3.90.1330.0138.32
4.3.80.1370.0208.32
4.3.70.1030.0208.32
4.3.60.1070.0178.32
4.3.50.1170.0138.32
4.3.40.1100.0278.32
4.3.30.0730.0208.32
4.3.20.0530.0178.32
4.3.10.0570.0138.32
4.3.00.0600.0208.32

preferences:
43.58 ms | 401 KiB | 5 Q