3v4l.org

run code in 300+ PHP versions simultaneously
<?php $formattedMoney = '-$1000'; $currency = 'USD'; $parser = new \NumberFormatter('en_US', \NumberFormatter::CURRENCY); $parser->setAttribute(\NumberFormatter::FRACTION_DIGITS, 2); $parser->setAttribute(\NumberFormatter::NEGATIVE_PREFIX, '-'); $decimal = $parser->parseCurrency($formattedMoney, $currency); var_dump($decimal);

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.40.0060.01020.34
8.3.30.0110.00720.03
8.3.20.0040.00421.57
8.3.10.0090.00022.04
8.3.00.0040.00423.15
8.2.170.0070.01122.96
8.2.160.0070.00723.63
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00022.93
8.2.120.0040.00426.35
8.2.110.0060.00323.57
8.2.100.0090.00319.50
8.2.90.0080.00020.23
8.2.80.0030.00619.38
8.2.70.0030.00619.38
8.2.60.0030.00519.68
8.2.50.0090.00019.38
8.2.40.0080.00021.77
8.2.30.0060.00320.71
8.2.20.0000.00819.56
8.2.10.0030.00519.92
8.2.00.0080.00019.89
8.1.270.0090.00623.56
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0070.00319.23
8.1.230.0120.00019.32
8.1.220.0030.00519.66
8.1.210.0090.00019.23
8.1.200.0070.00319.22
8.1.190.0030.00519.23
8.1.180.0030.00619.23
8.1.170.0070.00320.51
8.1.160.0040.00422.17
8.1.150.0030.00620.20
8.1.140.0000.00921.41
8.1.130.0040.00419.45
8.1.120.0000.00719.30
8.1.110.0040.00419.38
8.1.100.0050.00319.34
8.1.90.0060.00319.44
8.1.80.0040.00419.19
8.1.70.0040.00419.51
8.1.60.0030.00619.35
8.1.50.0060.00319.61
8.1.40.0040.00419.47
8.1.30.0000.00919.80
8.1.20.0060.00319.72
8.1.10.0060.00319.62
8.1.00.0040.00419.45
8.0.300.0080.00018.77
8.0.290.0000.00818.63
8.0.280.0040.00419.73
8.0.270.0000.00719.06
8.0.260.0000.00719.04
8.0.250.0000.00718.76
8.0.240.0000.00918.93
8.0.230.0000.00818.88
8.0.220.0080.00018.78
8.0.210.0000.00718.77
8.0.200.0070.00018.82
8.0.190.0060.00318.89
8.0.180.0030.00618.94
8.0.170.0090.00018.70
8.0.160.0000.00718.81
8.0.150.0000.00718.58
8.0.140.0050.00218.87
8.0.130.0050.00013.34
8.0.120.0080.00018.92
8.0.110.0060.00318.82
8.0.100.0060.00318.81
8.0.90.0050.00318.93
8.0.80.0070.01018.85
8.0.70.0040.00418.90
8.0.60.0000.00819.04
8.0.50.0040.00418.79
8.0.30.0090.01119.09
8.0.20.0150.00519.09
8.0.10.0040.00418.98
8.0.00.0100.00918.77
7.4.330.0050.00016.70
7.4.320.0000.00818.99
7.4.300.0060.00618.93
7.4.290.0000.00818.91
7.4.280.0090.00019.00
7.4.270.0090.00019.01
7.4.260.0070.00318.99
7.4.250.0030.00618.88
7.4.240.0090.00018.93
7.4.230.0090.00018.84
7.4.220.0100.01319.09
7.4.210.0130.00318.98
7.4.200.0030.00618.92
7.4.160.0080.00818.72
7.4.150.0090.01118.79
7.4.140.0130.01218.84
7.4.130.0140.00918.72
7.4.120.0090.01118.79
7.4.110.0080.01218.77
7.4.100.0110.01118.88
7.4.90.0070.01318.92
7.4.80.0040.01619.39
7.4.70.0060.01518.76
7.4.60.0030.01618.69
7.4.50.0070.00718.78
7.4.40.0120.00918.82
7.4.30.0100.01718.87
7.4.10.0060.01517.54
7.4.00.0070.01217.37
7.3.330.0000.00613.00
7.3.320.0000.00513.10
7.3.310.0060.00318.61
7.3.300.0040.00418.44
7.3.290.0110.00718.69
7.3.280.0110.01118.71
7.3.270.0140.01118.84
7.3.260.0150.00618.80
7.3.250.0130.01018.82
7.3.240.0110.00919.00
7.3.230.0130.00719.10
7.3.210.0150.01218.64
7.3.200.0140.01218.59
7.3.190.0090.00918.90
7.3.180.0030.02218.61
7.3.170.0130.00618.77
7.3.160.0060.01219.04
7.3.130.0120.00917.05
7.3.120.0050.01317.01
7.3.110.0070.01217.05
7.3.100.0020.01317.24
7.3.90.0080.00917.12
7.3.80.0030.01117.08
7.3.70.0050.01217.14
7.3.60.0100.00617.01
7.3.50.0050.00817.31
7.3.40.0050.00917.11
7.3.30.0020.01517.11
7.3.20.0040.01218.95
7.3.10.0100.00718.70
7.3.00.0110.00518.69
7.2.330.0030.01719.07
7.2.320.0100.00918.80
7.2.310.0110.00718.87
7.2.300.0140.00719.16
7.2.290.0090.01019.07
7.2.260.0100.01317.19
7.2.250.0070.01117.19
7.2.240.0060.01417.32
7.2.230.0080.01217.35
7.2.220.0070.01417.30
7.2.210.0050.01317.25
7.2.200.0030.00817.24
7.2.190.0020.01417.38
7.2.180.0020.01117.36
7.2.170.0060.00917.28
7.2.160.0000.01217.45
7.2.150.0030.01319.29
7.2.140.0060.00619.25
7.2.130.0030.01418.96
7.2.120.0040.01519.31
7.2.110.0000.01819.21
7.2.100.0070.00719.26
7.2.90.0100.01018.97
7.2.80.0030.01419.11
7.2.70.0000.01719.11
7.2.60.0070.00919.06
7.2.50.0070.01019.29
7.2.40.0060.00919.04
7.2.30.0000.01219.00
7.2.20.0060.01319.16
7.2.10.0040.01519.14
7.2.00.0040.01420.52
7.1.330.0030.01418.22
7.1.320.0090.00818.03
7.1.310.0030.01418.05
7.1.300.0030.01318.03
7.1.290.0020.01218.15
7.1.280.0080.00817.98
7.1.270.0050.00817.89
7.1.260.0110.00318.12
7.1.250.0030.01318.15
7.1.240.0100.00717.96
7.1.230.0040.00818.03
7.1.220.0040.01218.36
7.1.210.0030.01318.39
7.1.200.0060.00618.18
7.1.190.0040.01418.31
7.1.180.0000.01418.14
7.1.170.0000.01118.23
7.1.160.0040.00818.23
7.1.150.0120.00618.39
7.1.140.0030.01218.21
7.1.130.0000.01018.13
7.1.120.0040.01518.11
7.1.110.0090.00918.09
7.1.100.0050.01019.55
7.1.90.0030.01418.25
7.1.80.0060.00818.21
7.1.70.0030.01218.96
7.1.60.0100.01119.17
7.1.50.0070.01119.13
7.1.40.0070.01118.22
7.1.30.0040.00818.00
7.1.20.0040.01518.36
7.1.10.0000.01618.31
7.1.00.0080.04021.55
7.0.330.0100.00717.55
7.0.320.0030.01217.96
7.0.310.0130.00017.92
7.0.300.0000.01317.97
7.0.290.0000.01318.02
7.0.280.0090.00617.79
7.0.270.0060.00617.97
7.0.260.0030.01317.82
7.0.250.0080.00317.91
7.0.240.0080.00417.75
7.0.230.0030.01217.82
7.0.220.0060.01217.86
7.0.210.0090.00617.94
7.0.200.0350.00517.67
7.0.190.0070.00717.72
7.0.180.0030.00918.05
7.0.170.0070.01018.08
7.0.160.0040.00818.02
7.0.150.0040.01417.78
7.0.140.0080.00617.90
7.0.130.0030.01017.85
7.0.120.0030.01017.71
7.0.110.0070.00317.94
7.0.100.0040.00717.73
7.0.90.0060.00317.83
7.0.80.0060.00917.73
7.0.70.0130.00317.89
7.0.60.0110.04320.88
7.0.50.0030.04017.74
7.0.40.0060.02619.05
7.0.30.0180.04018.98
7.0.20.0180.03519.10
7.0.10.0030.03619.13
7.0.00.0140.04118.99
5.6.400.0090.00616.59
5.6.390.0030.01016.98
5.6.380.0030.01316.91
5.6.370.0060.01017.01
5.6.360.0060.00616.61
5.6.350.0040.00816.60
5.6.340.0030.01316.76
5.6.330.0030.01016.35
5.6.320.0070.00416.96
5.6.310.0060.01016.89
5.6.300.0050.00516.88
5.6.290.0070.01016.93
5.6.280.0020.02920.01
5.6.270.0060.00616.81
5.6.260.0060.00616.80
5.6.250.0000.01016.57
5.6.240.0090.00316.70
5.6.230.0070.00716.53
5.6.220.0070.01016.75
5.6.210.0070.04219.80
5.6.200.0100.03817.38
5.6.190.0050.02619.90
5.6.180.0180.04019.60
5.6.170.0080.02519.60
5.6.160.0030.02819.70
5.6.150.0110.03717.54
5.6.140.0080.04617.33
5.6.130.0080.03017.51
5.6.120.0110.03519.97
5.6.110.0070.05020.28
5.6.100.0110.03320.01
5.6.90.0020.04420.13
5.6.80.0030.03019.88
5.6.70.0090.00616.88
5.6.60.0030.01016.62
5.6.50.0120.00616.68
5.6.40.0070.01016.55
5.6.30.0060.01016.95
5.6.20.0100.00716.73
5.6.10.0060.00916.69
5.6.00.0030.01316.63
5.5.380.0040.01516.79
5.5.370.0100.00016.54
5.5.360.0040.01516.63
5.5.350.0150.02819.65
5.5.340.0080.04317.32
5.5.330.0120.03219.69
5.5.320.0350.04019.78
5.5.310.0200.04319.61
5.5.300.0070.04417.47
5.5.290.0070.04017.29
5.5.280.0130.03320.04
5.5.270.0120.04419.94
5.5.260.0070.04719.86
5.5.250.0050.04819.84
5.5.240.0020.04719.45
5.5.230.0070.00716.19
5.5.220.0000.01016.65
5.5.210.0110.00416.64
5.5.200.0140.00316.48
5.5.190.0030.01316.55
5.5.180.0040.00816.40
5.5.170.0070.00316.72
5.5.160.0040.01116.53
5.5.150.0030.01416.52
5.5.140.0040.01116.66
5.5.130.0120.00016.88
5.5.120.0060.00616.73
5.5.110.0040.01116.64
5.5.100.0000.01616.35
5.5.90.0090.00916.61
5.5.80.0130.00316.80
5.5.70.0000.01416.46
5.5.60.0030.00716.67
5.5.50.0060.00916.68
5.5.40.0030.01316.75
5.5.30.0130.00316.45
5.5.20.0060.00916.77
5.5.10.0000.01816.40
5.5.00.0110.00416.70

preferences:
43.31 ms | 400 KiB | 5 Q