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, 'http://www.jennifer.com/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.0180.00016.63
8.3.50.0160.00621.17
8.3.40.0150.00018.71
8.3.30.0110.00418.84
8.3.20.0000.00820.52
8.3.10.0000.00821.66
8.3.00.0000.00821.81
8.2.180.0140.00716.63
8.2.170.0110.00322.96
8.2.160.0100.01020.28
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0050.00319.95
8.2.120.0080.00026.35
8.2.110.0040.00421.09
8.2.100.0120.00017.72
8.2.90.0030.00619.23
8.2.80.0040.00417.97
8.2.70.0000.01017.88
8.2.60.0000.00817.91
8.2.50.0040.00418.10
8.2.40.0080.00020.55
8.2.30.0050.00219.32
8.2.20.0080.00017.97
8.2.10.0070.00018.13
8.2.00.0050.00217.86
8.1.280.0140.00425.92
8.1.270.0040.00422.10
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0080.00319.32
8.1.230.0090.00317.64
8.1.220.0090.00017.78
8.1.210.0050.00318.77
8.1.200.0000.00817.48
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0080.00018.77
8.1.160.0060.00320.61
8.1.150.0000.00722.07
8.1.140.0000.00719.58
8.1.130.0000.00717.72
8.1.120.0030.00517.68
8.1.110.0040.00417.59
8.1.100.0040.00417.68
8.1.90.0040.00417.61
8.1.80.0050.00217.50
8.1.70.0000.00917.51
8.1.60.0000.00717.78
8.1.50.0040.00417.69
8.1.40.0030.00617.67
8.1.30.0040.00417.79
8.1.20.0040.00417.75
8.1.10.0000.00717.68
8.1.00.0020.00517.51
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0000.00718.46
8.0.270.0030.00317.18
8.0.260.0000.00718.46
8.0.250.0070.00017.07
8.0.240.0030.00317.14
8.0.230.0040.00416.96
8.0.220.0040.00416.93
8.0.210.0070.00016.91
8.0.200.0050.00217.01
8.0.190.0000.00817.13
8.0.180.0000.00816.96
8.0.170.0080.00017.15
8.0.160.0000.00817.04
8.0.150.0070.00016.96
8.0.140.0000.00817.02
8.0.130.0030.00313.47
8.0.120.0040.00416.89
8.0.110.0060.00317.07
8.0.100.0040.00416.86
8.0.90.0020.00516.92
8.0.80.0100.00617.08
8.0.70.0050.00317.02
8.0.60.0040.00417.01
8.0.50.0050.00216.97
8.0.30.0130.00817.25
8.0.20.0100.00917.43
8.0.10.0070.00017.14
8.0.00.0120.00616.69
7.4.330.0020.00215.55
7.4.320.0030.00316.66
7.4.300.0000.00616.71
7.4.290.0000.00716.71
7.4.280.0060.00316.75
7.4.270.0030.00616.58
7.4.260.0000.00716.77
7.4.250.0000.00816.59
7.4.240.0040.00416.62
7.4.230.0000.00716.79
7.4.220.0140.00416.83
7.4.210.0030.01216.82
7.4.200.0000.00916.45
7.4.160.0050.01116.58
7.4.150.0150.00317.40
7.4.140.0100.00917.86
7.4.130.0110.01016.61
7.4.120.0100.00716.71
7.4.110.0030.01416.82
7.4.100.0170.00716.68
7.4.90.0100.00916.66
7.4.80.0170.00019.39
7.4.70.0000.01716.70
7.4.60.0030.01516.63
7.4.50.0030.01016.73
7.4.40.0090.01216.59
7.4.30.0120.00416.65
7.4.00.0100.00415.00
7.3.330.0000.00513.17
7.3.320.0000.00513.21
7.3.310.0060.00016.20
7.3.300.0030.00316.35
7.3.290.0070.00916.37
7.3.280.0110.00816.36
7.3.270.0100.00817.40
7.3.260.0090.01516.48
7.3.250.0120.00516.46
7.3.240.0120.00516.53
7.3.230.0060.01116.39
7.3.210.0090.00916.60
7.3.200.0060.01116.58
7.3.190.0030.01416.62
7.3.180.0030.01316.31
7.3.170.0030.01716.79
7.3.160.0090.01416.40
7.3.120.0160.00014.89
7.3.110.0100.00714.84
7.3.100.0060.00615.13
7.3.90.0090.00614.91
7.3.80.0060.00915.10
7.3.70.0000.01515.05
7.3.60.0070.00715.00
7.3.50.0040.01214.78
7.3.40.0090.00614.79
7.3.30.0060.00615.02
7.3.20.0090.00316.65
7.3.10.0030.00616.49
7.3.00.0070.00616.68
7.2.330.0090.00916.81
7.2.320.0060.01216.86
7.2.310.0130.00316.74
7.2.300.0150.00716.74
7.2.290.0070.01716.87
7.2.250.0130.00615.15
7.2.240.0040.01415.34
7.2.230.0100.00715.05
7.2.220.0080.00615.30
7.2.210.0090.00915.27
7.2.200.0090.00615.05
7.2.190.0030.00915.33
7.2.180.0070.01015.19
7.2.170.0050.00515.20
7.2.60.0030.00916.61
7.1.330.0030.01315.90
7.1.320.0090.00615.91
7.1.310.0070.00715.89
7.1.300.0110.00415.90
7.1.290.0070.00715.88
7.1.280.0030.00915.84
7.1.270.0030.00916.08
7.1.260.0000.01215.70
7.1.200.0070.00715.96
7.1.70.0030.00517.33
7.1.60.0070.01017.12
7.1.00.0130.06322.34
7.0.200.0140.00815.13
7.0.120.0170.04321.97
7.0.110.0070.06322.16
7.0.100.0100.05722.08
7.0.90.0030.06022.08
7.0.80.0130.04722.00
7.0.70.0070.05322.06
7.0.60.0070.05322.00
7.0.50.0100.05021.98
7.0.40.0070.05322.08
7.0.30.0070.05721.98
7.0.20.0100.05322.11
7.0.10.0030.05722.03
7.0.00.0070.05322.04
5.6.270.0030.06021.09
5.6.260.0070.05320.79
5.6.250.0130.04720.86
5.6.240.0170.05020.93
5.6.230.0030.06020.83
5.6.220.0130.04720.73
5.6.210.0130.04720.97
5.6.200.0130.05021.00
5.6.190.0030.06020.75
5.6.180.0030.06020.74
5.6.170.0100.05720.80
5.6.160.0030.06020.83
5.6.150.0070.06020.95
5.6.140.0130.04720.74
5.6.130.0100.05020.82
5.6.120.0100.05720.92
5.6.110.0030.06020.74
5.6.100.0030.06720.85
5.6.90.0100.05020.84
5.6.80.0030.05320.13
5.6.70.0030.05320.23
5.6.60.0030.05720.31
5.6.50.0100.05320.23
5.6.40.0130.04320.37
5.6.30.0100.05720.21
5.6.20.0130.07320.34
5.6.10.0170.05020.15
5.6.00.0200.05020.35

preferences:
64.87 ms | 401 KiB | 5 Q