public static PhpArray array_keys(PhpArray array)
{
if (array == null)
{
//PhpException.ArgumentNull("array");
//return null;
throw new ArgumentNullException();
}
// no need to make a deep copy since keys are immutable objects (strings, ints):
var result = new PhpArray(array.Count);
var enumerator = array.GetFastEnumerator();
while (enumerator.MoveNext())
{
result.Add(PhpValue.Create(enumerator.CurrentKey));
}
return result;
}