Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial.php
public static function SLN($cost, $salvage, $life)
    {
        $cost = Functions::flattenSingleValue($cost);
        $salvage = Functions::flattenSingleValue($salvage);
        $life = Functions::flattenSingleValue($life);

        // Calculate
        if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life))) {
            if ($life < 0) {
                return Functions::NAN();
            }

            return ($cost - $salvage) / $life;
        }

        return Functions::VALUE();
    }
public static function SLN($cost, $salvage, $life)
    {
        $cost = Functions::flattenSingleValue($cost);
        $salvage = Functions::flattenSingleValue($salvage);
        $life = Functions::flattenSingleValue($life);

        // Calculate
        if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life))) {
            if ($life < 0) {
                return Functions::NAN();
            }

            return ($cost - $salvage) / $life;
        }

        return Functions::VALUE();
    }
public static function SLN ( $ cost , $ salvage , $ life ) { $ cost = Functions :: flattenSingleValue ( $ cost ) ; $ salvage = Functions :: flattenSingleValue ( $ salvage ) ; $ life = Functions :: flattenSingleValue ( $ life ) ; // Calculate if ( ( is_numeric ( $ cost ) ) && ( is_numeric ( $ salvage ) ) && ( is_numeric ( $ life ) ) ) { if ( $ life < 0 ) { return Functions :: NAN ( ) ; } return ( $ cost - $ salvage ) / $ life ; } return Functions :: VALUE ( ) ; }
SLN.

Returns the straight-line depreciation of an asset for one period

@param mixed $cost Initial cost of the asset
@param mixed $salvage Value at the end of the depreciation
@param mixed $life Number of periods over which the asset is depreciated

@return float
SLN .