Home / PHP Tips Generated By ChatGPT / Rounding Numbers to the Nearest Integer in PHP Round a number to the nearest integer using round(). Source Code echo round(3.4); // Outputs: 3 echo round(3.5); // Outputs: 4