// of this script
array_shift($args);
- while (list($k, $arg) = each($args)) {
+ foreach ($args as $k => $arg) {
// sanitize all user input
$arg = $this->_sanitize($arg);
* @return bool
*/
private function _validateOptions() {
- $required = $this->_required_arguments;
- while (list(, $var) = each($required)) {
+ foreach ($this->_required_arguments as $var) {
$index = '_' . $var;
if (empty($this->$index)) {
$missing_arg = '--' . $var;