3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _ts_restrictions_translate_ws_message($message = '') { $source = array( 'The maximum quantity allowed for (\w+) title groups is (\d+) per two-year cycle.', 'The maximum allotment of licenses for this (\w+) title group is (\d+) per two-year cycle.', 'The maximum quantity allowed for (\w+) server products is (\d+) per two-year cycle.', 'Your organization has already requested Get Genuine Full Windows operating system products. This is a one-time-only donation.', 'Get Genuine Windows full operating system requests are subject to a unique approval process, so you cannot combine them with any other products in a single cart. Please remove these products from your cart and complete the check-out process for the remaining products. Then place a second request for the Get Genuine Windows full operating systems.', 'You cannot combine products from the main Microsoft Donations Program with products from the Microsoft Direct Donations Program in a single cart.', 'You must order a minimum of (\d+) seats for (\w+) product orders.', 'You can order a maximum of (\d+) (\w+) items in (\w+). You have already ordered $annualOrdered and can not order any more.', 'You can order a maximum of (\d+) (\w+) items in (\w+). You have already ordered $annualOrdered and can only order (\d+) more.', 'You can order a maximum of (\d+) (\w+) title (\w+) in a fiscal year. You have already ordered (\d+) and can not order any more.', 'You can order a maximum of (\d+) (\w+) title (\w+) in a fiscal year. You have already ordered (\d+) and can only order (\d+) more.', 'There is a limit on the number of times you may request this (\w+) product. The quantity in your cart of product (\w+) exceeds the maximum number of allowable requests.', ); $matches = array(); $count = 0; foreach ($source as $pattern) { if (preg_match('/' . $pattern . '/', $message, $matches)) { array_shift($matches); str_replace(array('(\w+)', '(\d+)'), array('@variable', '@variable'), $pattern, $count); $t_variables = array(); for ($i = 0; $i < $count; $i++) { $t_variable = '@variable' . $i; str_replace('@variable', $t_variable, $pattern); $t_variables[$t_variable] = $matches[$i]; } return t($pattern, $t_variables); } } } var_dump(_ts_restrictions_translate_ws_message('The maximum quantity allowed for Microsoft title groups is 10 per two-year cycle.'));

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.0100.01018.68
8.3.50.0260.01421.17
8.3.40.0070.00718.95
8.3.30.0100.00718.96
8.3.20.0080.00020.20
8.3.10.0000.00821.77
8.3.00.0030.00519.69
8.2.180.0130.00916.88
8.2.170.0130.00322.96
8.2.160.0070.00720.52
8.2.150.0080.00024.18
8.2.140.0000.00924.66
8.2.130.0080.00026.16
8.2.120.0030.00517.88
8.2.110.0050.00521.18
8.2.100.0030.00917.88
8.2.90.0000.00819.17
8.2.80.0040.00417.97
8.2.70.0040.00417.88
8.2.60.0080.00417.68
8.2.50.0030.00518.07
8.2.40.0030.00919.40
8.2.30.0040.00422.45
8.2.20.0000.00818.05
8.2.10.0000.00818.23
8.2.00.0030.00518.04
8.1.280.0040.01125.92
8.1.270.0090.00022.07
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0060.00322.05
8.1.230.0290.00317.42
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.47
8.1.190.0030.00617.35
8.1.180.0050.00318.10
8.1.170.0030.00518.77
8.1.160.0070.00022.12
8.1.150.0050.00318.81
8.1.140.0040.00417.53
8.1.130.0030.00617.75
8.1.120.0000.00717.56
8.1.110.0040.00417.63
8.1.100.0000.00817.53
8.1.90.0070.00017.53
8.1.80.0000.00717.63
8.1.70.0000.00717.63
8.1.60.0040.00417.61
8.1.50.0000.00817.70
8.1.40.0030.00617.61
8.1.30.0080.00017.87
8.1.20.0000.00817.74
8.1.10.0040.00417.75
8.1.00.0030.00617.54
8.0.300.0100.00018.77
8.0.290.0040.00417.00
8.0.280.0030.00318.44
8.0.270.0030.00317.30
8.0.260.0040.00417.21
8.0.250.0040.00417.23
8.0.240.0040.00417.15
8.0.230.0000.00717.11
8.0.220.0000.00717.16
8.0.210.0040.00417.16
8.0.200.0000.00617.19
8.0.190.0050.00317.18
8.0.180.0000.00817.21
8.0.170.0030.00517.04
8.0.160.0030.00317.21
8.0.150.0040.00416.99
8.0.140.0040.00417.16
8.0.130.0030.00313.47
8.0.120.0040.00416.98
8.0.110.0000.00717.15
8.0.100.0040.00417.09
8.0.90.0040.00417.12
8.0.80.0040.01217.12
8.0.70.0070.00017.14
8.0.60.0040.00416.99
8.0.50.0000.00717.11
8.0.30.0110.00717.47
8.0.20.0110.00917.40
8.0.10.0090.00017.08
8.0.00.0090.00816.97
7.4.330.0030.00315.08
7.4.320.0000.00716.80
7.4.300.0000.00716.82
7.4.290.0070.00016.71
7.4.280.0090.00016.71
7.4.270.0000.00816.73
7.4.260.0000.01016.64
7.4.250.0040.00416.79
7.4.240.0020.00516.78
7.4.230.0080.00016.94
7.4.220.0070.01116.90
7.4.210.0060.00916.74
7.4.200.0040.00416.74
7.4.160.0030.01416.69
7.4.150.0130.00417.40
7.4.140.0140.00717.86
7.4.130.0120.00916.76
7.4.120.0100.01016.62
7.4.110.0180.00016.66
7.4.100.0200.00216.70
7.4.90.0130.01016.79
7.4.80.0030.01819.39
7.4.70.0060.01016.82
7.4.60.0100.01316.66
7.4.50.0060.00316.57
7.4.40.0140.00316.61
7.4.30.0090.00916.68
7.4.00.0030.01415.22
7.3.330.0070.00013.35
7.3.320.0030.00313.46
7.3.310.0000.00716.45
7.3.300.0030.00316.59
7.3.290.0040.01016.61
7.3.280.0080.01216.55
7.3.270.0180.00017.40
7.3.260.0140.00316.60
7.3.250.0110.00916.57
7.3.240.0070.01116.71
7.3.230.0130.00416.84
7.3.210.0110.00616.52
7.3.200.0080.00816.80
7.3.190.0060.01016.45
7.3.180.0040.01116.78
7.3.170.0060.01616.74
7.3.160.0130.00316.65
7.2.330.0030.01416.91
7.2.320.0160.00617.04
7.2.310.0060.01016.73
7.2.300.0000.01616.71
7.2.290.0130.00316.95
7.2.60.0260.01116.74
7.2.00.0030.00919.90
7.1.200.0030.00716.05
7.1.100.0030.00618.45
7.1.70.0030.01017.40
7.1.60.0100.00619.20
7.1.50.0070.00417.21
7.1.00.0000.07722.45
7.0.200.0040.00816.91
7.0.60.0130.07721.83
7.0.50.0130.07017.94
7.0.40.0130.06720.04
7.0.30.0300.07320.26
7.0.20.0330.04320.09
7.0.10.0170.07720.08
7.0.00.0000.05720.13
5.6.280.0000.05020.90
5.6.210.0130.07720.55
5.6.200.0000.08718.19
5.6.190.0030.06720.63
5.6.180.0200.05720.68
5.6.170.0270.05720.50
5.6.160.0100.05020.54
5.6.150.0070.05018.19
5.6.140.0000.07718.19
5.6.130.0100.03718.26
5.6.120.0070.08320.96
5.6.110.0070.04021.15
5.6.100.0130.07321.13
5.6.90.0000.09021.12
5.6.80.0000.04320.46
5.5.350.0070.03020.41
5.5.340.0170.03317.96
5.5.330.0070.08320.27
5.5.320.3470.04720.35
5.5.310.0300.08320.34
5.5.300.0100.07317.95
5.5.290.0070.07718.07
5.5.280.0030.04020.74
5.5.270.0030.08320.76
5.5.260.0100.08020.81
5.5.250.0070.04320.59
5.5.240.0300.06020.36
5.4.450.0300.07019.50
5.4.440.0330.06319.69
5.4.430.0200.06019.33
5.4.420.0300.05719.35
5.4.410.0330.04719.21
5.4.400.0270.05319.37
5.4.390.0300.05019.26
5.4.380.0270.05019.29
5.4.370.0200.06319.26
5.4.360.0300.06719.15
5.4.350.0200.07719.36
5.4.340.0130.06719.13
5.4.320.0170.07319.37
5.4.310.0200.05319.14
5.4.300.0200.05319.15
5.4.290.0370.05719.15
5.4.280.0270.07019.26
5.4.270.0200.05719.14
5.4.260.0330.04019.13
5.4.250.0200.05719.02
5.4.240.0230.05019.16
5.4.230.0230.05318.97
5.4.220.0270.05719.14
5.4.210.0200.05719.25
5.4.200.0200.05319.14
5.4.190.0130.06318.83
5.4.180.0430.05019.13
5.4.170.0400.06718.88
5.4.160.0230.05019.05
5.4.150.0130.08319.26
5.4.140.0170.07316.39
5.4.130.0170.07016.30
5.4.120.0370.05716.53
5.4.110.0270.06716.43
5.4.100.0230.06316.60
5.4.90.0170.07316.29
5.4.80.0270.06016.61
5.4.70.0170.05016.45
5.4.60.0000.07716.52
5.4.50.0030.06716.24
5.4.40.0300.07016.51
5.4.30.0130.03716.20
5.4.20.0230.06716.48

preferences:
68.53 ms | 401 KiB | 5 Q