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 " " . str_pad("$key:", 10) . " $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.60.0120.00918.43
8.3.50.0080.00722.14
8.3.40.0090.00618.74
8.3.30.0070.00719.16
8.3.20.0080.00020.39
8.3.10.0060.00323.70
8.3.00.0080.00020.84
8.2.180.0040.01516.59
8.2.170.0090.00622.96
8.2.160.0070.00720.46
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0060.00319.61
8.2.110.0090.00020.54
8.2.100.0100.00318.03
8.2.90.0000.00819.17
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0030.01017.93
8.2.50.0050.00518.07
8.2.40.0040.00420.07
8.2.30.0050.00218.36
8.2.20.0080.00017.93
8.2.10.0040.00418.04
8.2.00.0040.00419.74
8.1.280.0160.00525.92
8.1.270.0040.00424.09
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00323.98
8.1.230.0050.00517.64
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.47
8.1.190.0040.00417.48
8.1.180.0030.00618.10
8.1.170.0000.00918.77
8.1.160.0040.00421.97
8.1.150.0080.00018.88
8.1.140.0000.00817.65
8.1.130.0040.00417.75
8.1.120.0040.00417.65
8.1.110.0000.00817.67
8.1.100.0050.00317.64
8.1.90.0030.00317.52
8.1.80.0060.00317.51
8.1.70.0000.00717.61
8.1.60.0030.01017.75
8.1.50.0000.00917.59
8.1.40.0000.00817.69
8.1.30.0030.00617.82
8.1.20.0030.00617.83
8.1.10.0030.00517.64
8.1.00.0030.00517.63
8.0.300.0040.00418.77
8.0.290.0070.00017.00
8.0.280.0000.00718.49
8.0.270.0040.00417.31
8.0.260.0030.00317.23
8.0.250.0000.00717.10
8.0.240.0070.00017.12
8.0.230.0030.00317.13
8.0.220.0040.00417.04
8.0.210.0030.00517.08
8.0.200.0000.00617.20
8.0.190.0040.00417.02
8.0.180.0000.00717.07
8.0.170.0040.00417.10
8.0.160.0080.00017.06
8.0.150.0020.00517.05
8.0.140.0050.00216.89
8.0.130.0000.00613.37
8.0.120.0030.00516.95
8.0.110.0000.00716.98
8.0.100.0060.00317.13
8.0.90.0020.00517.09
8.0.80.0030.01217.05
8.0.70.0040.00416.93
8.0.60.0050.00317.10
8.0.50.0050.00217.02
8.0.30.0130.00617.14
8.0.20.0080.01217.40
8.0.10.0040.00417.06
8.0.00.0070.01117.03
7.4.330.0050.00015.04
7.4.320.0070.00016.73
7.4.300.0040.00416.84
7.4.290.0070.00016.71
7.4.280.0040.00416.76
7.4.270.0050.00316.77
7.4.260.0030.00316.71
7.4.250.0000.00716.79
7.4.240.0030.00416.71
7.4.230.0000.00816.86
7.4.220.0060.01216.73
7.4.210.0040.01116.84
7.4.200.0050.00216.63
7.4.160.0080.00816.60
7.4.150.0140.00817.40
7.4.140.0140.00417.86
7.4.130.0100.00816.56
7.4.120.0060.01216.71
7.4.110.0030.01316.65
7.4.100.0030.01816.81
7.4.90.0100.01316.77
7.4.80.0110.00519.39
7.4.70.0100.00716.69
7.4.60.0100.00716.79
7.4.50.0060.00316.67
7.4.40.0080.00816.66
7.4.30.0070.01516.68
7.4.00.0070.01114.89
7.3.330.0050.00013.27
7.3.320.0000.00613.32
7.3.310.0070.00016.46
7.3.300.0050.00316.53
7.3.290.0150.00316.45
7.3.280.0090.01016.54
7.3.270.0080.01217.40
7.3.260.0130.01316.82
7.3.250.0080.00916.77
7.3.240.0060.01516.59
7.3.230.0060.01216.52
7.3.210.0120.00716.86
7.3.200.0090.00919.39
7.3.190.0000.01816.34
7.3.180.0100.00716.66
7.3.170.0160.00716.61
7.3.160.0160.00016.57
7.3.120.0060.01215.22
7.3.10.0070.00716.90
7.3.00.0110.00416.96
7.2.330.0100.00717.00
7.2.320.0100.01016.98
7.2.310.0100.00616.82
7.2.300.0140.00316.80
7.2.290.0120.00916.79
7.2.130.0070.01017.09
7.2.120.0060.00917.11
7.2.110.0000.01417.20
7.2.100.0000.01117.20
7.2.90.0130.00317.04
7.2.80.0100.00317.24
7.2.70.0070.00716.99
7.2.60.0000.01417.23
7.2.50.0070.00417.25
7.2.40.0080.00817.13
7.2.30.0060.01217.02
7.2.20.0040.00816.87
7.2.10.0030.01017.26
7.2.00.0080.00718.50
7.1.250.0030.00616.19
7.1.100.0030.01018.55
7.1.70.0030.00717.41
7.1.60.0130.01319.70
7.1.50.0150.00917.04
7.1.00.0070.06722.57
7.0.200.0000.01217.06
7.0.140.0000.05022.18
7.0.60.0170.07719.89
7.0.50.0030.07017.84
7.0.40.0030.05720.10
7.0.30.0200.05020.23
7.0.20.0300.03720.23
7.0.10.0230.08320.05
7.0.00.0070.09020.15
5.6.280.0070.09021.13
5.6.210.0100.08320.53
5.6.200.0100.07718.13
5.6.190.0070.07720.58
5.6.180.0070.08020.47
5.6.170.0230.04020.62
5.6.160.0100.07020.41
5.6.150.0100.03318.15
5.6.140.0100.03318.21
5.6.130.0070.08018.22
5.6.120.0100.04021.05
5.6.110.0100.07320.98
5.6.100.0030.09020.90
5.6.90.0030.04721.07
5.6.80.0000.04020.34
5.6.70.4230.04020.41
5.5.350.0030.08720.38
5.5.340.0000.04017.92
5.5.330.0070.05020.19
5.5.320.0000.09020.14
5.5.310.0170.05320.24
5.5.300.0070.08017.95
5.5.290.0030.07317.92
5.5.280.0000.06020.85
5.5.270.0070.05720.65
5.5.260.0100.08020.84
5.5.250.0000.07320.70
5.5.240.0170.06020.26
5.4.450.0430.04019.22
5.4.440.0300.02719.57
5.4.430.0400.03719.13
5.4.420.0400.05019.41
5.4.410.0130.04719.00
5.4.400.0770.04019.10
5.4.390.0200.04319.13
5.4.380.0870.05018.68
5.4.370.0800.05318.62
5.4.360.0800.05018.51
5.4.350.0800.04718.61
5.4.340.0870.04318.71
5.4.320.0070.04112.47
5.4.310.0070.04712.46
5.4.300.0060.03712.47
5.4.290.0090.03912.46
5.4.280.0070.03612.36
5.4.270.0080.03612.36
5.4.260.0060.03912.36
5.4.250.0060.03712.36
5.4.240.0090.03512.36
5.4.230.0080.03712.36
5.4.220.0050.03812.36
5.4.210.0030.03912.36
5.4.200.0050.03912.35
5.4.190.0060.03612.35
5.4.180.0070.03612.34
5.4.170.0060.03812.36
5.4.160.0070.03612.36
5.4.150.0100.03312.35
5.4.140.0080.03612.03
5.4.130.0090.03412.02
5.4.120.0060.03711.99
5.4.110.0060.03811.98
5.4.100.0080.04111.98
5.4.90.0060.04011.98
5.4.80.0110.03411.98
5.4.70.0140.03111.98
5.4.60.0090.03911.98
5.4.50.0110.03211.98
5.4.40.0090.04811.96
5.4.30.0130.03311.96
5.4.20.0140.02811.96
5.4.10.0080.03511.97
5.4.00.0080.03611.45
5.3.290.0060.04812.80
5.3.280.0160.03112.71
5.3.270.0050.04512.73
5.3.260.0060.05512.72
5.3.250.0090.03612.72
5.3.240.0080.03812.72
5.3.230.0060.03912.71
5.3.220.0120.04112.68
5.3.210.0110.05012.68
5.3.200.0110.04712.68
5.3.190.0090.03512.68
5.3.180.0030.04012.67
5.3.170.0060.03812.67
5.3.160.0060.03812.67
5.3.150.0100.03612.68
5.3.140.0090.04912.66
5.3.130.0120.04712.66
5.3.120.0130.04712.66
5.3.110.0100.03912.66
5.3.100.0070.04712.12
5.3.90.0210.03612.08
5.3.80.0050.04012.07
5.3.70.0140.03812.08
5.3.60.0060.03812.06
5.3.50.0060.04012.00
5.3.40.0090.04612.00
5.3.30.0080.04611.95
5.3.20.0090.03511.73
5.3.10.0030.04011.70
5.3.00.0040.04611.68
5.2.170.0030.0369.18
5.2.160.0040.0319.18
5.2.150.0050.0329.18
5.2.140.0040.0339.18
5.2.130.0060.0299.14
5.2.120.0080.0289.14
5.2.110.0060.0309.15
5.2.100.0040.0339.14
5.2.90.0040.0349.14
5.2.80.0070.0419.14
5.2.70.0060.0419.14
5.2.60.0070.0399.10
5.2.50.0100.0379.07
5.2.40.0070.0279.04
5.2.30.0090.0259.02
5.2.20.0060.0279.00
5.2.10.0040.0348.93
5.2.00.0050.0348.78
5.1.60.0040.0278.07
5.1.50.0010.0288.06
5.1.40.0120.0188.05
5.1.30.0050.0268.40
5.1.20.0040.0288.42
5.1.10.0020.0308.14
5.1.00.0070.0248.15
5.0.50.0080.0186.63
5.0.40.0050.0186.48
5.0.30.0040.0316.29
5.0.20.0030.0216.27
5.0.10.0040.0196.25
5.0.00.0020.0316.24
4.4.90.0030.0144.78
4.4.80.0020.0214.75
4.4.70.0020.0234.75
4.4.60.0030.0224.75
4.4.50.0040.0144.77
4.4.40.0010.0284.71
4.4.30.0030.0154.76
4.4.20.0030.0154.84
4.4.10.0020.0214.85
4.4.00.0020.0274.75
4.3.110.0030.0164.67
4.3.100.0060.0114.66
4.3.90.0050.0124.64
4.3.80.0040.0224.59
4.3.70.0030.0144.63
4.3.60.0050.0124.63
4.3.50.0030.0164.63
4.3.40.0020.0264.54
4.3.30.0000.0193.28
4.3.20.0020.0163.26
4.3.10.0030.0153.22
4.3.00.0000.02012.36

preferences:
26.99 ms | 401 KiB | 5 Q