如何将整数从0开始转换为php中的字符串?

When I type an integer with a 0 in front in php, this integer will treated as an octal base number and converted automatically to decimal based number.

for example, when i declare a variable as follow:

$var1 = 01002992456;
echo "$var1";

the result will be 514

any one has an idea that i can keep that variable as it declared (as string)? Thanks in advance.

Enclose the number in quotes to keep it as string.

$var1 = '01002992456';
echo "$var1";

Output: 01002992456