I want to convert an integer number to string while maintaining the leading 0
's.
Is this posible in PHP
?
$num = 0000003;
echo $num; // output: 3
echo (string)$num; // output: 3
// Wanted output: "0000003"
Edit:
I read the most questions before in SO, but I was curious if there was a possibility to keep the 0
and convert it to string in runtime, like the code example above echo (string)$num;
.