3v4l.org

run code in 300+ PHP versions simultaneously
<?php $modes = [ 'PHP_ROUND_HALF_UP', 'PHP_ROUND_HALF_DOWN', 'PHP_ROUND_HALF_EVEN', 'PHP_ROUND_HALF_ODD', 'PHP_ROUND_FLOOR', 'PHP_ROUND_CEILING', 'PHP_ROUND_AWAY_FROM_ZERO', 'PHP_ROUND_TOWARD_ZERO', ]; foreach ($modes as $mode) { var_dump(round(50, -2, constant($mode))); }
Output for git.master, git.master_jit, rfc.property-hooks
float(100) float(0) float(0) float(100) float(0) float(100) float(100) float(0)

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