Formato PHP int a 9 dígitos con ceros precedentes

str_pad($input, 9, "0", STR_PAD_LEFT);
Carnivorous Flamingo