3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Toon een getal: 8627.89 * als een bedrag: € 8.627,89 */ // Het getal $getal = 8627.89; // Het begin van het bedrag: euroteken en vaste spatie $bedrag = '&euro;&nbsp;'; // De rest van het getal toevoegen aan het bedrag if ($getal == round($getal)) { $bedrag .= number_format($getal, 0, ',', '.') . ',-'; } else { $bedrag .= number_format($getal, 2, ',', '.'); } // Testdump echo $bedrag;
Output for git.master, git.master_jit, rfc.property-hooks
&euro;&nbsp;8.627,89

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:
40.68 ms | 401 KiB | 8 Q