3v4l.org

run code in 300+ PHP versions simultaneously
<?php $prices = array(chr(8364).' 45.000,-', '45 USD', 'CHF 0,77', chr(36).' 23000', 'USD 23000', '46.000,95', '6', '4,3', chr(8364).' 45,00', chr(36).' 46foobar', chr(8364).' 45,-', chr(8364).' 45', chr(8364).' 45,00', '45 '.chr(8364), '45,- '.chr(8364), '45,00 '.chr(8364), '45.000 '.chr(8364), chr(36).' 45.000,--', chr(8364).' 4.000,00', 'hallo welt', '20.00 €'); $currencies = '(?:EUR|USD|GBP|CHF|FR|SFR|\\'.chr(8364).'|\\'.chr(36).'|\\'.chr(163).')'; $price = '(?:(?:(?:[1-9][0-9]{0,2}(?:\.|,)?)+(?:[0-9]{3})|(?:[0-9]|[1-9][0-9]{1,2}))(?:(?:\.|,)(?:[0-9]{2}|\-{1,2}))?)'; $regex = '(?:^|\s+)(?:(?:(?:'.$currencies.'\s?)'.$price.')|(?:'.$price.'(?:\s?'.$currencies.')))(?:\s+|$)'; foreach($prices as $check) { echo str_pad($check, 15, ' ', STR_PAD_RIGHT).' '.(preg_match('/'.$regex.'/i', $check, $match) ? 'matched: ' : 'did not match.').(count($match) ? $match[0] : '')."\n"; }

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.0150.00018.55
8.3.50.0120.00620.13
8.3.40.0090.00618.95
8.3.30.0090.00619.22
8.3.20.0000.00720.21
8.3.10.0080.00023.69
8.3.00.0040.00417.75
8.2.180.0090.01316.75
8.2.170.0140.00022.96
8.2.160.0040.01120.51
8.2.150.0070.00024.18
8.2.140.0090.00924.66
8.2.130.0040.00426.16
8.2.120.0040.00421.15
8.2.110.0090.00022.24
8.2.100.0060.00618.28
8.2.90.0090.00019.36
8.2.80.0030.00517.97
8.2.70.0080.00018.13
8.2.60.0090.00018.05
8.2.50.0040.00418.07
8.2.40.0030.00520.07
8.2.30.0030.00618.11
8.2.20.0030.00517.98
8.2.10.0000.00918.24
8.2.00.0040.00418.03
8.1.280.0040.01125.92
8.1.270.0060.00324.03
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00724.10
8.1.230.0110.00019.28
8.1.220.0030.00517.79
8.1.210.0050.00518.77
8.1.200.0070.00417.61
8.1.190.0040.00417.48
8.1.180.0000.00818.10
8.1.170.0080.00018.75
8.1.160.0000.00722.14
8.1.150.0080.00019.00
8.1.140.0030.00617.62
8.1.130.0040.00417.94
8.1.120.0050.00217.72
8.1.110.0030.00517.70
8.1.100.0040.00417.73
8.1.90.0000.00717.53
8.1.80.0040.00417.64
8.1.70.0040.00417.61
8.1.60.0090.00017.81
8.1.50.0000.00917.75
8.1.40.0040.00417.76
8.1.30.0040.00417.86
8.1.20.0030.00617.78
8.1.10.0030.00617.71
8.1.00.0040.00417.64
8.0.300.0000.00818.77
8.0.290.0000.00816.88
8.0.280.0000.00818.49
8.0.270.0000.00717.24
8.0.260.0070.00017.38
8.0.250.0000.00717.20
8.0.240.0040.00417.10
8.0.230.0030.00317.19
8.0.220.0040.00417.12
8.0.210.0040.00417.17
8.0.200.0030.00317.16
8.0.190.0060.00317.10
8.0.180.0070.00017.13
8.0.170.0030.00517.18
8.0.160.0050.00216.96
8.0.150.0020.00517.07
8.0.140.0040.00416.97
8.0.130.0060.00013.63
8.0.120.0000.00816.95
8.0.110.0040.00417.07
8.0.100.0040.00416.93
8.0.90.0000.00817.12
8.0.80.0000.01517.14
8.0.70.0030.00517.18
8.0.60.0000.00817.11
8.0.50.0000.00817.11
8.0.30.0210.00517.24
8.0.20.0100.01017.40
8.0.10.0050.00317.24
8.0.00.0100.00916.98
7.4.330.0000.00515.16
7.4.320.0030.00316.80
7.4.300.0000.00716.88
7.4.290.0030.00516.82
7.4.280.0040.00416.64
7.4.270.0030.00316.79
7.4.260.0070.00016.93
7.4.250.0000.00716.68
7.4.240.0040.00316.89
7.4.230.0030.00517.00
7.4.220.0070.01816.99
7.4.210.0090.00616.85
7.4.200.0000.00716.79
7.4.160.0030.01216.90
7.4.150.0110.00717.40
7.4.140.0120.00917.86
7.4.130.0120.00816.85
7.4.120.0130.00716.78
7.4.110.0090.00916.76
7.4.100.0070.01016.78
7.4.90.0070.01016.62
7.4.80.0140.00519.39
7.4.70.0090.00916.70
7.4.60.0170.00016.68
7.4.50.0040.00016.61
7.4.40.0120.01216.80
7.4.30.0100.00716.72
7.4.00.0070.01115.32
7.3.330.0030.00313.32
7.3.320.0060.00013.50
7.3.310.0070.00016.49
7.3.300.0000.00716.60
7.3.290.0100.01016.50
7.3.280.0120.00816.48
7.3.270.0090.01317.40
7.3.260.0060.01216.75
7.3.250.0100.01016.69
7.3.240.0070.01016.96
7.3.230.0110.00716.50
7.3.210.0030.01416.54
7.3.200.0080.01119.39
7.3.190.0090.01116.86
7.3.180.0130.00316.95
7.3.170.0130.01016.62
7.3.160.0120.00616.57
7.3.10.0030.01416.99
7.3.00.0100.00316.56
7.2.330.0140.00316.67
7.2.320.0110.00816.93
7.2.310.0090.00916.83
7.2.300.0110.00616.81
7.2.290.0140.00316.89
7.2.130.0080.00916.95
7.2.120.0050.00617.13
7.2.110.0040.00716.90
7.2.100.0050.00917.23
7.2.90.0030.01017.17
7.2.80.0130.00617.21
7.2.70.0060.01017.20
7.2.60.0180.00317.13
7.2.50.0040.01317.09
7.2.40.0070.01017.33
7.2.30.0100.01017.08
7.2.20.0140.00017.18
7.2.10.0090.00617.24
7.2.00.0080.00818.35
7.1.250.0060.00616.02
7.1.200.0060.00615.98
7.1.100.0000.01118.37
7.1.70.0000.01617.43
7.1.60.0030.01619.40
7.1.50.0130.01317.20
7.1.00.0070.07322.60
7.0.200.0210.00317.05
7.0.140.0130.06022.20
7.0.100.0130.08020.11
7.0.90.0200.08020.05
7.0.80.0130.06320.09
7.0.70.0170.05720.00
7.0.60.0070.06720.02
7.0.50.0070.04720.38
7.0.40.0030.08019.98
7.0.30.0070.05320.08
7.0.20.0100.04020.09
7.0.10.0030.08720.20
7.0.00.0070.08320.16
5.6.280.0070.07021.09
5.6.250.0070.03720.82
5.6.240.0030.04020.51
5.6.230.0170.07720.65
5.6.220.0030.07720.51
5.6.210.0100.08020.66
5.6.200.0130.07021.05
5.6.190.0030.08721.16
5.6.180.0030.07321.04
5.6.170.0030.07321.09
5.6.160.0070.08320.96
5.6.150.0130.07320.91
5.6.140.0000.08321.03
5.6.130.0030.09021.05
5.6.120.0100.05021.05
5.6.110.0170.06321.12
5.6.100.0100.07020.94
5.6.90.0130.07720.95
5.6.80.0070.08320.41
5.6.70.0100.07020.47
5.6.60.0030.08320.52
5.6.50.0030.09020.41
5.6.40.0030.05020.39
5.6.30.0070.08020.51
5.6.20.0170.06720.38
5.6.10.0070.05320.38
5.6.00.0030.04320.34
5.5.380.0030.08320.41
5.5.370.0030.07720.38
5.5.360.0130.07720.35
5.5.350.0100.09020.34
5.5.340.0070.08020.95
5.5.330.0130.06320.82
5.5.320.0070.04020.82
5.5.310.0130.07020.90
5.5.300.0100.07320.78
5.5.290.0130.08020.85
5.5.280.0170.07320.94
5.5.270.0100.07720.90
5.5.260.0130.06320.74
5.5.250.0030.08720.54
5.5.240.0100.07320.33
5.5.230.0130.07320.20
5.5.220.0170.03020.21
5.5.210.0000.08720.27
5.5.200.0030.08320.25
5.5.190.0070.08020.19
5.5.180.0130.05020.16
5.5.160.0070.05020.28
5.5.150.0100.08020.24
5.5.140.0030.04020.24
5.5.130.0170.06020.16
5.5.120.0100.07320.19
5.5.110.0170.06720.16
5.5.100.0070.08020.06
5.5.90.0070.07320.17
5.5.80.0100.07319.99
5.5.70.0000.07720.16
5.5.60.0130.07320.07
5.5.50.0000.08320.10
5.5.40.0130.06320.07
5.5.30.0100.07020.09
5.5.20.0070.07720.06
5.5.10.0030.08020.14
5.5.00.0170.05320.04
5.4.450.0000.08719.48
5.4.440.0070.06719.27
5.4.430.0130.08319.39
5.4.420.0030.07319.36
5.4.410.0130.03719.01
5.4.400.0100.07019.14
5.4.390.0130.07018.96
5.4.380.0100.04018.79
5.4.370.0030.06018.95
5.4.360.0070.07318.79
5.4.350.0070.04718.98
5.4.340.0000.05719.03
5.4.320.0030.08019.03
5.4.310.0070.03719.24
5.4.300.0100.07319.11
5.4.290.0030.06719.06
5.4.280.0100.07319.11
5.4.270.0070.05019.06
5.4.260.0070.07719.14
5.4.250.0100.06719.10
5.4.240.0030.06019.12
5.4.230.0130.07019.13
5.4.220.0030.08319.16
5.4.210.0030.04019.02
5.4.200.0070.04718.94
5.4.190.0130.07019.02
5.4.180.0000.07718.89
5.4.170.0100.05719.02
5.4.160.0100.07018.79
5.4.150.0070.06319.02
5.4.140.0070.05716.32
5.4.130.0070.07316.24
5.4.120.0070.07316.34
5.4.110.0130.07016.28
5.4.100.0000.07716.32
5.4.90.0130.06016.23
5.4.80.0100.06016.41
5.4.70.0030.07716.29
5.4.60.0100.05316.20
5.4.50.0000.06716.18
5.4.40.0030.07316.24
5.4.30.0070.06716.32
5.4.20.0130.03716.33
5.4.10.0070.07316.20
5.4.00.0070.06715.66
5.3.290.0030.07314.68
5.3.280.0170.07014.57
5.3.270.0130.07014.58
5.3.260.0000.06714.54
5.3.250.0100.07714.49
5.3.240.0000.08314.61
5.3.230.0100.07014.45
5.3.220.0030.08014.59
5.3.210.0000.07714.43
5.3.200.0170.05314.53
5.3.190.0130.07314.54
5.3.180.0130.06714.45
5.3.170.0030.05014.57
5.3.160.0000.07314.43
5.3.150.0070.05314.55
5.3.140.0130.05014.42
5.3.130.0130.07014.48
5.3.120.0100.06014.57
5.3.110.0070.07714.51
5.3.100.0070.03714.01
5.3.90.0030.04314.03
5.3.80.0100.06713.94
5.3.70.0130.07013.90
5.3.60.0030.07313.88
5.3.50.0030.04313.78
5.3.40.0070.07013.84
5.3.30.0070.03713.93
5.3.20.0130.04013.68
5.3.10.0030.07013.65
5.3.00.0030.05013.65
5.2.170.0000.06311.16
5.2.160.0000.05311.23
5.2.150.0070.06711.01
5.2.140.0070.06311.21
5.2.130.0100.04711.06
5.2.120.0070.06010.96
5.2.110.0070.06011.11
5.2.100.0030.06010.96
5.2.90.0070.06011.09
5.2.80.0070.06011.16
5.2.70.0100.03011.03
5.2.60.0000.06011.14
5.2.50.0000.04010.89
5.2.40.0100.04711.07
5.2.30.0030.06711.00
5.2.20.0130.04310.79
5.2.10.0200.03310.90
5.2.00.0070.05710.80
5.1.60.0030.04710.79
5.1.50.0070.02710.79
5.1.40.0000.05310.79
5.1.30.0070.05710.79
5.1.20.0070.05710.79
5.1.10.0100.05010.79
5.1.00.0030.04710.79
5.0.50.0030.02310.79
5.0.40.0130.03310.79
5.0.30.0030.05010.79
5.0.20.0030.03010.79
5.0.10.0000.03010.79
5.0.00.0000.06710.79
4.4.90.0000.03310.79
4.4.80.0000.03310.79
4.4.70.0030.02010.79
4.4.60.0130.02010.79
4.4.50.0030.02010.79
4.4.40.0100.04710.79
4.4.30.0030.02310.79
4.4.20.0000.03010.79
4.4.10.0030.03710.79
4.4.00.0030.04310.79
4.3.110.0030.03310.79
4.3.100.0030.01710.79
4.3.90.0000.03010.79
4.3.80.0000.03010.79
4.3.70.0000.03710.79
4.3.60.0070.03710.79
4.3.50.0000.01710.79
4.3.40.0000.03310.79
4.3.30.0000.03010.79
4.3.20.0070.03010.79
4.3.10.0000.03310.79
4.3.00.0030.03310.80

preferences:
64.1 ms | 400 KiB | 5 Q