src/Viserio/Component/Parser/Utils/XmlUtils.php
private static function transformToNumber(string $value, int $position): int
    {
        $raw  = $value;
        $cast = (int) $value;

        if ($raw === (string) $cast) {
            return $value[$position] === '0' ? \octdec($value) : $cast;
        }

        return $value[$position] === '0' ? \octdec($value) : $raw;
    }
private static function transformToNumber(string $value, int $position): int
    {
        $raw  = $value;
        $cast = (int) $value;

        if ($raw === (string) $cast) {
            return $value[$position] === '0' ? \octdec($value) : $cast;
        }

        return $value[$position] === '0' ? \octdec($value) : $raw;
    }
@param string $value
@param int    $position

@return int