3v4l.org

run code in 300+ PHP versions simultaneously
<?php $derp = 0.29; function derp_round($derp, $len) { $mul = pow(10, $len); return floor($derp * $mul)/$mul; } var_dump( $derp, number_format($derp, 2), sprintf("%.2f", $derp), sprintf("%.2f", round($derp, 2, PHP_ROUND_HALF_DOWN)), sprintf("%.2f", derp_round($derp, 2)) );
Output for git.master, git.master_jit, rfc.property-hooks
float(0.29) string(4) "0.29" string(4) "0.29" string(4) "0.29" string(4) "0.28"

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