3v4l.org

run code in 500+ PHP versions simultaneously
<?php $item = []; $item['order_price'] = '$25.80'; $fmt = new NumberFormatter('en', NumberFormatter::CURRENCY); $decimal = $fmt->parseCurrency($item['order_price'], $cur); var_dump($decimal, $cur); $currency = $fmt->formatCurrency($decimal, $cur); var_dump($currency);
Output for git.master, git.master_jit, rfc.property-hooks
float(25.8) string(3) "USD" string(6) "$25.80"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.53 ms | 1253 KiB | 4 Q