php round up only if decimals is greater than 50 code example Example: round up built in function php echo ceil(0.5); //Prints 1