PHP: get number of decimal digits February 25, 2023 by Tarik $str = "1.23444"; print strlen(substr(strrchr($str, "."), 1));