Question: how can i force format number 4 digits with symfony.

if I have :
$num = 1;

I need to have 
$num = 0001;

I find a solution with php but cannot work with symfony 
printf("%04d", $num);

Thanks

Answer: 
Thanks, I get the solution :
$num = 1;
sprintf('%04d',$num);
Have you tried:

```
str_pad($num, 4, "0", STR_PAD_LEFT)

```

?