3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('precision',32); setlocale(LC_MONETARY, 'en_US'); $deal = array( array( 'amt' => 1350, 'rate' => .75, 'lod' => 47 ), array( 'amt' => 990, 'rate' => .75, 'lod' => 27 ), array( 'amt' => 4180, 'rate' => .75, 'lod' => 65 ), array( 'amt' => 2370, 'rate' => .75, 'lod' => 26 ) ); foreach ($deal as $value) { $fee = (($value['amt'] / 1000) * $value['rate']) * $value['lod']; var_dump($fee); echo 'money_format: ' . money_format('%.2n', (float) $fee) . PHP_EOL; echo 'number_format: ' . number_format($fee, 2) . PHP_EOL . PHP_EOL; }
Output for git.master_jit, git.master, rfc.property-hooks
float(47.587500000000006) Fatal error: Uncaught Error: Call to undefined function money_format() in /in/ue0Th:30 Stack trace: #0 {main} thrown in /in/ue0Th on line 30
Process exited with code 255.

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:
80.12 ms | 405 KiB | 5 Q