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.0150.00416.88
8.3.50.0120.00622.19
8.3.40.0110.01118.79
8.3.30.0070.00718.96
8.3.20.0040.00420.33
8.3.10.0050.00323.58
8.3.00.0040.00420.77
8.2.180.0070.01116.85
8.2.170.0180.00422.96
8.2.160.0100.00320.35
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0050.00226.16
8.2.120.0060.00319.48
8.2.110.0060.00320.57
8.2.100.0060.00617.97
8.2.90.0080.00019.01
8.2.80.0000.00817.97
8.2.70.0090.00017.61
8.2.60.0120.00018.04
8.2.50.0060.00318.07
8.2.40.0040.00420.20
8.2.30.0080.00018.41
8.2.20.0030.00618.02
8.2.10.0000.00818.05
8.2.00.0000.00819.59
8.1.280.0120.00925.92
8.1.270.0160.00323.89
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.88
8.1.230.0090.00317.64
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0100.00017.50
8.1.190.0080.00017.35
8.1.180.0040.00418.10
8.1.170.0030.00918.63
8.1.160.0070.00021.95
8.1.150.0000.00718.69
8.1.140.0050.00317.69
8.1.130.0000.00817.87
8.1.120.0000.00717.63
8.1.110.0000.00817.64
8.1.100.0080.00017.62
8.1.90.0040.00417.69
8.1.80.0000.00817.62
8.1.70.0030.00317.61
8.1.60.0000.01317.63
8.1.50.0030.00617.69
8.1.40.0030.00517.75
8.1.30.0030.00617.85
8.1.20.0040.00417.80
8.1.10.0050.00217.73
8.1.00.0040.00417.59
8.0.300.0040.00418.77
8.0.290.0000.00816.88
8.0.280.0070.00018.43
8.0.270.0040.00417.21
8.0.260.0000.00617.21
8.0.250.0000.00817.09
8.0.240.0030.00317.02
8.0.230.0030.00517.15
8.0.220.0040.00416.96
8.0.210.0040.00316.97
8.0.200.0030.00317.02
8.0.190.0040.00417.05
8.0.180.0000.00717.13
8.0.170.0040.00417.10
8.0.160.0040.00417.05
8.0.150.0080.00017.06
8.0.140.0070.00016.98
8.0.130.0000.00613.45
8.0.120.0000.00816.99
8.0.110.0000.00817.03
8.0.100.0040.00416.96
8.0.90.0040.00417.04
8.0.80.0100.00716.98
8.0.70.0050.00216.89
8.0.60.0000.00717.07
8.0.50.0000.00816.96
8.0.30.0060.01317.37
8.0.20.0060.01417.40
8.0.10.0050.00317.18
8.0.00.0130.00516.77
7.4.330.0030.00315.18
7.4.320.0030.00316.65
7.4.300.0030.00316.84
7.4.290.0030.00316.73
7.4.280.0060.00616.68
7.4.270.0040.00416.82
7.4.260.0000.00716.76
7.4.250.0000.00816.65
7.4.240.0020.00516.79
7.4.230.0030.00316.94
7.4.220.0110.00816.77
7.4.210.0140.00716.74
7.4.200.0000.00716.86
7.4.160.0060.01116.59
7.4.150.0240.00417.40
7.4.140.0090.00917.86
7.4.130.0090.00916.66
7.4.120.0110.01016.71
7.4.110.0080.00816.82
7.4.100.0060.01216.62
7.4.90.0100.00816.65
7.4.80.0070.01119.39
7.4.70.0100.00716.80
7.4.60.0040.01716.70
7.4.50.0000.00816.62
7.4.40.0130.00616.84
7.4.30.0100.00716.79
7.4.10.0080.01114.90
7.4.00.0070.00914.91
7.3.330.0060.00013.36
7.3.320.0030.00313.23
7.3.310.0070.00016.44
7.3.300.0050.00316.34
7.3.290.0100.00316.54
7.3.280.0090.01016.54
7.3.270.0110.00817.40
7.3.260.0150.00316.79
7.3.250.0050.01616.57
7.3.240.0030.01416.46
7.3.230.0190.00016.78
7.3.210.0140.00716.56
7.3.200.0110.00719.39
7.3.190.0150.00416.69
7.3.180.0100.01016.59
7.3.170.0100.00616.68
7.3.160.0080.00816.54
7.3.130.0100.00715.26
7.3.120.0050.01315.05
7.3.110.0060.01215.01
7.3.100.0040.00715.12
7.3.90.0060.00614.75
7.3.80.0030.01015.09
7.3.70.0040.01115.26
7.3.60.0000.01515.00
7.3.50.0030.01014.93
7.3.40.0000.01214.98
7.3.30.0070.00715.08
7.3.20.0030.01016.57
7.3.10.0110.00516.91
7.3.00.0020.01216.79
7.2.330.0060.01216.76
7.2.320.0060.01116.75
7.2.310.0100.00716.77
7.2.300.0140.00316.84
7.2.290.0030.01316.82
7.2.260.0030.01415.35
7.2.250.0040.01415.30
7.2.240.0120.00315.19
7.2.230.0150.00315.37
7.2.220.0070.01015.11
7.2.210.0120.00415.34
7.2.200.0000.01415.42
7.2.190.0060.00615.23
7.2.180.0130.01015.11
7.2.170.0000.00915.23
7.2.160.0040.00715.36
7.2.150.0120.00417.36
7.2.140.0040.01417.21
7.2.130.0070.00517.15
7.2.120.0120.00417.09
7.2.110.0090.00616.90
7.2.100.0030.00817.04
7.2.90.0090.00417.01
7.2.80.0090.00617.20
7.2.70.0050.01017.18
7.2.60.0070.00917.11
7.2.50.0110.00617.19
7.2.40.0100.00416.96
7.2.30.0080.00517.10
7.2.20.0050.00917.01
7.2.10.0090.00917.17
7.2.00.0090.00417.01
7.1.330.0060.00915.92
7.1.320.0040.00816.00
7.1.310.0040.00715.91
7.1.300.0070.01015.98
7.1.290.0000.01715.97
7.1.280.0000.01116.15
7.1.270.0030.00616.14
7.1.260.0000.01416.14
7.1.250.0080.00515.75
7.1.240.0040.00816.04
7.1.230.0000.01016.04
7.1.220.0100.00015.98
7.1.210.0070.00316.09
7.1.200.0100.00716.05
7.1.190.0040.01515.74
7.1.180.0070.00715.71
7.1.170.0000.01415.84
7.1.160.0120.00315.90
7.1.150.0070.00415.85
7.1.140.0080.00815.82
7.1.130.0060.00616.00
7.1.120.0120.00016.08
7.1.110.0000.00816.23
7.1.100.0440.00616.22
7.1.90.0060.00615.75
7.1.80.0100.00315.93
7.1.70.0060.00616.74
7.1.60.0090.00917.87
7.1.50.0070.01116.70
7.1.40.0060.00616.03
7.1.30.0040.00716.03
7.1.20.0070.00716.00
7.1.10.0000.01115.94
7.1.00.0000.04719.19
7.0.330.0060.00615.64
7.0.320.0070.00715.77
7.0.310.0030.01215.67
7.0.300.0060.00315.57
7.0.290.0060.00915.73
7.0.280.0130.00315.60
7.0.270.0000.01115.63
7.0.260.0060.00315.59
7.0.250.0000.01115.74
7.0.240.0040.00415.47
7.0.230.0100.00315.76
7.0.220.0040.00815.81
7.0.210.0040.00815.55
7.0.200.0030.00616.43
7.0.190.0060.00615.77
7.0.180.0030.00915.75
7.0.170.0060.00915.74
7.0.160.0100.00315.55
7.0.150.0060.01215.73
7.0.140.0060.03918.81
7.0.130.0080.00415.69
7.0.120.0000.01315.58
7.0.110.0070.00715.34
7.0.100.0070.00715.56
7.0.90.0000.01415.75
7.0.80.0030.00715.42
7.0.70.0060.00915.70
7.0.60.0050.04917.76
7.0.50.0050.03816.77
7.0.40.0100.03017.08
7.0.30.0120.04416.91
7.0.20.0170.04316.99
7.0.10.0130.02816.93
7.0.00.0080.03016.95
5.6.400.0040.00414.63
5.6.390.0030.01514.73
5.6.380.0100.00313.92
5.6.370.0120.00314.51
5.6.360.0030.01014.38
5.6.350.0000.01714.60
5.6.340.0060.00314.04
5.6.330.0000.00814.46
5.6.320.0070.00714.20
5.6.310.0040.00714.56
5.6.300.0060.01014.71
5.6.290.0070.00714.23
5.6.280.0050.04017.78
5.6.270.0070.01014.66
5.6.260.0100.00314.36
5.6.250.0070.00714.45
5.6.240.0070.00714.28
5.6.230.0130.00014.36
5.6.220.0060.01014.33
5.6.210.0080.03917.57
5.6.200.0020.05216.33
5.6.190.0050.03317.38
5.6.180.0050.02317.46
5.6.170.0170.04217.42
5.6.160.0060.04817.47
5.6.150.0090.01916.31
5.6.140.0060.02316.17
5.6.130.0050.03816.19
5.6.120.0030.02817.73
5.6.110.0170.01717.70
5.6.100.0110.04117.60
5.6.90.0060.02517.78
5.6.80.0030.02517.55
5.6.70.2330.01817.29
5.6.60.0070.00414.09
5.6.50.0040.01214.09
5.6.40.0030.01314.39
5.6.30.0030.01214.30
5.6.20.0100.00314.35
5.6.10.0080.00414.29
5.6.00.0100.00314.27
5.5.380.0030.00614.09
5.5.370.0060.00914.11
5.5.360.0030.00714.36
5.5.350.0050.04117.30
5.5.340.0110.02316.22
5.5.330.0060.02917.10
5.5.320.0070.04417.41
5.5.310.0150.04717.31
5.5.300.0060.03416.23
5.5.290.0030.02616.09
5.5.280.0020.03617.66
5.5.270.0080.04817.62
5.5.260.0050.02517.82
5.5.250.0140.03217.50
5.5.240.0080.04017.33
5.5.230.0070.00714.32
5.5.220.0030.00614.09
5.5.210.0040.00814.27
5.5.200.0030.01014.03
5.5.190.0120.00314.32
5.5.180.0000.01514.48
5.5.170.0000.01514.30
5.5.160.0030.01014.40
5.5.150.0060.00914.20
5.5.140.0100.00614.44
5.5.130.0120.00014.38
5.5.120.0030.01014.51
5.5.110.0000.01314.30
5.5.100.0070.00314.19
5.5.90.0000.01714.30
5.5.80.0030.01214.21
5.5.70.0000.01014.32
5.5.60.0070.00414.12
5.5.50.0060.01314.42
5.5.40.0040.01114.24
5.5.30.0130.00014.13
5.5.20.0040.00414.13
5.5.10.0090.00614.36
5.5.00.0030.01014.46
5.4.450.0180.02715.96
5.4.440.0230.02515.82
5.4.430.0750.02815.92
5.4.420.0280.02815.89
5.4.410.0210.02615.87
5.4.400.0060.02915.76
5.4.390.0270.02315.65
5.4.380.0480.03015.46
5.4.370.0320.03315.56
5.4.360.0320.03215.44
5.4.350.0510.03515.46
5.4.340.0430.03015.55
5.4.330.0030.00812.38
5.4.320.0060.02012.43
5.4.310.0030.03012.42
5.4.300.0060.02212.42
5.4.290.0040.02412.42
5.4.280.0040.02012.37
5.4.270.0040.02212.37
5.4.260.0050.02412.37
5.4.250.0040.02012.37
5.4.240.0080.02012.37
5.4.230.0050.02212.37
5.4.220.0080.02012.37
5.4.210.0080.01912.37
5.4.200.0070.01812.37
5.4.190.0050.02112.37
5.4.180.0090.01812.37
5.4.170.0080.02012.37
5.4.160.0070.01812.37
5.4.150.0050.02212.37
5.4.140.0020.02412.21
5.4.130.0060.02012.20
5.4.120.0050.02212.18
5.4.110.0060.02112.18
5.4.100.0080.02012.18
5.4.90.0060.02112.18
5.4.80.0040.02212.18
5.4.70.0060.02312.18
5.4.60.0080.02112.18
5.4.50.0080.02312.18
5.4.40.0020.02212.17
5.4.30.0060.02212.17
5.4.20.0090.01812.17
5.4.10.0040.02112.17
5.4.00.0060.02311.91
5.3.290.0050.02312.59
5.3.280.0060.02012.54
5.3.270.0040.02212.55
5.3.260.0080.02212.55
5.3.250.0040.02412.55
5.3.240.0070.02312.55
5.3.230.0040.02812.55
5.3.220.0090.02112.53
5.3.210.0080.01912.53
5.3.200.0060.02012.53
5.3.190.0040.02512.53
5.3.180.0050.02812.53
5.3.170.0050.02512.53
5.3.160.0050.02212.53
5.3.150.0030.02412.53
5.3.140.0040.02212.52
5.3.130.0060.02112.52
5.3.120.0080.02012.52
5.3.110.0040.02412.52
5.3.100.0040.02412.25
5.3.90.0020.02412.23
5.3.80.0040.02412.23
5.3.70.0040.02412.23
5.3.60.0060.02012.22
5.3.50.0020.02712.19
5.3.40.0050.02012.19
5.3.30.0080.01812.17
5.3.20.0050.02112.05
5.3.10.0050.02712.04
5.3.00.0040.02612.03
5.2.170.0070.0369.19
5.2.160.0080.0389.18
5.2.150.0050.0389.18
5.2.140.0060.0299.18
5.2.130.0080.0279.14
5.2.120.0050.0299.14
5.2.110.0060.0299.14
5.2.100.0030.0319.14
5.2.90.0060.0289.14
5.2.80.0050.0309.14
5.2.70.0050.0309.14
5.2.60.0050.0309.10
5.2.50.0020.0329.07
5.2.40.0050.0289.04
5.2.30.0050.0299.01
5.2.20.0070.0299.00
5.2.10.0040.0308.92
5.2.00.0040.0318.79
5.1.60.0030.0268.07
5.1.50.0020.0288.06
5.1.40.0030.0268.05
5.1.30.0060.0268.40
5.1.20.0060.0258.42
5.1.10.0040.0268.14
5.1.00.0050.0258.14
5.0.50.0040.0226.62
5.0.40.0020.0206.49
5.0.30.0020.0336.29
5.0.20.0030.0236.26
5.0.10.0040.0216.25
5.0.00.0050.0316.24
4.4.90.0050.0134.78
4.4.80.0030.0154.76
4.4.70.0010.0174.76
4.4.60.0030.0164.76
4.4.50.0030.0154.77
4.4.40.0030.0264.70
4.4.30.0040.0144.76
4.4.20.0040.0144.84
4.4.10.0040.0154.85
4.4.00.0040.0234.75
4.3.110.0020.0164.67
4.3.100.0060.0134.67
4.3.90.0050.0174.64
4.3.80.0040.0274.58
4.3.70.0060.0144.63
4.3.60.0050.0154.63
4.3.50.0030.0184.63
4.3.40.0070.0254.54
4.3.30.0060.0153.28
4.3.20.0050.0213.26
4.3.10.0010.0223.22
4.3.00.0070.01712.37

preferences:
38.34 ms | 401 KiB | 5 Q