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); $matches = explode('/', rtrim('/user/101/article', '/')); print_r($matches); $matches = explode('/', rtrim('/user/101/article', "/")); array_shift($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.0080.00816.61
8.3.50.0160.00318.19
8.3.40.0130.01319.02
8.3.30.0090.00618.84
8.3.20.0040.00418.93
8.3.10.0040.00423.71
8.3.00.0050.00221.77
8.2.180.0040.01116.63
8.2.170.0150.00022.96
8.2.160.0080.00620.57
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00419.79
8.2.120.0030.00626.35
8.2.110.0000.00921.15
8.2.100.0080.00418.03
8.2.90.0030.00619.16
8.2.80.0080.00017.97
8.2.70.0000.00817.75
8.2.60.0060.00318.04
8.2.50.0060.00318.16
8.2.40.0040.00420.60
8.2.30.0040.00419.12
8.2.20.0000.00718.08
8.2.10.0000.00718.16
8.2.00.0040.00418.03
8.1.270.0080.00022.05
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0100.00021.36
8.1.230.0040.00817.77
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.36
8.1.190.0030.00517.22
8.1.180.0000.00818.10
8.1.170.0040.00418.73
8.1.160.0030.00718.95
8.1.150.0040.00420.19
8.1.140.0040.00419.67
8.1.130.0070.00017.73
8.1.120.0000.00717.66
8.1.110.0050.00317.62
8.1.100.0000.00817.62
8.1.90.0030.00517.63
8.1.80.0050.00217.54
8.1.70.0040.00417.61
8.1.60.0040.00417.66
8.1.50.0030.00617.73
8.1.40.0080.00017.69
8.1.30.0000.00817.69
8.1.20.0040.00417.68
8.1.10.0080.00017.66
8.1.00.0040.00417.61
8.0.300.0050.00318.77
8.0.290.0000.00717.00
8.0.280.0030.00318.44
8.0.270.0040.00417.17
8.0.260.0030.00617.29
8.0.250.0000.00717.12
8.0.240.0000.00717.08
8.0.230.0070.00017.19
8.0.220.0050.00317.09
8.0.210.0040.00417.07
8.0.200.0040.00417.10
8.0.190.0060.00317.11
8.0.180.0040.00417.09
8.0.170.0030.00517.07
8.0.160.0040.00416.91
8.0.150.0030.00316.93
8.0.140.0040.00317.04
8.0.130.0000.00713.55
8.0.120.0000.00816.94
8.0.110.0000.00817.01
8.0.100.0040.00416.92
8.0.90.0000.00817.06
8.0.80.0000.01617.05
8.0.70.0030.00517.01
8.0.60.0000.00716.82
8.0.50.0070.00016.98
8.0.30.0140.00817.13
8.0.20.0110.00717.42
8.0.10.0040.00417.00
8.0.00.0120.00616.77
7.4.330.0050.00015.55
7.4.320.0030.00316.70
7.4.300.0000.00616.71
7.4.290.0030.00316.73
7.4.280.0000.00816.76
7.4.270.0100.00016.69
7.4.260.0030.00316.75
7.4.250.0040.00416.79
7.4.240.0000.00716.80
7.4.230.0000.00716.48
7.4.220.0030.01416.74
7.4.210.0090.00616.87
7.4.200.0000.00716.77
7.4.160.0090.01116.66
7.4.150.0090.00817.40
7.4.140.0140.00317.86
7.4.130.0120.00516.67
7.4.120.0090.00916.68
7.4.110.0100.01016.57
7.4.100.0140.00616.53
7.4.90.0090.00916.82
7.4.80.0160.00319.39
7.4.70.0110.00716.73
7.4.60.0040.01316.58
7.4.50.0120.00616.61
7.4.40.0090.00816.56
7.4.30.0120.00616.70
7.4.00.0070.01015.21
7.3.330.0020.00213.10
7.3.320.0000.00613.13
7.3.310.0070.00016.31
7.3.300.0070.00016.28
7.3.290.0080.00716.39
7.3.280.0080.00916.35
7.3.270.0100.01017.40
7.3.260.0090.00916.67
7.3.250.0110.00816.59
7.3.240.0100.00816.58
7.3.230.0070.01016.64
7.3.210.0060.01516.71
7.3.200.0030.01516.61
7.3.190.0120.00616.70
7.3.180.0040.01316.60
7.3.170.0130.01016.55
7.3.160.0130.00716.50
7.3.10.0040.00816.75
7.3.00.0110.00716.83
7.2.330.0100.00616.82
7.2.320.0060.01316.72
7.2.310.0090.00916.69
7.2.300.0070.01316.70
7.2.290.0000.01716.68
7.2.130.0070.01116.86
7.2.120.0060.01017.02
7.2.110.0080.00916.79
7.2.100.0130.00316.79
7.2.90.0000.02016.99
7.2.80.0110.00516.81
7.2.70.0080.00816.98
7.2.60.0290.00216.73
7.2.50.0070.00616.85
7.2.40.0070.01117.17
7.2.30.0130.01016.95
7.2.20.0120.00317.09
7.2.10.0130.00317.06
7.2.00.0070.00918.34
7.1.250.0080.01115.89
7.1.200.0040.00815.84
7.1.70.0000.00717.34
7.1.60.0100.00717.39
7.1.00.0070.07322.39
7.0.200.0930.00614.85
7.0.120.0130.05722.09
7.0.110.0100.05721.95
7.0.100.0030.06322.09
7.0.90.0030.06322.06
7.0.80.0070.06722.11
7.0.70.0070.05722.15
7.0.60.0100.05322.02
7.0.50.0270.06322.09
7.0.40.0070.05722.06
7.0.30.0070.06022.08
7.0.20.0070.05722.19
7.0.10.0130.05322.04
7.0.00.0070.06322.11
5.6.270.0100.06321.13
5.6.260.0070.06320.91
5.6.250.0170.05020.86
5.6.240.0100.06321.04
5.6.230.0000.06720.97
5.6.220.0130.05020.95
5.6.210.0130.05320.89
5.6.200.0030.06320.80
5.6.190.0070.06020.86
5.6.180.0070.06020.75
5.6.170.0170.07020.85
5.6.160.0100.05721.04
5.6.150.0200.06721.04
5.6.140.0130.06321.04
5.6.130.0200.04721.08
5.6.120.0230.04720.89
5.6.110.0100.05720.97
5.6.100.0100.05720.99
5.6.90.0070.05321.02
5.6.80.0100.05020.18
5.6.70.0000.06020.38
5.6.60.0100.05320.20
5.6.50.0100.05020.22
5.6.40.0130.04720.30
5.6.30.0070.05720.21
5.6.20.0070.06320.20
5.6.10.0170.04320.44
5.6.00.0030.06020.17

preferences:
67.57 ms | 400 KiB | 5 Q