3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = <<<REGEXP ! ^ (?P<scheme> [a-z][a-z0-9+.\-]* ) [:] # scheme is mandatory, and followed by a : (?: [/][/] # // indicates that this component is the authority (?: (?P<user> [^:@/]+ ) (?: [:] (?P<pass> [^:@/]+ ) )? [@] )? # auth details are optional (?P<host> [^:/]* ) # host is mandatory. Technically it should be at least 1 char, but PHP has # internal schemes that violate this rule and as much as I dislike it, I # feel that we should pass this (?: [:] (?P<port> [0-9]+ ) )? # port is simply a sequence of decimal digits (?= [/?#]|$ ) # path must be missing or begin with / if authority is present )? (?P<path> [^?#]+ )? # path is everything up to the query/fragment (?: [?] (?P<query> [^#]+ )? # query is optional (?: [#] (?P<fragment> .+ )? # fragment is optional $ !xi REGEXP; $url = 'http://foo.com/test?thing=stuff#fragment'; preg_match($pattern, $url, $matches); print_r($matches);

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.0040.01116.50
8.3.50.0150.00016.62
8.3.40.0100.00318.88
8.3.30.0140.00018.54
8.3.20.0040.00418.82
8.3.10.0080.00018.90
8.3.00.0050.00319.38
8.2.180.0120.00316.75
8.2.170.0150.00622.96
8.2.160.0130.00320.89
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00419.27
8.2.110.0040.00721.05
8.2.100.0080.00317.78
8.2.90.0040.00419.15
8.2.80.0020.00519.33
8.2.70.0030.00617.38
8.2.60.0060.00317.91
8.2.50.0030.00618.07
8.2.40.0040.00418.09
8.2.30.0030.00617.89
8.2.20.0000.00917.61
8.2.10.0040.00417.75
8.2.00.0070.00317.66
8.1.280.0070.01125.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00722.39
8.1.230.0110.00020.90
8.1.220.0040.00417.74
8.1.210.0050.00618.95
8.1.200.0060.00317.00
8.1.190.0040.00417.41
8.1.180.0040.00418.10
8.1.170.0000.00818.71
8.1.160.0000.00718.90
8.1.150.0040.00418.54
8.1.140.0040.00417.43
8.1.130.0030.00317.75
8.1.120.0000.00817.40
8.1.110.0040.00417.38
8.1.100.0000.00717.29
8.1.90.0070.00017.44
8.1.80.0000.00717.40
8.1.70.0030.00617.30
8.1.60.0070.00017.58
8.1.50.0050.00217.38
8.1.40.0040.00417.35
8.1.30.0030.00617.45
8.1.20.0030.00617.59
8.1.10.0030.00617.54
8.1.00.0070.00017.38
8.0.300.0030.00319.90
8.0.290.0000.00716.63
8.0.280.0040.00418.26
8.0.270.0040.00417.24
8.0.260.0000.00816.73
8.0.250.0000.00716.85
8.0.240.0040.00416.92
8.0.230.0030.00316.93
8.0.220.0000.00716.80
8.0.210.0000.00716.88
8.0.200.0050.00216.84
8.0.190.0040.00416.82
8.0.180.0050.00216.80
8.0.170.0000.00816.69
8.0.160.0030.00316.79
8.0.150.0030.00616.94
8.0.140.0000.00716.86
8.0.130.0060.00013.36
8.0.120.0070.00016.87
8.0.110.0050.00316.79
8.0.100.0000.00716.78
8.0.90.0070.00016.79
8.0.80.0170.00316.84
8.0.70.0070.00016.85
8.0.60.0070.00016.66
8.0.50.0000.00716.92
8.0.30.0110.00717.05
8.0.20.0150.00517.03
8.0.10.0040.00416.95
8.0.00.0070.01116.77
7.4.330.0000.00512.99
7.4.320.0060.00016.52
7.4.300.0000.00616.49
7.4.290.0050.00216.56
7.4.280.0040.00416.46
7.4.270.0000.00716.52
7.4.260.0030.00313.34
7.4.250.0040.00416.48
7.4.240.0020.00516.46
7.4.230.0070.00016.39
7.4.220.0100.01016.67
7.4.210.0090.00616.56
7.4.200.0040.00416.63
7.4.190.0030.00316.67
7.4.160.0110.00516.62
7.4.150.0000.01816.60
7.4.140.0080.01116.42
7.4.130.0100.00716.48
7.4.120.0130.00516.41
7.4.110.0030.01616.51
7.4.100.0100.00616.50
7.4.90.0140.00316.42
7.4.80.0130.00519.39
7.4.70.0090.01216.53
7.4.60.0120.00316.38
7.4.50.0080.00616.52
7.4.40.0070.01016.34
7.4.30.0100.00616.72
7.4.00.0060.01015.05
7.3.330.0070.00013.16
7.3.320.0030.00313.18
7.3.310.0000.00716.30
7.3.300.0030.00316.27
7.3.290.0090.00616.20
7.3.280.0070.01316.25
7.3.270.0070.01016.26
7.3.260.0050.01416.20
7.3.250.0050.01716.31
7.3.240.0100.00616.25
7.3.230.0060.01116.21
7.3.210.0140.00316.37
7.3.200.0130.00316.19
7.3.190.0030.01316.28
7.3.180.0120.00416.32
7.3.170.0090.00916.25
7.3.160.0060.01016.46
7.3.120.0080.00914.70
7.3.110.0060.00614.72
7.3.100.0030.01514.60
7.3.90.0030.01214.80
7.3.80.0060.00914.76
7.3.70.0040.00814.94
7.3.60.0080.00414.62
7.3.50.0070.00714.61
7.3.40.0070.00414.84
7.3.30.0130.00314.66
7.3.20.0070.01016.52
7.3.10.0040.00916.63
7.3.00.0040.00916.49
7.2.330.0140.00616.24
7.2.320.0090.00916.38
7.2.310.0040.01416.45
7.2.300.0130.01016.31
7.2.290.0100.00616.43
7.2.250.0070.01114.97
7.2.240.0030.01514.84
7.2.230.0090.00614.75
7.2.220.0070.00714.79
7.2.210.0110.00714.93
7.2.200.0000.01514.88
7.2.190.0000.00914.80
7.2.180.0040.01114.78
7.2.170.0070.00414.93
7.2.160.0030.01014.81
7.2.150.0060.00616.50
7.2.140.0030.01016.67
7.2.130.0080.00616.63
7.2.120.0060.00716.76
7.2.110.0070.00716.85
7.2.100.0040.00816.57
7.2.90.0070.00716.81
7.2.80.0110.00616.87
7.2.70.0000.01416.60
7.2.60.0110.00416.68
7.2.50.0020.01016.83
7.2.40.0090.00516.88
7.2.30.0030.00916.73
7.2.20.0040.01016.76
7.2.10.0070.00716.75
7.2.00.0050.00917.29
7.1.330.0060.00915.70
7.1.320.0040.00815.72
7.1.310.0050.00515.52
7.1.300.0070.00715.79
7.1.290.0080.00415.62
7.1.280.0040.01115.72
7.1.270.0040.01115.81
7.1.260.0120.00315.87
7.1.250.0050.00715.75
7.1.240.0070.00515.80
7.1.230.0090.00315.64
7.1.220.0090.00315.77
7.1.210.0060.00315.87
7.1.200.0060.00615.61
7.1.190.0020.01115.64
7.1.180.0060.00515.64
7.1.170.0080.00515.65
7.1.160.0070.00515.86
7.1.150.0060.00615.73
7.1.140.0060.00615.57
7.1.130.0020.01015.85
7.1.120.0060.00615.56
7.1.110.0030.00915.88
7.1.100.0040.00716.55
7.1.90.0030.01215.80
7.1.80.0050.00815.81
7.1.70.0070.00616.25
7.1.60.0070.00716.83
7.1.50.0070.00916.13
7.1.40.0020.00815.67
7.1.30.0020.01015.75
7.1.20.0090.00415.56
7.1.10.0040.00615.70
7.1.00.0040.02617.94
7.0.330.0060.00615.38
7.0.320.0060.00515.49
7.0.310.0070.00715.45
7.0.300.0040.00715.41
7.0.290.0050.00715.28
7.0.280.0050.00715.34
7.0.270.0020.00915.41
7.0.260.0050.00815.43
7.0.250.0040.00915.37
7.0.240.0060.00415.49
7.0.230.0100.00515.10
7.0.220.0040.00815.55
7.0.210.0040.00615.39
7.0.200.0050.00715.70
7.0.190.0030.00815.44
7.0.180.0040.00715.53
7.0.170.0070.00515.44
7.0.160.0030.00615.47
7.0.150.0050.00915.42
7.0.140.0110.02317.60
7.0.130.0050.00815.25
7.0.120.0020.02117.67
7.0.110.0020.01015.35
7.0.100.0090.00515.40
7.0.90.0030.00915.34
7.0.80.0050.00715.26
7.0.70.0020.01015.33
7.0.60.0020.02316.94
7.0.50.0090.02916.17
7.0.40.0080.01514.83
7.0.30.0100.03014.84
7.0.20.0030.03614.81
7.0.10.0080.02914.95
7.0.00.0060.03414.86
5.6.400.0100.00714.07
5.6.390.0030.00614.48
5.6.380.0030.00614.19
5.6.370.0090.00414.38
5.6.360.0050.00714.14
5.6.350.0060.00614.20
5.6.340.0040.00814.23
5.6.330.0090.00514.15
5.6.320.0050.00714.32
5.6.310.0100.00614.51
5.6.300.0060.00713.90
5.6.290.0030.01014.21
5.6.280.0070.02616.34
5.6.270.0090.00314.14
5.6.260.0030.01214.22
5.6.250.0050.00914.24
5.6.240.0050.00914.44
5.6.230.0080.00714.06
5.6.220.0060.00514.26
5.6.210.0110.02816.40
5.6.200.0070.02515.47
5.6.190.0080.03115.54
5.6.180.0060.03015.55
5.6.170.0080.02815.46
5.6.160.0090.02315.59
5.6.150.0050.02315.64
5.6.140.0030.02115.50
5.6.130.0060.03115.49
5.6.120.0050.03115.48
5.6.110.0010.02415.49
5.6.100.0040.02715.39
5.6.90.0030.02315.50
5.6.80.0070.01715.28
5.6.70.0070.02715.40
5.6.60.0030.02815.29
5.6.50.0040.03015.40
5.6.40.0050.03515.29
5.6.30.0040.03215.18
5.6.20.0040.02315.36
5.6.10.0080.02215.29
5.6.00.0020.03515.18
5.5.380.0050.00412.81
5.5.370.0060.00512.97
5.5.360.0060.00812.88
5.5.350.0100.03215.41
5.5.340.0070.01914.56
5.5.330.0050.02814.43
5.5.320.0060.03114.60
5.5.310.0020.02714.49
5.5.300.0060.02914.50
5.5.290.0020.02514.60
5.5.280.0030.03414.63
5.5.270.0080.01914.53
5.5.260.0030.02014.43
5.5.250.0080.02614.42
5.5.240.0040.03014.33
5.5.230.0080.01814.32
5.5.220.0050.02714.34
5.5.210.0030.02714.25
5.5.200.0050.02314.38
5.5.190.0050.02914.40
5.5.180.0080.02014.29
5.5.170.0090.00412.89
5.5.160.0090.01914.30
5.5.150.0050.03014.31
5.5.140.0080.02914.29
5.5.130.0090.02314.29
5.5.120.0040.02614.32
5.5.110.0060.02514.38
5.5.100.0050.01814.25
5.5.90.0040.03014.27
5.5.80.0060.02914.34
5.5.70.0100.02514.27
5.5.60.0080.02814.24
5.5.50.0080.02414.21
5.5.40.0030.02614.19
5.5.30.0070.02914.21
5.5.20.0080.02814.15
5.5.10.0030.03014.22
5.5.00.0040.02814.13
5.4.450.0030.02914.48
5.4.440.0010.02014.43
5.4.430.0080.02014.48
5.4.420.0030.01614.50
5.4.410.0020.01814.43
5.4.400.0030.01614.35
5.4.390.0020.02414.39
5.4.380.0040.03014.40
5.4.370.0030.03014.34
5.4.360.0110.02414.39
5.4.350.0030.01914.36
5.4.340.0030.03214.37
5.4.330.0020.00912.04
5.4.320.0020.02214.43
5.4.310.0040.02814.32
5.4.300.0060.01414.32
5.4.290.0070.02714.34
5.4.280.0030.03014.34
5.4.270.0040.02914.40
5.4.260.0090.02514.35
5.4.250.0050.01714.39
5.4.240.0050.03214.35
5.4.230.0070.02214.40
5.4.220.0050.02814.40
5.4.210.0060.02014.38
5.4.200.0060.02814.39
5.4.190.0080.02014.38
5.4.180.0070.02914.29
5.4.170.0060.03014.38
5.4.160.0030.02614.39
5.4.150.0060.03014.39
5.4.140.0070.02713.51
5.4.130.0050.02613.42
5.4.120.0040.02913.48
5.4.110.0060.02813.45
5.4.100.0040.03013.46
5.4.90.0050.02313.50
5.4.80.0060.02813.49
5.4.70.0050.02113.46
5.4.60.0080.01313.45
5.4.50.0060.02013.47
5.4.40.0040.02913.50
5.4.30.0070.02113.45
5.4.20.0090.02613.47
5.4.10.0110.01713.46
5.4.00.0060.02713.25
5.3.290.0090.02912.90
5.3.280.0070.02812.86
5.3.270.0060.03012.89
5.3.260.0080.02312.88
5.3.250.0070.02812.89
5.3.240.0070.02912.88
5.3.230.0070.03012.83
5.3.220.0080.02712.87
5.3.210.0070.03012.91
5.3.200.0050.02912.83
5.3.190.0090.02812.82
5.3.180.0070.02212.87
5.3.170.0090.02912.84
5.3.160.0130.02212.87
5.3.150.0100.02412.86
5.3.140.0040.02812.86
5.3.130.0070.03112.86
5.3.120.0100.02612.83
5.3.110.0060.02512.86
5.3.100.0060.02412.68
5.3.90.0080.02412.67
5.3.80.0080.02412.69
5.3.70.0070.02812.68
5.3.60.0060.02012.68
5.3.50.0050.02512.59
5.3.40.0030.01912.65
5.3.30.0070.02512.59
5.3.20.0090.01812.57
5.3.10.0050.02712.57
5.3.00.0080.01712.49
5.2.170.0040.02111.38
5.2.160.0010.02411.35
5.2.150.0050.03011.33
5.2.140.0030.02311.36
5.2.130.0070.03211.31
5.2.120.0050.02911.32
5.2.110.0020.02011.35
5.2.100.0050.02211.32
5.2.90.0050.02911.32
5.2.80.0070.02411.34
5.2.70.0050.03411.32
5.2.60.0050.03011.27
5.2.50.0000.03111.30
5.2.40.0060.02511.25
5.2.30.0030.02911.27
5.2.20.0050.03311.25
5.2.10.0020.03311.21
5.2.00.0050.02011.21
5.1.60.0080.02810.82
5.1.50.0080.02310.83
5.1.40.0030.02410.79
5.1.30.0030.02111.03
5.1.20.0080.02711.03
5.1.10.0030.02810.86
5.1.00.0080.01310.88
5.0.50.0070.02310.13
5.0.40.0060.0169.99
5.0.30.0030.0309.90
5.0.20.0030.0259.92
5.0.10.0020.0189.91
5.0.00.0050.0209.91
4.4.90.0030.0179.63
4.4.80.0020.0209.63
4.4.70.0030.0209.63
4.4.60.0050.0129.63
4.4.50.0000.0209.63
4.4.40.0020.0299.63
4.4.30.0000.0219.63
4.4.20.0000.0249.63
4.4.10.0020.0239.63
4.4.00.0020.0279.63
4.3.110.0020.0129.63
4.3.100.0020.0209.63
4.3.90.0030.0169.63
4.3.80.0000.0209.63
4.3.70.0030.0079.63
4.3.60.0000.0109.63
4.3.50.0020.0159.63
4.3.40.0020.0169.63
4.3.30.0000.0219.63
4.3.20.0000.0219.63
4.3.10.0000.0189.63
4.3.00.0020.0159.63

preferences:
60.29 ms | 400 KiB | 5 Q