3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = 17.48; $number = intval(($number*10))/10; // x.0 if x.1,x.2,x.3 ; x.5 if x.4,x.5,x.6 ; x+1.0 if x.7,x.8,x.9 $whole = floor($number); //integer part $decimal = $number - $whole; // decimal part echo $decimal;
Output for git.master, git.master_jit, rfc.property-hooks
0.4

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