public object PeekValue(int i) { object result; if (ArgCount >= i) { // peeks the value: result = PeekValueUnchecked(i); // stores the value back to the stack so that user args functions can work with it: Items[Top - i] = result; } else { result = null; // warning (can invoke user code => we have to save and restore callstate): CallState call_state = SaveCallState(); PhpException.MissingArgument(i, CalleeName); RestoreCallState(call_state); } return(result); }