/// <summary> /// Randomizes the order of elements in the array using PhpMath random numbers generator. /// </summary> /// <exception cref="PhpException">Thrown if the <paramref name="array"/> argument is null.</exception> /// <remarks>Reindexes all keys in the resulting array.</remarks> /// <returns>True on success, False on failure.</returns> public static bool shuffle(PhpArray array) { if (array == null) { //PhpException.ArgumentNull("array"); //return false; throw new ArgumentNullException(); } array.Shuffle(PhpMath.Generator); array.ReindexAll(); return true; }