Formatting a number with leading zeros in PHP

I have a variable which contains the value 1234567 .

I would like it to contain exactly 8 digits, i.e. 01234567 .

Is there a PHP function for that?