3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '200AUD, 150USD, 80GBP, 1250000VND'; var_export( array_reduce( explode(',', $string), function ($result, $money) { sscanf($money, '%d%s', $amount, $currency); return $result + [$currency => $amount]; }, [] ) );

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.5.10.0080.01020.07
8.5.00.0100.01220.20
8.4.150.0030.00014.05
8.4.140.0120.00817.36
8.4.130.0110.00817.64
8.4.120.0090.01020.57
8.4.110.0090.00918.91
8.4.100.0160.00517.76
8.4.90.0160.00518.61
8.4.80.0080.00317.82
8.4.70.0130.00717.68
8.4.60.0080.01218.86
8.4.50.0070.00417.86
8.4.40.0090.00619.37
8.4.30.0100.01018.49
8.4.20.0090.00922.48
8.4.10.0040.00423.87
8.3.280.0140.00618.33
8.3.270.0100.00916.74
8.3.260.0140.00616.90
8.3.250.0120.00619.00
8.3.240.0110.00816.93
8.3.230.0080.00516.34
8.3.220.0110.00617.18
8.3.210.0070.00216.74
8.3.200.0040.00516.64
8.3.190.0050.00317.11
8.3.180.0080.00916.77
8.3.170.0120.00618.96
8.3.160.0110.00718.34
8.3.150.0120.00916.92
8.3.140.0070.00717.26
8.3.130.0090.00018.43
8.3.120.0030.00620.49
8.3.110.0060.00320.94
8.3.100.0090.00024.06
8.3.90.0070.01126.77
8.3.80.0090.00018.56
8.3.70.0150.00616.75
8.3.60.0110.00418.55
8.3.50.0070.01016.43
8.3.40.0100.01020.47
8.3.30.0090.00618.71
8.3.20.0050.00324.18
8.3.10.0040.00424.66
8.3.00.0070.00026.16
8.2.290.0120.00622.30
8.2.280.0090.00618.38
8.2.270.0000.00720.56
8.2.260.0070.00718.96
8.2.250.0040.00418.43
8.2.240.0000.00918.87
8.2.230.0060.00322.58
8.2.220.0050.00337.54
8.2.210.0100.00726.77
8.2.200.0040.00416.75
8.2.190.0090.00616.58
8.2.180.0150.00318.29
8.2.170.0110.01122.96
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0080.00026.16
8.2.110.0100.00019.45
8.2.100.0110.00017.85
8.2.90.0000.00819.77
8.2.80.0090.00017.75
8.2.70.0040.00417.63
8.2.60.0000.00818.05
8.2.50.0000.00818.07
8.2.40.0030.00718.28
8.2.30.0000.00818.09
8.2.20.0070.00019.25
8.2.10.0080.00017.81
8.2.00.0080.00417.75
8.1.330.0070.00222.09
8.1.320.0090.01015.82
8.1.310.0040.00416.54
8.1.300.0100.00320.04
8.1.290.0060.00330.84
8.1.280.0110.00625.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0000.00822.61
8.1.230.0090.00322.81
8.1.220.0050.00317.74
8.1.210.0080.00018.96
8.1.200.0060.00317.48
8.1.190.0040.00417.23
8.1.180.0040.00422.09
8.1.170.0030.00618.89
8.1.160.0040.00418.89
8.1.150.0000.00818.63
8.1.140.0000.00917.46
8.1.130.0110.00017.48
8.1.120.0070.00717.50
8.1.110.0070.00217.41
8.1.100.0060.00317.62
8.1.90.0000.00917.52
8.1.80.0110.00017.57
8.1.70.0070.00317.43
8.1.60.0040.00817.61
8.1.50.0090.00017.53
8.1.40.0000.01217.54
8.1.30.0050.00517.64
8.1.20.0040.00817.70
8.1.10.0060.00317.59
8.1.00.0030.00617.50
8.0.300.0090.00019.82
8.0.290.0040.00416.75
8.0.280.0000.00718.29
8.0.270.0080.00316.77
8.0.260.0070.00216.80
8.0.250.0080.00416.89
8.0.240.0090.00016.94
8.0.230.0020.01016.88
8.0.220.0070.00216.73
8.0.210.0030.00616.85
8.0.200.0060.00316.88
8.0.190.0050.00516.85
8.0.180.0100.00016.85
8.0.170.0090.00016.80
8.0.160.0070.00216.85
8.0.150.0000.01116.83
8.0.140.0090.00016.77
8.0.130.0070.00216.87
8.0.120.0030.00616.77
8.0.110.0030.00716.88
8.0.100.0040.00416.94
8.0.90.0040.00416.89
8.0.80.0000.00716.83
8.0.70.0070.00016.80
8.0.60.0040.00416.86
8.0.50.0000.00816.95
8.0.30.0000.00716.77
8.0.20.0050.00316.86
8.0.10.0070.00017.00

preferences:
120.34 ms | 403 KiB | 5 Q