3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($str){ var_dump($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.0160.00318.42
8.3.50.0160.00318.24
8.3.40.0130.00318.71
8.3.30.0120.00318.93
8.3.20.0100.00619.08
8.3.10.0050.00323.63
8.3.00.0060.00320.82
8.2.180.0080.00818.54
8.2.170.0130.00322.96
8.2.160.0090.00620.35
8.2.150.0000.00924.18
8.2.140.0000.00824.66
8.2.130.0040.00817.91
8.2.120.0050.00326.35
8.2.110.0040.00720.43
8.2.100.0070.00617.85
8.2.90.0030.00517.75
8.2.80.0000.00817.97
8.2.70.0040.00418.04
8.2.60.0040.00418.22
8.2.50.0030.00518.10
8.2.40.0050.00319.39
8.2.30.0000.00819.26
8.2.20.0080.00018.09
8.2.10.0030.00618.01
8.2.00.0030.00617.71
8.1.280.0120.00425.92
8.1.270.0160.00018.95
8.1.260.0070.00326.35
8.1.250.0030.00528.09
8.1.240.0000.01022.66
8.1.230.0070.00722.75
8.1.220.0000.00917.79
8.1.210.0050.00318.77
8.1.200.0030.00717.47
8.1.190.0080.00017.35
8.1.180.0050.00318.10
8.1.170.0030.00618.71
8.1.160.0040.00418.97
8.1.150.0040.00418.91
8.1.140.0030.00522.17
8.1.130.0050.00220.25
8.1.120.0000.00717.64
8.1.110.0040.00417.53
8.1.100.0030.00717.62
8.1.90.0090.00017.49
8.1.80.0030.00617.64
8.1.70.0040.00417.64
8.1.60.0090.00017.63
8.1.50.0080.00017.68
8.1.40.0080.00017.57
8.1.30.0000.01117.79
8.1.20.0030.00617.66
8.1.10.0080.00017.64
8.1.00.0030.00617.49
8.0.300.0080.00418.77
8.0.290.0080.00016.88
8.0.280.0040.00418.46
8.0.270.0080.00017.21
8.0.260.0000.00718.47
8.0.250.0040.00417.09
8.0.240.0030.00317.04
8.0.230.0070.00017.00
8.0.220.0030.00317.02
8.0.210.0040.00416.93
8.0.200.0000.00717.16
8.0.190.0030.00617.11
8.0.180.0030.00617.00
8.0.170.0060.00317.03
8.0.160.0040.00417.05
8.0.150.0000.01117.00
8.0.140.0040.00416.99
8.0.130.0000.00513.40
8.0.120.0040.00416.89
8.0.110.0050.00317.04
8.0.100.0060.00316.87
8.0.90.0040.00416.93
8.0.80.0080.01117.02
8.0.70.0040.00416.86
8.0.60.0020.00516.87
8.0.50.0040.00417.02
8.0.30.0140.00917.47
8.0.20.0130.01217.40
8.0.10.0000.00817.18
8.0.00.0110.01216.98
7.4.330.0000.00615.55
7.4.320.0030.00316.64
7.4.300.0030.00616.63
7.4.290.0070.00016.78
7.4.280.0000.00716.80
7.4.270.0070.00316.80
7.4.260.0000.00716.64
7.4.250.0030.00616.71
7.4.240.0030.00616.65
7.4.230.0070.00016.55
7.4.220.0000.00816.71
7.4.210.0080.00816.80
7.4.200.0000.00716.79
7.4.160.0110.00816.67
7.4.140.0130.00917.86
7.4.130.0100.01016.61
7.4.120.0130.00916.81
7.4.110.0150.01316.51
7.4.100.0160.00316.68
7.4.90.0040.01516.52
7.4.80.0160.00319.39
7.4.70.0060.01216.97
7.4.60.0170.00016.70
7.4.50.0030.00616.65
7.4.40.0030.01416.77
7.3.330.0000.00513.27
7.3.320.0060.00013.40
7.3.310.0060.00316.45
7.3.300.0000.00716.50
7.3.290.0030.00316.41
7.3.280.0120.00716.43
7.3.260.0090.01316.58
7.3.240.0130.00816.61
7.3.230.0170.00716.75
7.3.210.0100.01016.92
7.3.200.0080.01016.52
7.3.190.0050.01316.48
7.3.180.0130.00716.50
7.3.170.0070.01816.54
7.3.160.0110.01116.71
7.2.330.0140.00716.60
7.2.320.0100.01316.72
7.2.310.0190.00016.71
7.2.300.0060.01216.86
7.2.290.0090.00916.93

preferences:
36.84 ms | 401 KiB | 5 Q