SyntaxFix
Write A Post
Hire A Developer
Questions
Though I'm not really sure what you want to do you are probably looking for sprintf.
This would be:
$value = sprintf( '%08d', 1234567 );