3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = "http://jennifer.com/arrest/def/101"; $pattern = '@^(?:http://)?([^/]+)@i'; preg_match($pattern, $subject, $matches); print_r($matches); $url = parse_url("http://www.jennifer.com/user/101/article"); print_r($url); preg_match('/\\\:[a-zA-Z0-9\_\-]+/', "/user/:id/article", $matches); print_r($matches); $pattern = "@^" . preg_replace('/\\\:[a-zA-Z0-9\_\-]+/', '([a-zA-Z0-9\-\_]+)', preg_quote('/user/:id/article')) . "$@D"; $matches = array(); $match = preg_match($pattern, '/user/101/article', $matches); print_r($match);

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.0120.00616.50
8.3.50.0110.00716.45
8.3.40.0070.00718.79
8.3.30.0070.01418.79
8.3.20.0080.00018.72
8.3.10.0080.00021.76
8.3.00.0080.00021.73
8.2.180.0100.01016.88
8.2.170.0130.01022.96
8.2.160.0150.00620.45
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0030.00619.88
8.2.120.0040.00426.35
8.2.110.0000.00922.38
8.2.100.0080.00417.91
8.2.90.0090.00019.10
8.2.80.0030.00617.97
8.2.70.0090.00017.75
8.2.60.0060.00318.05
8.2.50.0060.00318.10
8.2.40.0040.00420.59
8.2.30.0050.00219.16
8.2.20.0000.00718.10
8.2.10.0030.00618.27
8.2.00.0070.00017.77
8.1.280.0090.00625.92
8.1.270.0040.00422.06
8.1.260.0000.00728.09
8.1.250.0080.00028.09
8.1.240.0060.00322.07
8.1.230.0080.00417.82
8.1.220.0030.00517.74
8.1.210.0030.00518.77
8.1.200.0070.00317.48
8.1.190.0000.00817.36
8.1.180.0000.00718.10
8.1.170.0080.00018.76
8.1.160.0060.00318.92
8.1.150.0000.00822.08
8.1.140.0040.00419.47
8.1.130.0030.00317.70
8.1.120.0070.00017.63
8.1.110.0050.00317.65
8.1.100.0000.00817.58
8.1.90.0000.00817.62
8.1.80.0040.00417.57
8.1.70.0000.00917.56
8.1.60.0000.00917.71
8.1.50.0030.00517.73
8.1.40.0000.00917.64
8.1.30.0050.00317.83
8.1.20.0030.00517.67
8.1.10.0030.00617.52
8.1.00.0020.00517.53
8.0.300.0030.00618.77
8.0.290.0030.00616.88
8.0.280.0030.00318.45
8.0.270.0040.00417.26
8.0.260.0000.00817.28
8.0.250.0000.00717.07
8.0.240.0030.00317.10
8.0.230.0000.00717.03
8.0.220.0000.00717.09
8.0.210.0070.00016.93
8.0.200.0030.00317.12
8.0.190.0000.00817.10
8.0.180.0000.00717.03
8.0.170.0000.00717.11
8.0.160.0040.00417.03
8.0.150.0070.00016.97
8.0.140.0040.00416.99
8.0.130.0060.00013.52
8.0.120.0040.00416.89
8.0.110.0080.00017.01
8.0.100.0030.00516.90
8.0.90.0030.00516.95
8.0.80.0100.00717.00
8.0.70.0040.00416.88
8.0.60.0000.00817.03
8.0.50.0000.00716.93
8.0.30.0030.01516.98
8.0.20.0130.01117.45
8.0.10.0040.00417.05
8.0.00.0040.01516.94
7.4.330.0050.00015.55
7.4.320.0030.00316.72
7.4.300.0000.00616.77
7.4.290.0070.00016.55
7.4.280.0050.00316.59
7.4.270.0080.00316.73
7.4.260.0070.00016.71
7.4.250.0050.00316.72
7.4.240.0000.00716.63
7.4.230.0070.00016.86
7.4.220.0090.01316.75
7.4.210.0140.00316.69
7.4.200.0000.00816.81
7.4.160.0050.01116.70
7.4.150.0150.00917.40
7.4.140.0100.00717.86
7.4.130.0080.01116.68
7.4.120.0120.00616.55
7.4.110.0090.00816.62
7.4.100.0400.01016.87
7.4.90.0100.00716.71
7.4.80.0070.01019.39
7.4.70.0130.00416.64
7.4.60.0140.00616.57
7.4.50.0000.01616.57
7.4.40.0110.01116.67
7.4.30.0140.00316.73
7.4.00.0030.01314.89
7.3.330.0000.00613.23
7.3.320.0060.00013.27
7.3.310.0000.00716.20
7.3.300.0070.00016.21
7.3.290.0110.00616.37
7.3.280.0080.01216.34
7.3.270.0150.00317.40
7.3.260.0100.00816.54
7.3.250.0120.01016.44
7.3.240.0150.00616.58
7.3.230.0080.00816.61
7.3.210.0060.01016.34
7.3.200.0140.00316.59
7.3.190.0040.01516.59
7.3.180.0060.00916.41
7.3.170.0060.01316.38
7.3.160.0060.01516.40
7.2.330.0150.00416.73
7.2.320.0110.00616.59
7.2.310.0090.00916.94
7.2.300.0100.01316.67
7.2.290.0120.00616.57
7.2.60.0290.00417.11
7.2.50.0060.00616.82
7.2.00.0030.01219.34
7.1.200.0060.00615.56
7.1.70.0000.01017.30
7.1.60.0290.00717.38
7.1.00.0100.07022.53
7.0.200.0210.00714.88
7.0.120.0070.06322.18
7.0.110.0100.06022.04
7.0.100.0130.05021.95
7.0.90.0170.05021.98
7.0.80.0100.05722.07
7.0.70.0030.06022.11
7.0.60.0130.05021.96
7.0.50.0170.05022.05
7.0.40.0000.06322.12
7.0.30.0100.05322.07
7.0.20.0030.06022.05
7.0.10.0130.06322.14
7.0.00.0070.05722.07
5.6.270.0030.06720.99
5.6.260.0070.05721.04
5.6.250.0130.05321.07
5.6.240.0170.05320.88
5.6.230.0130.05320.98
5.6.220.0000.06720.80
5.6.210.0100.05320.92
5.6.200.0170.06320.92
5.6.190.0170.05020.75
5.6.180.0100.05320.80
5.6.170.0100.05721.04
5.6.160.0030.06021.02
5.6.150.0200.05321.01
5.6.140.0100.07721.01
5.6.130.0170.04320.83
5.6.120.0070.05720.85
5.6.110.0130.05020.99
5.6.100.0000.06320.83
5.6.90.0100.05020.73
5.6.80.0070.05020.39
5.6.70.0130.04720.21
5.6.60.0070.05320.38
5.6.50.0030.05320.42
5.6.40.0000.06020.20
5.6.30.0070.05720.35
5.6.20.0030.05720.18
5.6.10.0070.06020.36
5.6.00.0070.05720.07

preferences:
65.58 ms | 401 KiB | 5 Q