How does PHP handle leading zeros compared to other programming languages like C?

In PHP, leading zeros in numeric values are automatically removed when they are converted to integers. This behavior differs from languages like C, where leading zeros are considered as part of the number and can affect its value. To preserve leading zeros in PHP, you can store the numeric value as a string instead of an integer.

$number = "0123";
echo $number; // Output: 0123