`sprintf('%s', (int) $something` makes not real sense I think that is what `%d` is for. Also there where just `%` not `%s` in this 3 lines.