3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($str){ var_dump( preg_match_all( '{^(https?://)?([^/\n]+)}', $str, $matches ) ); var_dump($matches); } $strArray = [ 'http://www.answers.com/article/1194427/8-habits-of-extraordinarily-likeable-people', 'https://www.apple.com', 'https://www.apple .com', 'https://www.apple', 'http://www.cnn.com.au', 'http://downloads.news.com.au', 'http://ftp.android.co.nz', 'http://global.news.ca', 'http://www.apple.com', 'apple.com', 'www.apple.com', ]; foreach($strArray as $str){ foo($str); }

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.55
8.3.50.0080.01218.14
8.3.40.0090.00618.68
8.3.30.0100.00618.67
8.3.20.0050.00319.20
8.3.10.0040.00423.65
8.3.00.0040.00820.76
8.2.180.0130.00718.29
8.2.170.0100.00622.96
8.2.160.0080.00620.52
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00018.03
8.2.120.0080.00026.35
8.2.110.0000.01021.24
8.2.100.0060.00618.03
8.2.90.0000.00817.63
8.2.80.0050.00317.97
8.2.70.0000.00818.05
8.2.60.0030.00618.03
8.2.50.0060.00318.10
8.2.40.0000.00719.38
8.2.30.0000.00819.28
8.2.20.0070.00018.04
8.2.10.0000.00818.02
8.2.00.0090.00017.68
8.1.280.0110.00425.92
8.1.270.0090.00618.86
8.1.260.0040.00426.35
8.1.250.0130.00328.09
8.1.240.0090.00023.96
8.1.230.0090.00317.57
8.1.220.0040.00417.80
8.1.210.0080.00018.77
8.1.200.0030.00617.48
8.1.190.0000.00917.22
8.1.180.0050.00318.10
8.1.170.0050.00318.79
8.1.160.0000.00718.83
8.1.150.0080.00018.79
8.1.140.0000.00822.04
8.1.130.0030.00320.17
8.1.120.0070.00017.52
8.1.110.0040.00417.64
8.1.100.0030.00717.65
8.1.90.0060.00317.60
8.1.80.0000.00917.50
8.1.70.0040.00417.61
8.1.60.0040.00417.64
8.1.50.0040.00417.57
8.1.40.0000.00817.52
8.1.30.0110.00017.70
8.1.20.0040.00417.70
8.1.10.0040.00417.66
8.1.00.0050.00317.67
8.0.300.0120.00018.77
8.0.290.0040.00416.75
8.0.280.0060.00318.34
8.0.270.0000.00817.33
8.0.260.0070.00018.53
8.0.250.0000.00817.12
8.0.240.0030.00317.04
8.0.230.0030.00317.01
8.0.220.0000.00717.10
8.0.210.0000.00817.01
8.0.200.0020.00517.05
8.0.190.0040.00717.09
8.0.180.0000.00817.09
8.0.170.0030.00616.95
8.0.160.0070.00016.94
8.0.150.0090.00017.05
8.0.140.0060.00316.96
8.0.130.0000.00613.42
8.0.120.0030.00517.07
8.0.110.0050.00216.95
8.0.100.0030.00617.02
8.0.90.0080.00017.00
8.0.80.0100.00717.07
8.0.70.0000.00816.83
8.0.60.0030.00516.84
8.0.50.0000.00717.11
8.0.30.0140.00516.94
8.0.20.0150.00517.40
8.0.10.0000.00717.07
8.0.00.0140.00916.80
7.4.330.0050.00015.55
7.4.320.0030.00316.70
7.4.300.0000.00816.63
7.4.290.0000.00816.71
7.4.280.0000.00716.66
7.4.270.0030.00616.71
7.4.260.0070.00016.79
7.4.250.0050.00316.61
7.4.240.0040.00416.66
7.4.230.0000.00716.70
7.4.220.0070.00016.71
7.4.210.0050.01016.84
7.4.200.0070.00016.68
7.4.160.0100.00916.68
7.4.140.0110.01117.86
7.4.130.0130.00616.80
7.4.120.0120.00916.75
7.4.110.0000.02816.73
7.4.100.0100.01016.78
7.4.90.0140.00417.02
7.4.80.0110.00819.39
7.4.70.0090.00916.62
7.4.60.0160.00316.75
7.4.50.0070.01116.69
7.4.40.0090.00916.66
7.4.10.0110.00715.11
7.4.00.0030.01315.07
7.3.330.0030.00313.45
7.3.320.0060.00013.48
7.3.310.0030.00616.41
7.3.300.0040.00416.29
7.3.290.0040.00416.47
7.3.280.0080.01116.46
7.3.260.0130.00716.61
7.3.240.0090.01416.56
7.3.230.0150.00416.59
7.3.210.0080.01216.45
7.3.200.0090.01416.65
7.3.190.0110.00816.46
7.3.180.0090.01216.71
7.3.170.0130.01016.55
7.3.160.0040.01416.53
7.3.130.0130.00615.21
7.3.120.0060.01214.73
7.3.110.0100.01014.98
7.3.100.0110.00714.68
7.3.90.0000.01114.86
7.3.80.0070.00714.73
7.3.70.0070.01014.66
7.3.60.0070.00715.09
7.3.50.0030.00614.68
7.3.40.0040.00814.91
7.3.30.0070.00715.06
7.3.20.0030.01016.79
7.3.10.0080.00416.74
7.3.00.0060.00316.62
7.2.330.0040.01716.77
7.2.320.0090.00916.65
7.2.310.0160.00616.93
7.2.300.0090.00916.81
7.2.290.0080.00916.76
7.2.260.0000.01715.30
7.2.250.0120.00615.15
7.2.240.0060.00915.03
7.2.230.0070.00715.07
7.2.220.0040.01415.23
7.2.210.0040.00815.17
7.2.200.0030.01415.01
7.2.190.0030.01315.12
7.2.180.0100.00615.17
7.2.170.0040.00715.15
7.2.160.0100.00715.02
7.2.150.0040.00816.93
7.2.140.0060.00317.10
7.2.130.0030.01016.81
7.2.120.0070.00717.11
7.2.110.0070.01017.02
7.2.100.0000.01317.11
7.2.90.0030.01016.98
7.2.80.0060.01216.82
7.2.70.0040.00817.09
7.2.60.0070.00417.11
7.2.50.0000.01117.16
7.2.40.0040.01117.07
7.2.30.0090.00617.03
7.2.20.0030.01017.07
7.2.10.0060.00917.13
7.2.00.0070.01016.89
7.1.330.0080.00816.03
7.1.320.0040.01115.83
7.1.310.0070.00716.09
7.1.300.0000.01415.99
7.1.290.0060.00915.96
7.1.280.0070.00715.91
7.1.270.0060.01015.66
7.1.260.0030.00915.96
7.1.250.0110.00316.01
7.1.240.0000.01215.74
7.1.230.0120.00315.89
7.1.220.0030.00616.05
7.1.210.0070.00715.98
7.1.200.0140.00015.82
7.1.190.0070.00415.93
7.1.180.0060.00315.97
7.1.170.0110.00415.86
7.1.160.0040.01116.05
7.1.150.0060.00915.84
7.1.140.0060.00615.79
7.1.130.0110.00416.05
7.1.120.0090.00015.83
7.1.110.0030.01016.04
7.1.100.0100.00316.08
7.1.90.0040.01616.09
7.1.80.0100.00716.04
7.1.70.0030.01015.85
7.1.60.0100.00715.82
7.1.50.0100.00715.79
7.1.40.0060.00615.55
7.1.30.0040.01215.64
7.1.20.0030.00715.92
7.1.10.0060.01215.73
7.1.00.0090.00916.00
7.0.330.0080.00415.37
7.0.320.0060.00615.38
7.0.310.0060.00915.71
7.0.300.0090.00615.61
7.0.290.0040.00715.40
7.0.280.0110.00415.66
7.0.270.0040.00815.30
7.0.260.0130.00015.63
7.0.250.0080.00815.80
7.0.240.0090.00315.54
7.0.230.0030.00615.70
7.0.220.0120.00315.25
7.0.210.0060.00615.26
7.0.200.0060.00915.28
7.0.190.0060.01015.30
7.0.180.0090.00315.68
7.0.170.0070.01015.69
7.0.160.0030.00915.64
7.0.150.0030.00915.39
7.0.140.0030.00615.34
7.0.130.0000.01815.68
7.0.120.0000.00915.70
7.0.110.0000.01115.58
7.0.100.0090.00315.28
7.0.90.0070.00415.59
7.0.80.0100.00315.34
7.0.70.0030.00715.60
7.0.60.0060.00615.58
7.0.50.0040.00715.71
7.0.40.0080.00013.69
7.0.30.0030.01013.71
7.0.20.0050.00513.67
7.0.10.0000.01313.80
7.0.00.0110.00713.63
5.6.400.0000.01114.25
5.6.390.0060.01214.52
5.6.380.0000.01014.44
5.6.370.0040.00814.40
5.6.360.0040.00414.11
5.6.350.0040.00714.06
5.6.340.0030.00714.47
5.6.330.0090.00314.39
5.6.320.0070.00714.30
5.6.310.0030.01014.39
5.6.300.0090.00614.50
5.6.290.0030.01214.56
5.6.280.0070.00414.04
5.6.270.0060.00314.35
5.6.260.0030.00914.31
5.6.250.0120.00614.65
5.6.240.0030.01214.45
5.6.230.0060.00614.73
5.6.220.0060.00614.29
5.6.210.0050.00514.55
5.6.200.0080.00414.38
5.6.190.0030.01014.40
5.6.180.0080.00414.23
5.6.170.0110.00414.00
5.6.160.0060.00614.41
5.6.150.0070.00714.70
5.6.140.0040.00814.45
5.6.130.0040.00414.25
5.6.120.0100.00314.25
5.6.110.0080.00714.53
5.6.100.0030.00914.39
5.6.90.0070.01014.39
5.6.80.0060.01214.47
5.6.70.0100.00314.06
5.6.60.0060.00814.36
5.6.50.0000.01614.22
5.6.40.0090.00314.14
5.6.30.0060.00914.44
5.6.20.0090.00614.38
5.6.10.0100.00714.33
5.6.00.0120.00314.17

preferences:
60.75 ms | 401 KiB | 5 Q