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.60.0130.01018.50
8.3.50.0070.00922.18
8.3.40.0100.00618.96
8.3.30.0100.00318.88
8.3.20.0070.00020.18
8.3.10.0000.00823.65
8.3.00.0030.00620.69
8.2.180.0150.00316.63
8.2.170.0140.00022.96
8.2.160.0060.00820.35
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00019.48
8.2.110.0030.00622.20
8.2.100.0090.00317.97
8.2.90.0040.00419.13
8.2.80.0000.00817.97
8.2.70.0080.00017.88
8.2.60.0060.00317.93
8.2.50.0000.01018.07
8.2.40.0000.00820.13
8.2.30.0040.00418.16
8.2.20.0040.00417.75
8.2.10.0060.00318.14
8.2.00.0050.00319.62
8.1.280.0060.00925.92
8.1.270.0000.00823.78
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.89
8.1.230.0040.00719.06
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0080.00417.47
8.1.190.0030.00517.48
8.1.180.0030.00518.10
8.1.170.0000.00918.78
8.1.160.0000.00822.01
8.1.150.0030.00518.82
8.1.140.0000.00717.57
8.1.130.0000.00717.86
8.1.120.0000.00817.65
8.1.110.0040.00417.66
8.1.100.0040.00417.60
8.1.90.0040.00417.55
8.1.80.0060.00317.59
8.1.70.0020.00517.59
8.1.60.0070.00317.75
8.1.50.0030.00617.70
8.1.40.0000.00817.68
8.1.30.0080.00017.84
8.1.20.0000.00817.76
8.1.10.0080.00017.61
8.1.00.0060.00317.62
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00518.36
8.0.270.0070.00017.20
8.0.260.0040.00417.29
8.0.250.0000.00717.16
8.0.240.0100.00017.13
8.0.230.0000.00717.13
8.0.220.0040.00416.96
8.0.210.0000.00717.08
8.0.200.0080.00017.07
8.0.190.0040.00416.98
8.0.180.0000.00817.09
8.0.170.0040.00417.03
8.0.160.0030.00517.09
8.0.150.0070.00016.95
8.0.140.0000.00817.01
8.0.130.0000.00613.55
8.0.120.0060.00317.02
8.0.110.0040.00416.95
8.0.100.0040.00416.94
8.0.90.0000.00816.95
8.0.80.0160.00017.01
8.0.70.0000.00816.88
8.0.60.0070.00017.05
8.0.50.0000.00816.88
8.0.30.0090.01017.27
8.0.20.0120.01117.41
8.0.10.0000.00717.27
8.0.00.0100.00817.13
7.4.330.0050.00015.17
7.4.320.0030.00316.82
7.4.300.0030.00316.85
7.4.290.0000.00716.65
7.4.280.0030.00616.63
7.4.270.0070.00016.76
7.4.260.0000.00716.68
7.4.250.0060.00316.83
7.4.240.0000.00716.76
7.4.230.0050.00316.64
7.4.220.0080.01116.75
7.4.210.0040.01116.74
7.4.200.0000.00716.85
7.4.160.0080.00816.55
7.4.150.0160.00317.40
7.4.140.0110.00717.86
7.4.130.0130.00816.66
7.4.120.0050.01316.70
7.4.110.0130.00416.61
7.4.100.0140.00716.54
7.4.90.0030.01416.76
7.4.80.0060.01319.39
7.4.70.0140.00716.72
7.4.60.0100.00716.54
7.4.50.0000.00516.64
7.4.40.0070.01116.61
7.4.30.0040.01416.57
7.4.00.0070.00715.16
7.3.330.0070.00013.23
7.3.320.0000.00513.21
7.3.310.0020.00516.34
7.3.300.0070.00016.52
7.3.290.0060.00916.48
7.3.280.0090.01116.51
7.3.270.0090.01217.40
7.3.260.0130.00816.48
7.3.250.0100.01016.60
7.3.240.0150.00516.64
7.3.230.0150.00916.73
7.3.210.0160.00316.86
7.3.200.0120.00619.39
7.3.190.0120.01116.72
7.3.180.0050.01116.57
7.3.170.0080.00816.51
7.3.160.0070.01016.79
7.3.120.0060.00914.80
7.2.330.0180.00716.75
7.2.320.0070.01416.66
7.2.310.0120.00416.70
7.2.300.0050.01216.89
7.2.290.0070.01016.71
7.2.00.0000.01319.87
7.1.100.0130.00618.17
7.1.70.0000.00717.59
7.1.60.0090.01519.70
7.1.50.0100.01017.20
7.1.00.0000.08022.47
7.0.200.0050.00217.00
7.0.140.0070.07022.01
7.0.60.0200.07719.98
7.0.50.0070.08017.94
7.0.40.0070.04320.34
7.0.30.0200.05020.06
7.0.20.0270.04720.20
7.0.10.0270.07720.02
7.0.00.0100.06320.02
5.6.280.0030.07321.02
5.6.210.0030.08020.75
5.6.200.0030.05318.11
5.6.190.0100.04720.61
5.6.180.0030.05020.67
5.6.170.0230.08320.52
5.6.160.0170.07020.43
5.6.150.0030.07018.27
5.6.140.0070.08318.07
5.6.130.0000.07318.20
5.6.120.0000.05321.03
5.6.110.0030.05021.00
5.6.100.0030.08020.97
5.6.90.0000.04721.05
5.6.80.0100.08020.40
5.6.70.4230.03720.41
5.5.350.0100.07320.42
5.5.340.0030.08717.98
5.5.330.0000.05720.36
5.5.320.0070.05320.41
5.5.310.0300.06720.24
5.5.300.0130.07317.95
5.5.290.0100.04318.02
5.5.280.0030.08720.87
5.5.270.0070.09020.79
5.5.260.0170.07020.68
5.5.250.0100.08320.78
5.5.240.0200.06720.35
5.4.450.0530.03019.27
5.4.440.0370.03719.46
5.4.430.0370.04719.09
5.4.420.0130.05719.48
5.4.410.0330.04319.35
5.4.400.0270.03318.94
5.4.390.0230.04719.25
5.4.380.0130.06318.68
5.4.370.0200.05018.56
5.4.360.0170.05718.51
5.4.350.0200.06718.61
5.4.340.0200.05018.50
5.4.320.0070.03412.46
5.4.310.0080.04612.46
5.4.300.0080.03812.47
5.4.290.0080.03912.47
5.4.280.0080.04312.36
5.4.270.0090.04412.36
5.4.260.0040.04512.36
5.4.250.0080.03812.36
5.4.240.0050.04312.36
5.4.230.0070.04812.36
5.4.220.0060.04112.36
5.4.210.0090.03912.35
5.4.200.0080.05012.36
5.4.190.0070.04812.35
5.4.180.0080.03712.35
5.4.170.0060.05312.36
5.4.160.0070.04612.35
5.4.150.0050.03812.35
5.4.140.0050.04012.03
5.4.130.0050.03712.02
5.4.120.0050.03611.98
5.4.110.0050.03611.98
5.4.100.0050.03711.98
5.4.90.0110.03311.98
5.4.80.0100.03711.98
5.4.70.0100.03311.97
5.4.60.0130.04311.97
5.4.50.0100.04711.97
5.4.40.0080.04511.96
5.4.30.0060.03911.96
5.4.20.0050.03711.95
5.4.10.0050.03611.95
5.4.00.0070.03511.45
5.3.290.0110.04312.80
5.3.280.0070.03712.71
5.3.270.0080.03812.73
5.3.260.0070.04012.71
5.3.250.0080.03512.71
5.3.240.0060.03712.72
5.3.230.0040.04212.70
5.3.220.0070.03812.68
5.3.210.0110.05012.68
5.3.200.0140.04512.68
5.3.190.0050.04912.68
5.3.180.0170.04312.67
5.3.170.0140.05012.67
5.3.160.0080.04812.67
5.3.150.0070.05512.67
5.3.140.0100.05012.66
5.3.130.0060.05412.66
5.3.120.0100.05012.66
5.3.110.0070.04112.66
5.3.100.0050.03812.12
5.3.90.0090.03312.09
5.3.80.0040.03812.07
5.3.70.0040.03812.08
5.3.60.0050.03612.06
5.3.50.0080.03312.00
5.3.40.0050.03712.00
5.3.30.0090.03211.95
5.3.20.0080.03311.73
5.3.10.0040.03711.70
5.3.00.0040.03911.68
5.2.170.0050.0339.18
5.2.160.0070.0329.18
5.2.150.0090.0329.18
5.2.140.0070.0339.18
5.2.130.0060.0349.14
5.2.120.0090.0289.14
5.2.110.0090.0299.14
5.2.100.0070.0319.14
5.2.90.0020.0349.14
5.2.80.0060.0319.14
5.2.70.0040.0309.14
5.2.60.0060.0299.10
5.2.50.0040.0329.07
5.2.40.0060.0289.04
5.2.30.0040.0359.01
5.2.20.0050.0329.02
5.2.10.0110.0328.92
5.2.00.0060.0408.79
5.1.60.0060.0338.07
5.1.50.0080.0328.06
5.1.40.0050.0248.05
5.1.30.0060.0258.40
5.1.20.0060.0248.42
5.1.10.0010.0288.15
5.1.00.0040.0298.14
5.0.50.0060.0216.62
5.0.40.0050.0196.48
5.0.30.0050.0326.29
5.0.20.0090.0206.27
5.0.10.0040.0246.25
5.0.00.0040.0356.24
4.4.90.0050.0194.78
4.4.80.0050.0194.76
4.4.70.0050.0194.75
4.4.60.0050.0194.76
4.4.50.0050.0154.77
4.4.40.0080.0204.71
4.4.30.0050.0144.76
4.4.20.0020.0174.84
4.4.10.0010.0184.85
4.4.00.0050.0294.76
4.3.110.0030.0164.67
4.3.100.0010.0224.67
4.3.90.0050.0174.63
4.3.80.0050.0274.58
4.3.70.0050.0194.63
4.3.60.0060.0204.63
4.3.50.0030.0154.62
4.3.40.0020.0254.54
4.3.30.0050.0193.28
4.3.20.0020.0213.26
4.3.10.0060.0203.23
4.3.00.0070.01712.34

preferences:
52.69 ms | 401 KiB | 5 Q