Pchp.Library.Arrays.natsort C# (CSharp) Method

natsort() public static method

Sorts an array using case sensitive natural comparison method for comparing values preserving key-value association.
Resets array's intrinsic enumerator.
public static natsort ( Context ctx, [ array ) : bool
ctx Pchp.Core.Context Current runtime context.
array [ The array to be sorted.
return bool
        public static bool natsort(Context ctx, [In, Out] PhpArray array)
        {
            if (array == null)
            {
                //PhpException.ReferenceNull("array");
                //return false;
                throw new ArgumentNullException();
            }

            array.Sort(new ValueComparer(new PhpNaturalComparer(ctx, false), false));

            return true;
        }