3v4l.org

run code in 500+ PHP versions simultaneously
<?php class BelgianUSDollarSignFormatter extends NumberFormatter { public function formatCurrency(float $amount, string $currency): string|false { return str_replace('щ.д.', '$', parent::formatCurrency($amount, $currency)); } } $curr = new BelgianUSDollarSignFormatter('bg_BG', NumberFormatter::CURRENCY); $amount = '5665.25'; $currency = 'USD'; echo $curr->formatCurrency($amount, $currency).PHP_EOL; $currency = 'EUR'; echo $curr->formatCurrency($amount, $currency).PHP_EOL; $currency = 'BGN'; echo $curr->formatCurrency($amount, $currency).PHP_EOL; $currency = 'AUD'; echo $curr->formatCurrency($amount, $currency).PHP_EOL;

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.70.0070.00716.82
8.5.60.0100.00716.91
8.5.50.0140.00416.78
8.5.30.0040.00319.48
8.5.20.0090.00920.13
8.5.10.0120.00616.66
8.5.00.0130.01122.98
8.4.220.0120.00624.20
8.4.210.0160.00624.09
8.4.180.0170.00622.39
8.4.170.0120.01126.90
8.4.160.0090.01326.86
8.4.150.0070.00618.33
8.4.140.0310.01319.56
8.4.130.0060.00320.82
8.4.120.0140.00725.93
8.4.110.0050.00720.80
8.4.100.0150.00620.97
8.4.90.0110.00622.55
8.4.80.0120.01020.63
8.4.70.0030.00620.81
8.4.60.0090.00620.73
8.4.50.0140.01020.71
8.4.40.0070.01419.66
8.4.30.0180.00320.71
8.4.20.0110.01121.59
8.4.10.0150.00621.16
8.3.310.0130.00821.24
8.3.300.0130.00825.58
8.3.290.0170.00522.95
8.3.280.0170.00720.98
8.3.270.0140.00718.45
8.3.260.0090.00918.57
8.3.250.0140.00420.50
8.3.240.0130.00719.01
8.3.230.0120.00818.46
8.3.220.0130.00521.01
8.3.210.0110.00420.25
8.3.200.0160.00518.69
8.3.190.0140.00618.85
8.3.180.0220.00820.85
8.3.170.0230.00322.58
8.3.160.0100.01019.09
8.3.150.0250.00618.31
8.3.140.0040.00419.10
8.3.130.0030.00620.13
8.3.120.0030.00620.76
8.3.110.0030.00620.94
8.3.100.0060.00324.06
8.3.90.0030.00626.77
8.3.80.0080.00320.06
8.3.70.0100.01020.30
8.3.60.0110.01118.69
8.3.50.0090.00618.79
8.3.40.0090.01322.88
8.3.30.0130.00822.36
8.3.20.0150.00625.04
8.3.10.0100.01025.08
8.3.00.0080.01222.19
8.2.310.0220.00920.70
8.2.300.0110.00921.39
8.2.290.0040.00422.44
8.2.280.0230.01021.86
8.2.270.0150.00018.75
8.2.260.0180.00718.66
8.2.250.0030.00618.67
8.2.240.0060.00320.90
8.2.230.0000.01022.58
8.2.220.0000.01037.54
8.2.210.0130.00726.77
8.2.200.0100.00320.04
8.2.190.0150.00918.50
8.2.180.0130.00318.38
8.2.170.0100.01322.09
8.2.160.0100.01223.40
8.2.150.0080.01122.51
8.2.140.0140.00823.75
8.2.130.0110.01123.75
8.2.120.0110.01122.60
8.2.110.0100.01122.56
8.2.100.0100.01022.51
8.2.90.0070.01322.18
8.2.80.0130.00522.65
8.2.70.0110.00822.01
8.2.60.0140.00522.24
8.2.50.0140.00522.37
8.2.40.0100.01022.11
8.2.30.0120.00821.92
8.2.20.0140.00521.96
8.2.10.0110.00921.17
8.2.00.0150.00521.13
8.1.340.0110.01224.10
8.1.330.0120.00823.76
8.1.320.0090.01318.10
8.1.310.0230.00918.05
8.1.300.0000.00920.25
8.1.290.0030.00630.84
8.1.280.0070.00725.92
8.1.270.0140.00624.53
8.1.260.0160.00424.39
8.1.250.0080.01024.44
8.1.240.0120.00720.92
8.1.230.0100.00820.96
8.1.220.0100.01021.40
8.1.210.0080.00920.93
8.1.200.0100.00621.12
8.1.190.0150.00221.17
8.1.180.0170.00520.88
8.1.170.0100.01121.26
8.1.160.0080.01020.79
8.1.150.0140.01221.11
8.1.140.0120.00922.14
8.1.130.0140.00322.15
8.1.120.0090.01021.03
8.1.110.0070.01020.93
8.1.100.0110.00522.09
8.1.90.0080.00820.96
8.1.80.0100.00822.15
8.1.70.0120.00521.23
8.1.60.0120.00621.04
8.1.50.0100.00820.92
8.1.40.0100.00521.10
8.1.30.0120.00321.43
8.1.20.0080.00922.25
8.1.10.0110.00622.02
8.1.00.0110.00621.95

preferences:
47.73 ms | 1017 KiB | 5 Q