How does PHP compare to other programming languages like C in terms of handling leading zeros in number sequences?

When handling number sequences with leading zeros, PHP treats them as octal numbers by default. This can cause unexpected behavior when performing calculations or comparisons. To handle leading zeros as decimal numbers, you can use the intval() function to explicitly convert the string to an integer.

$number = "0123";
$decimalNumber = intval($number);
echo $decimalNumber; // Output: 123