public static function doAssignment(&$left, $operator, $right)
    {
        if (self::$assignments === null) {
            self::$assignments = [
                    self::EQUAL           => function (&$l, $r) { return $l = $r; },
                    self::CONCATENATE     => function (&$l, $r) { return $l .= $r; },
                    self::BITWISE_AND     => function (&$l, $r) { return $l &= $r; },
                    self::BITWISE_OR      => function (&$l, $r) { return $l |= $r; },
                    self::BITWISE_XOR     => function (&$l, $r) { return $l ^= $r; },
                    self::SHIFT_LEFT      => function (&$l, $r) { return $l <<= $r; },
                    self::SHIFT_RIGHT     => function (&$l, $r) { return $l >>= $r; },
                    self::ADDITION        => function (&$l, $r) { return $l += $r; },
                    self::SUBTRACTION     => function (&$l, $r) { return $l -= $r; },
                    self::MULTIPLICATION  => function (&$l, $r) { return $l *= $r; },
                    self::DIVISION        => function (&$l, $r) { return $l /= $r; },
                    self::MODULUS         => function (&$l, $r) { return $l %= $r; },
                    //Compatible with < PHP 5.6
                    self::POWER           => function (&$l, $r) { return $l = pow($l, $r); },
            ];
        }

        if (!isset(self::$assignments[$operator])) {
            throw new PinqException('Assignment operator \'%s\' is not supported', $operator);
        }

        $assignment = self::$assignments[$operator];

        return $assignment($left, $right);
    }