Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php
public static function IMLOG2($complexNumber)
    {
        $complexNumber = Functions::flattenSingleValue($complexNumber);

        $parsedComplex = self::parseComplex($complexNumber);

        if (($parsedComplex['real'] == 0.0) && ($parsedComplex['imaginary'] == 0.0)) {
            return Functions::NAN();
        } elseif (($parsedComplex['real'] > 0.0) && ($parsedComplex['imaginary'] == 0.0)) {
            return log($parsedComplex['real'], 2);
        }

        return self::IMPRODUCT(log(self::EULER, 2), self::IMLN($complexNumber));
    }
public static function IMLOG2($complexNumber)
    {
        $complexNumber = Functions::flattenSingleValue($complexNumber);

        $parsedComplex = self::parseComplex($complexNumber);

        if (($parsedComplex['real'] == 0.0) && ($parsedComplex['imaginary'] == 0.0)) {
            return Functions::NAN();
        } elseif (($parsedComplex['real'] > 0.0) && ($parsedComplex['imaginary'] == 0.0)) {
            return log($parsedComplex['real'], 2);
        }

        return self::IMPRODUCT(log(self::EULER, 2), self::IMLN($complexNumber));
    }
IMLOG2.

Returns the base-2 logarithm of a complex number in x + yi or x + yj text format.

Excel Function:
IMLOG2(complexNumber)

@param string $complexNumber the complex number for which you want the base-2 logarithm

@return string