public function diff(AbstractCollection $collection)
    {
        if (get_class($this) === get_class($collection)) {
            $newData = array_diff($this->dataPlaceHolder, $collection->getDataPlaceHolder());

            return new static($newData);
        } else {
            $msg = "Difference may apply only on two collections of the same type.";
            throw new InvalidArgumentException($msg);
        }
    }
public function diff(AbstractCollection $collection)
    {
        if (get_class($this) === get_class($collection)) {
            $newData = array_diff($this->dataPlaceHolder, $collection->getDataPlaceHolder());

            return new static($newData);
        } else {
            $msg = "Difference may apply only on two collections of the same type.";
            throw new InvalidArgumentException($msg);
        }
    }
public function diff ( AbstractCollection $ collection ) { if ( get_class ( $ this ) === get_class ( $ collection ) ) { $ newData = array_diff ( $ this -> dataPlaceHolder , $ collection -> getDataPlaceHolder ( ) ) ; return new static ( $ newData ) ; } else { $ msg = "Difference may apply only on two collections of the same type." ; throw new InvalidArgumentException ( $ msg ) ; } }
Get the difference between this collection and another one.

@param \qtism\common\collections\AbstractCollection $collection
@return \qtism\common\collections\AbstractCollection
Get the difference between this collection and another one .