create common function for ceil and floor in php code example Example: php round up //round up to nearest integer echo(ceil(0.60) . "<br>"); //result 1