Remove duplicate code to calculate bytes from php ini values.