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:", 11) . " $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.0030.01416.88
8.3.50.0120.00322.11
8.3.40.0030.01718.94
8.3.30.0040.01119.04
8.3.20.0090.00020.30
8.3.10.0060.00323.45
8.3.00.0080.00020.90
8.2.180.0070.01016.75
8.2.170.0150.00022.96
8.2.160.0100.00320.24
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0080.00019.61
8.2.110.0060.00322.23
8.2.100.0110.00417.72
8.2.90.0000.00819.08
8.2.80.0000.00817.97
8.2.70.0030.00617.75
8.2.60.0000.00817.80
8.2.50.0040.00418.07
8.2.40.0060.00319.86
8.2.30.0030.00518.18
8.2.20.0030.00717.86
8.2.10.0030.00518.22
8.2.00.0030.00619.60
8.1.280.0120.00325.92
8.1.270.0060.00324.14
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.91
8.1.230.0070.00419.06
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0070.00317.50
8.1.190.0030.00617.35
8.1.180.0000.00818.10
8.1.170.0050.00318.59
8.1.160.0080.00022.11
8.1.150.0050.00318.82
8.1.140.0050.00217.69
8.1.130.0000.00717.88
8.1.120.0000.00717.61
8.1.110.0000.00817.54
8.1.100.0030.00517.63
8.1.90.0030.00517.57
8.1.80.0030.00617.50
8.1.70.0050.00317.64
8.1.60.0000.01217.80
8.1.50.0050.00517.65
8.1.40.0030.00617.77
8.1.30.0040.00417.80
8.1.20.0050.00317.84
8.1.10.0060.00317.73
8.1.00.0050.00317.51
8.0.300.0020.00518.77
8.0.290.0050.00316.88
8.0.280.0040.00418.50
8.0.270.0040.00417.22
8.0.260.0040.00417.30
8.0.250.0070.00017.09
8.0.240.0060.00317.08
8.0.230.0000.00717.05
8.0.220.0000.00717.05
8.0.210.0070.00016.97
8.0.200.0070.00017.00
8.0.190.0040.00417.19
8.0.180.0040.00417.04
8.0.170.0040.00417.07
8.0.160.0000.00816.95
8.0.150.0070.00017.07
8.0.140.0000.00817.04
8.0.130.0030.00313.45
8.0.120.0080.00017.04
8.0.110.0040.00416.89
8.0.100.0000.00816.97
8.0.90.0040.00416.97
8.0.80.0070.01016.98
8.0.70.0000.00716.98
8.0.60.0000.00716.98
8.0.50.0050.00316.94
8.0.30.0110.00817.16
8.0.20.0070.01117.44
8.0.10.0000.00817.02
8.0.00.0060.01217.04
7.4.330.0050.00015.05
7.4.320.0000.00716.72
7.4.300.0000.00616.73
7.4.290.0030.00316.84
7.4.280.0040.00416.84
7.4.270.0000.00716.76
7.4.260.0050.00216.71
7.4.250.0040.00416.80
7.4.240.0040.00316.79
7.4.230.0070.00016.88
7.4.220.0030.01316.75
7.4.210.0030.01716.79
7.4.200.0000.00716.75
7.4.160.0100.00716.84
7.4.150.0030.01617.40
7.4.140.0090.00817.86
7.4.130.0070.01016.92
7.4.120.0100.00816.66
7.4.110.0080.01116.52
7.4.100.0060.01216.92
7.4.90.0110.00716.64
7.4.80.0060.01619.39
7.4.70.0070.01116.70
7.4.60.0070.01016.68
7.4.50.0000.00716.74
7.4.40.0060.01216.74
7.4.30.0120.00616.65
7.4.00.0070.01115.12
7.3.330.0040.00413.32
7.3.320.0000.00613.28
7.3.310.0030.00316.37
7.3.300.0070.00016.47
7.3.290.0080.00816.55
7.3.280.0050.01216.51
7.3.270.0100.01617.40
7.3.260.0090.00916.66
7.3.250.0090.01016.78
7.3.240.0060.01516.54
7.3.230.0060.01016.79
7.3.210.0060.01316.84
7.3.200.0060.01519.39
7.3.190.0120.00616.76
7.3.180.0080.00916.75
7.3.170.0040.01816.67
7.3.160.0070.01116.68
7.3.120.0100.00715.04
7.3.10.0120.00416.94
7.3.00.0070.00316.81
7.2.330.0090.00916.84
7.2.320.0140.00716.66
7.2.310.0070.01016.79
7.2.300.0100.01016.89
7.2.290.0090.00916.58
7.2.130.0000.01317.16
7.2.120.0070.00716.88
7.2.110.0090.00516.93
7.2.100.0030.01216.88
7.2.90.0050.00916.97
7.2.80.0070.00416.97
7.2.70.0040.00917.05
7.2.60.0050.01017.09
7.2.50.0020.01117.18
7.2.40.0070.00817.21
7.2.30.0090.00717.04
7.2.20.0040.01116.88
7.2.10.0090.00517.08
7.2.00.0080.00417.88
7.1.250.0030.01215.67
7.1.230.0030.01016.12
7.1.220.0030.00915.88
7.1.210.0070.00716.01
7.1.200.0040.00415.95
7.1.190.0060.00616.11
7.1.180.0090.00616.02
7.1.170.0090.00316.22
7.1.160.0090.00615.83
7.1.150.0060.00616.17
7.1.140.0000.01315.82
7.1.130.0070.00716.02
7.1.120.0090.00616.11
7.1.110.0030.00916.05
7.1.100.0100.00617.20
7.1.90.0030.00916.16
7.1.80.0030.01015.94
7.1.70.0070.00516.63
7.1.60.0070.00917.99
7.1.50.0070.01316.55
7.1.40.0030.01216.27
7.1.30.0110.00416.21
7.1.20.0030.01615.85
7.1.10.0070.00715.80
7.1.00.0050.04219.12
7.0.310.0100.00715.80
7.0.300.0030.01015.75
7.0.290.0030.00915.44
7.0.280.0000.01115.62
7.0.270.0060.00315.68
7.0.260.0030.01015.55
7.0.250.0070.00315.46
7.0.240.0000.00915.36
7.0.230.0070.00715.55
7.0.220.0030.00715.61
7.0.210.0030.01015.61
7.0.200.0030.00716.24
7.0.190.0030.00915.87
7.0.180.0120.00315.53
7.0.170.0030.00715.71
7.0.160.0070.00715.59
7.0.150.0060.00915.49
7.0.140.0070.03718.82
7.0.130.0030.01015.40
7.0.120.0040.00415.68
7.0.110.0000.00815.62
7.0.100.0030.00915.59
7.0.90.0030.00915.62
7.0.80.0030.00715.61
7.0.70.0070.00015.24
7.0.60.0070.04317.83
7.0.50.0110.03216.76
7.0.40.0050.02516.99
7.0.30.0160.04516.89
7.0.20.0070.03316.80
7.0.10.0030.05116.79
7.0.00.0070.04816.94
5.6.380.0030.01214.34
5.6.370.0070.00314.34
5.6.360.0000.01314.50
5.6.350.0030.01214.59
5.6.340.0070.00714.41
5.6.330.0070.00714.59
5.6.320.0060.00614.35
5.6.310.0060.00614.34
5.6.300.0030.00714.02
5.6.290.0080.00314.53
5.6.280.0050.04017.62
5.6.270.0040.01114.29
5.6.260.0100.00314.12
5.6.250.0090.00014.63
5.6.240.0040.01114.25
5.6.230.0060.00614.54
5.6.220.0060.00614.37
5.6.210.0070.02217.55
5.6.200.0070.04516.34
5.6.190.0140.03917.34
5.6.180.1850.02317.32
5.6.170.0160.04117.33
5.6.160.0100.04117.29
5.6.150.0050.02116.40
5.6.140.0130.03816.28
5.6.130.0030.04816.20
5.6.120.0060.03817.87
5.6.110.0000.04917.64
5.6.100.0090.04217.83
5.6.90.0100.02317.73
5.6.80.0070.02017.28
5.6.70.2220.02517.29
5.6.60.0080.00414.37
5.6.50.0060.00614.41
5.6.40.0100.00714.46
5.6.30.0060.00914.13
5.6.20.0110.00014.34
5.6.10.0040.00814.47
5.6.00.0030.01014.38
5.5.380.0030.00711.16
5.5.370.0030.00911.04
5.5.360.0050.00011.20
5.5.350.0010.04315.61
5.5.340.0050.04214.64
5.5.330.0060.03315.63
5.5.320.0180.04015.53
5.5.310.0130.03315.60
5.5.300.0030.02514.59
5.5.290.0030.04114.51
5.5.280.0030.02415.94
5.5.270.0120.02315.95
5.5.260.0070.04515.93
5.5.250.0090.03915.98
5.5.240.0120.04315.44
5.5.230.0060.00011.10
5.5.220.0030.00811.02
5.5.210.0030.00310.96
5.5.200.0040.00410.83
5.5.190.0060.00611.17
5.5.180.0040.00411.16
5.5.170.0000.01314.14
5.5.160.0030.00310.91
5.5.150.0050.00311.13
5.5.140.0000.01210.93
5.5.130.0100.00011.23
5.5.120.0000.01111.18
5.5.110.0080.00310.80
5.5.100.0040.00411.05
5.5.90.0030.00510.95
5.5.80.0030.01011.14
5.5.70.0080.00010.80
5.5.60.0060.00311.18
5.5.50.0060.00610.98
5.5.40.0060.00311.14
5.5.30.0090.00310.73
5.5.20.0070.00311.03
5.5.10.0060.00611.05
5.5.00.0070.00310.97
5.4.450.0070.03015.19
5.4.440.0380.03015.05
5.4.430.0370.03015.22
5.4.420.0390.00315.20
5.4.410.0140.03015.09
5.4.400.0120.02814.71
5.4.390.0080.03314.81
5.4.380.0170.03514.84
5.4.370.0070.02214.90
5.4.360.0040.02414.89
5.4.350.0040.02411.48
5.4.340.0020.02311.51
5.4.330.0040.00411.09
5.4.320.0060.03411.75
5.4.310.0050.02211.80
5.4.300.0070.02811.79
5.4.290.0100.03211.84
5.4.280.0050.02411.65
5.4.270.0090.02611.70
5.4.260.0080.04211.54
5.4.250.0100.02711.69
5.4.240.0120.03211.67
5.4.230.0070.03111.59
5.4.220.0120.03111.60
5.4.210.0090.03111.56
5.4.200.0060.02611.64
5.4.190.0080.03811.59
5.4.180.0070.02011.63
5.4.170.0060.02211.63
5.4.160.0110.03211.77
5.4.150.0100.02311.66
5.4.140.0090.03611.45
5.4.130.0170.05211.34
5.4.120.0060.03411.52
5.4.110.0080.06511.45
5.4.100.0090.02211.54
5.4.90.0100.04311.46
5.4.80.0080.02711.45
5.4.70.0070.02811.52
5.4.60.0070.03211.57
5.4.50.0070.02211.45
5.4.40.0140.03511.49
5.4.30.0150.04911.56
5.4.20.0160.04211.54
5.4.10.0130.04211.53
5.4.00.0070.03611.18
5.3.290.0060.02311.71
5.3.280.0140.05211.66
5.3.270.0080.03011.67
5.3.260.0070.03711.66
5.3.250.0040.03611.67
5.3.240.0090.04311.67
5.3.230.0040.02511.66
5.3.220.0070.04711.65
5.3.210.0180.05511.65
5.3.200.0130.03211.65
5.3.190.0110.02111.65
5.3.180.0050.03611.64
5.3.170.0060.03211.64
5.3.160.0040.02911.64
5.3.150.0150.03011.64
5.3.140.0080.03011.64
5.3.130.0120.04111.63
5.3.120.0080.02411.63
5.3.110.0080.02411.63
5.3.100.0080.02411.37
5.3.90.0070.02311.35
5.3.80.0070.02611.34
5.3.70.0150.04011.34
5.3.60.0090.02011.34
5.3.50.0080.02711.31
5.3.40.0140.02511.31
5.3.30.0080.04011.28
5.3.20.0110.04811.17
5.3.10.0080.02711.16
5.3.00.0060.02511.15
5.2.170.0040.0259.90
5.2.160.0070.0199.90
5.2.150.0080.0159.90
5.2.140.0070.0239.90
5.2.130.0100.0239.88
5.2.120.0040.0179.88
5.2.110.0060.0179.88
5.2.100.0060.0139.88
5.2.90.0040.0179.88
5.2.80.0080.0229.88
5.2.70.0070.0169.88
5.2.60.0050.0179.86
5.2.50.0050.0179.84
5.2.40.0050.0179.83
5.2.30.0040.0169.81
5.2.20.0050.0219.81
5.2.10.0040.0229.77
5.2.00.0050.0209.70
5.1.60.0030.0169.34
5.1.50.0060.0199.34
5.1.40.0030.0209.33
5.1.30.0040.0199.51
5.1.20.0060.0229.52
5.1.10.0050.0159.38
5.1.00.0040.0169.38
5.0.50.0060.0148.62
5.0.40.0080.0098.55
5.0.30.0080.0248.45
5.0.20.0040.0138.44
5.0.10.0050.0148.43
5.0.00.0030.0188.43
4.4.90.0030.0117.70
4.4.80.0010.0117.68
4.4.70.0020.0117.68
4.4.60.0000.0127.69
4.4.50.0020.0117.69
4.4.40.0030.0157.66
4.4.30.0030.0127.69
4.4.20.0020.0117.73
4.4.10.0030.0097.73
4.4.00.0020.0167.68
4.3.110.0020.0117.64
4.3.100.0040.0097.64
4.3.90.0040.0077.62
4.3.80.0050.0137.60
4.3.70.0040.0077.62
4.3.60.0030.0087.62
4.3.50.0020.0107.62
4.3.40.0030.0147.58
4.3.30.0040.0076.95
4.3.20.0010.0126.94
4.3.10.0010.0136.92
4.3.00.0080.0108.52

preferences:
35.27 ms | 401 KiB | 5 Q