3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tax = bcmul("33.95", ".065", 3); // 2.20675 $real_total = bcadd("33.95", "7.87", 3); // 41.82 $real_total = bcadd($real_total, $tax, 3); // 44.02675 echo mask("4111 1111 1111 1111", 0, -4); function bcround($number, $scale = 0) { $fix = "5"; for ($i=0; $i<$scale; $i++) $fix = "0$fix"; $number = bcadd($number, "0.$fix", $scale + 1); return bcdiv($number, "1.0", $scale); } function mask($string, $start = 0, $length = false) { $mask = preg_replace('/([\w])+/', '*', $string); if (!$length) { $mask = substr($mask, $start); $string = substr_replace($string, $mask, $start); } else { $mask = substr($mask, $start, $length); $string = substr_replace($string, $mask, $start, $length); } return $string; }
Output for git.master, git.master_jit, rfc.property-hooks
* *1111

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