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->parse($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.60.0130.00720.43
8.3.50.0130.00920.18
8.3.40.0120.00320.21
8.3.30.0070.01319.89
8.3.20.0080.00021.54
8.3.10.0040.00421.86
8.3.00.0050.00323.27
8.2.180.0120.00918.75
8.2.170.0090.00622.96
8.2.160.0090.00621.89
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0050.00322.93
8.2.120.0040.00426.35
8.2.110.0070.00321.75
8.2.100.0120.00019.53
8.2.90.0060.00320.42
8.2.80.0030.00519.13
8.2.70.0000.00819.38
8.2.60.0030.00519.55
8.2.50.0000.00919.38
8.2.40.0030.00621.92
8.2.30.0070.00020.68
8.2.20.0040.00419.61
8.2.10.0040.00419.84
8.2.00.0040.00419.95
8.1.280.0250.00625.92
8.1.270.0030.01223.70
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0090.00025.39
8.1.230.0080.00419.39
8.1.220.0030.00519.53
8.1.210.0030.00519.23
8.1.200.0030.00719.23
8.1.190.0000.00819.23
8.1.180.0090.00019.23
8.1.170.0000.01120.44
8.1.160.0000.00922.17
8.1.150.0080.00020.21
8.1.140.0030.00521.29
8.1.130.0030.00319.45
8.1.120.0040.00419.22
8.1.110.0050.00319.43
8.1.100.0060.00319.38
8.1.90.0000.00819.38
8.1.80.0020.00519.38
8.1.70.0040.00419.21
8.1.60.0000.00819.59
8.1.50.0000.00919.59
8.1.40.0060.00319.48
8.1.30.0040.00419.81
8.1.20.0040.00419.60
8.1.10.0040.00419.64
8.1.00.0000.00819.49
8.0.300.0040.00418.77
8.0.290.0060.00318.63
8.0.280.0040.00419.82
8.0.270.0070.00018.99
8.0.260.0000.00719.05
8.0.250.0040.00418.85
8.0.240.0080.00018.82
8.0.230.0050.00318.86
8.0.220.0000.00718.83
8.0.210.0070.00018.84
8.0.200.0030.00318.91
8.0.190.0030.00518.72
8.0.180.0070.00518.90
8.0.170.0030.00518.63
8.0.160.0040.00418.70
8.0.150.0000.00718.68
8.0.140.0070.00018.52
8.0.130.0000.00613.28
8.0.120.0030.00718.95
8.0.110.0050.00318.71
8.0.100.0030.00518.89
8.0.90.0030.00619.07
8.0.80.0070.00718.63
8.0.70.0030.00518.91
8.0.60.0000.00818.89
8.0.50.0000.00818.76
8.0.30.0100.00919.07
8.0.20.0120.01019.17
8.0.10.0040.00419.10
8.0.00.0110.00918.81
7.4.330.0000.00516.89
7.4.320.0000.00618.46
7.4.300.0030.00318.55
7.4.290.0000.00718.54
7.4.280.0000.00818.45
7.4.270.0000.00718.47
7.4.260.0060.00318.45
7.4.250.0050.00218.51
7.4.240.0040.00418.60
7.4.230.0000.00718.54
7.4.220.0180.00918.55
7.4.210.0060.00918.64
7.4.200.0040.00418.57
7.4.160.0060.00918.22
7.4.150.0070.01118.32
7.4.140.0110.01218.40
7.4.130.0100.01118.39
7.4.120.0130.00918.25
7.4.110.0090.00818.53
7.4.100.0060.01218.44
7.4.90.0140.00418.37
7.4.80.0030.01419.39
7.4.70.0120.00418.16
7.4.60.0070.01318.33
7.4.50.0090.00318.54
7.4.40.0090.01218.68
7.4.30.0090.00918.28
7.4.00.0060.00616.92
7.3.330.0050.00013.11
7.3.320.0000.00513.10
7.3.310.0040.00418.32
7.3.300.0030.00318.22
7.3.290.0070.00918.31
7.3.280.0080.00818.37
7.3.270.0130.00618.43
7.3.260.0100.01018.55
7.3.250.0080.01018.32
7.3.240.0090.00918.32
7.3.230.0110.00718.36
7.3.210.0060.01118.60
7.3.200.0120.00618.45
7.3.190.0090.00918.52
7.3.180.0100.00718.42
7.3.170.0090.00918.35
7.3.160.0130.00318.26
7.3.10.0020.01218.45
7.3.00.0090.00318.29
7.2.330.0090.01218.75
7.2.320.0100.01018.34
7.2.310.0110.01118.57
7.2.300.0090.00918.41
7.2.290.0150.01018.46
7.2.130.0070.00718.61
7.2.120.0030.01018.69
7.2.110.0030.00918.77
7.2.100.0080.00518.72
7.2.90.0080.00718.75
7.2.80.0080.00718.59
7.2.70.0090.00718.66
7.2.60.0110.00718.75
7.2.50.0040.01518.77
7.2.40.0080.01018.60
7.2.30.0100.00918.66
7.2.20.0050.00918.64
7.2.10.0090.00318.62
7.2.00.0110.00319.77
7.1.250.0060.00617.74
7.1.200.0060.00617.59
7.1.100.0160.00520.32
7.1.70.0030.01019.27
7.1.60.0070.01419.46
7.1.50.0150.00919.19
7.1.00.0030.07724.56
7.0.200.0340.01316.73
7.0.60.0130.06023.88
7.0.50.0070.05017.90
7.0.40.0130.07321.89
7.0.30.0400.04321.92
7.0.20.0270.07321.78
7.0.10.0030.06721.97
7.0.00.0100.05322.02
5.6.280.0000.03722.98
5.6.210.0130.05022.54
5.6.200.0100.08018.09
5.6.190.0030.04322.23
5.6.180.0270.04022.34
5.6.170.0170.03722.27
5.6.160.0030.04322.48
5.6.150.0100.07318.22
5.6.140.0070.07318.22
5.6.130.0030.07018.11
5.6.120.0170.07022.84
5.6.110.0130.06722.88
5.6.100.0170.06722.98
5.6.90.0070.04722.73
5.6.80.0130.03322.37
5.5.350.0230.05322.34
5.5.340.0070.06017.97
5.5.330.0100.07021.98
5.5.320.0270.04022.12
5.5.310.0330.07321.94
5.5.300.0100.03317.98
5.5.290.0030.04017.89
5.5.280.0070.04022.82
5.5.270.0100.07322.88
5.5.260.0070.05322.92
5.5.250.0130.08022.54
5.5.240.0000.07322.11

preferences:
55.28 ms | 401 KiB | 5 Q