public static bool sort(Context ctx, [In, Out]PhpArray array, ComparisonMethod comparisonMethod = ComparisonMethod.Regular) { if (array == null) { //PhpException.ReferenceNull("array"); //return false; throw new ArgumentNullException(); } array.Sort(GetComparer(ctx, comparisonMethod, SortingOrder.Ascending, false)); array.ReindexAll(); array.RestartIntrinsicEnumerator(); return true; }