Extend select to accept proc type `choices` argument
 @see ActionView::Helpers::FormBuilder#select
436345
def select(method, choices = nil, options = {}, html_options = {}, &block)
      choices = instance_exec(&choices) if choices.is_a?(Proc)
      super
    end
65724
static function renderSelect( $args ) {
		$defaults = [
			'id' => null,
			'name' => null,
			'option' => null,
			'value' => '',
			'choices' => [],
			'multiple' => false,
			'disabled' => false,
			'description' => null,
		];

		$args = wp_parse_args( $args, $defaults );

		$options = '';
		foreach ( $args['choices'] as $key => $label ) {
			$options .= sprintf(
				'<option value="%s" %s>%s</option>',
				$key,
				selected( $key, $args['value'], false ),
				$label
			);
		}
		printf(
			'<select name="%s[%s]" id="%s" %s%s>%s</select>',
			$args['name'],
			$args['option'],
			$args['id'],
			( $args['multiple'] ) ? ' multiple' : '',
			( ! empty( $args['disabled'] ) ) ? ' disabled' : '',
			$options
		);
		if ( isset( $args['description'] ) ) {
			printf(
				'<p class="description">%s</p>',
				$args['description']
			);
		}
	}
1142450
public ElementActionBuilder select(String ... options) {
        DropDownSelectAction action = new DropDownSelectAction();
        action.setOptions(Arrays.asList(options));
        action(action);
        return new ElementActionBuilder(action);
    }
817044
static function renderCustomSelect( $args ) {
		$defaults = [
			'id' => null,
			'name' => null,
			'value' => '',
			'choices' => [],
			'multiple' => false,
			'disabled' => false,
		];

		$args = wp_parse_args( $args, $defaults );

		$is_custom = false;
		if ( ! array_key_exists( $args['value'], $args['choices'] ) ) {
			$is_custom = true;
		}
		$options = '';
		foreach ( $args['choices'] as $key => $label ) {
			$options .= sprintf(
				'<option value="%s" %s>%s</option>',
				$key,
				( empty( $key ) && $is_custom ) ? ' selected' : selected( $key, $args['value'], false ),
				$label
			);
		}
		printf(
			'<select name="%s" id="%s" %s%s>%s</select><br />',
			$args['name'],
			$args['id'],
			( $args['multiple'] ) ? ' multiple' : '',
			( ! empty( $args['disabled'] ) ) ? ' disabled' : '',
			$options
		);
	}
469339
protected function renderSelect()
    {
        $options = $this->getOptions();

        $selectedExtensionStyle = '';

        $renderedOptionTags = [];
        foreach ($options as $option) {
            if (isset($option['selected']) && $option['selected'] === 'selected') {
                $selectedExtensionStyle = $option['style'];
            }
            if ($option['value'] === \Tx_Phpunit_Testable::ALL_EXTENSIONS) {
                $optionValue = $this->translate('all_extensions');
            } else {
                $optionValue = $option['value'];
            }
            $renderedOptionTags[] = $this->renderTag('option', $option, $optionValue);
        }

        return $this->renderTag(
            'select',
            [
                'name' => \Tx_Phpunit_Interface_Request::PARAMETER_NAMESPACE .
                    '[' . \Tx_Phpunit_Interface_Request::PARAMETER_KEY_TESTABLE . ']',
                'onchange' => 'document.location = \'' . $this->action . '&' .
                    \Tx_Phpunit_Interface_Request::PARAMETER_NAMESPACE .
                    '[' . \Tx_Phpunit_Interface_Request::PARAMETER_KEY_TESTABLE . ']=' .
                    '\'+this.options[this.selectedIndex].value;',
                'style' => $selectedExtensionStyle,
            ],
            implode(LF, $renderedOptionTags)
        );
    }
328699
public function getFirstSelectedOption()
	{
		foreach ( $this->getOptions() as $option ) {
			if ( $option->isSelected() ) {
				return $option;
			}
		}

		throw new SelectException('No options are selected', SelectException::TYPE_NOT_SELECTED);
	}
258732
function select (args) {
    if (this.typecheck) t.typecheck('select', [args]);
    if ('string'===typeof args) args = [args];
    return 'select '+args.join();
}
675147
def invoke_select(object, question, *args, &block)
      options = Utils.extract_options!(args)
      choices = if block
                  []
                elsif args.empty?
                  possible = options.dup
                  options = {}
                  possible
                elsif args.size == 1 && args[0].is_a?(Hash)
                  Utils.extract_options!(args)
                else
                  args.flatten
                end

      list = object.new(self, options)
      list.(question, choices, &block)
    end
1264073
public ElementActionBuilder select(String option) {
        DropDownSelectAction action = new DropDownSelectAction();
        action.setOption(option);
        action(action);
        return new ElementActionBuilder(action);
    }
842094
public static function select($params = array()) {

        if( !is_array($params) )
        {
            throw new \InvalidArgumentException("Arguments is not a Array". print_r($params, true));
        }

        $o = "<select";
        $o .= (isset($params['id'])) ? " id='{$params['id']}'" : '';
        $o .= (isset($params['name'])) ? " name='{$params['name']}'" : '';
        $o .= (isset($params['class'])) ? " class='{$params['class']}'" : '';
        $o .= (isset($params['onclick'])) ? " onclick='{$params['onclick']}'" : '';
        $o .= (isset($params['width'])) ? " style='width:{$params['width']}px;'" : '';
        $o .= (isset($params['required'])) ? " required='required'" : '';
        $o .= (isset($params['disabled'])) ? " disabled='{$params['disabled']}'" : '';
        $o .= (isset($params['style'])) ? " style='{$params['style']}'" : '';
        $o .= ">\n";
        $o .= "<option value=''>Select</option>\n";
        if (isset($params['data']) && is_array($params['data'])) {
            foreach ($params['data'] as $k => $v) {
                if (isset($params['value']) && $params['value'] == $k) {
                    $o .= "<option value='{$k}' selected='selected'>{$v}</option>\n";
                } else {
                    $o .= "<option value='{$k}'>{$v}</option>\n";
                }
            }
            throw new \InvalidArgumentException("Arguments is not valid ". print_r($params, true));

        }
        $o .= "</select>\n";
        return $o;
    }
1132457
public function addSelect($select)
    {
        if (null === $select) {
            return $this;
        }
        if (is_array($select)) {
            $t = [];
            foreach ($select as $field => $alias) {
                if (is_int($field)) {
                    $alias = $this->quoteColumnName($alias);
                    array_push($t, "{$alias}");
                } else {
                    $field = $this->quoteColumnName($field);
                    $alias = $this->quoteColumnName($alias);
                    array_push($t, "{$field} AS {$alias}");
                }
            }
            $select = implode(',', $t);
        }
        if (isset($this->query['select']) && !empty($this->query['select'])) {
            $select = "{$this->query['select']},{$select}";
        }
        $this->query['select'] = $select;
        return $this;
    }
1222586
public function select($options = [])
    {
        $sql = str_replace(
            ['%TABLE%', '%DISTINCT%', '%FIELD%', '%JOIN%', '%WHERE%', '%GROUP%', '%HAVING%', '%ORDER%', '%LIMIT%', '%UNION%', '%LOCK%', '%COMMENT%', '%FORCE%'],
            [
                $this->parseTable($options['table'], $options),
                $this->parseDistinct($options['distinct']),
                $this->parseField($options['field'], $options),
                $this->parseJoin($options['join'], $options),
                $this->parseWhere($options['where'], $options),
                $this->parseGroup($options['group']),
                $this->parseHaving($options['having']),
                $this->parseOrder($options['order'], $options),
                $this->parseLimit($options['limit']),
                $this->parseUnion($options['union']),
                $this->parseLock($options['lock']),
                $this->parseComment($options['comment']),
                $this->parseForce($options['force']),
            ], $this->selectSql);
        return $sql;
    }
457276
public SelectionBuilder where(String selection, String... selectionArgs) {
        if (TextUtils.isEmpty(selection)) {
            if (selectionArgs != null && selectionArgs.length > 0) {
                throw new IllegalArgumentException(
                        "Valid selection required when including arguments=");
            }

            // Shortcut when clause is empty
            return this;
        }

        if (mSelection.length() > 0) {
            mSelection.append(" AND ");
        }

        mSelection.append("(").append(selection).append(")");
        if (selectionArgs != null) {
            Collections.addAll(mSelectionArgs, selectionArgs);
        }

        return this;
    }
937817
public function choice(FormView $choice)
    {
        $that = $this;
        if ($choice->vars['compound']) {
            usort($choice->children, function (FormView $a, FormView $b) use ($that) {
                return $that->compare($a->vars['label'] ?: $a->vars['value'], $b->vars['label'] ?: $b->vars['value']);
            });
        } else {
            usort($choice->vars['choices'], function (ChoiceView $a, ChoiceView $b) use ($that) {
                return $that->compare($a->label ?: $a->value, $b->label ?: $b->value);
            });
        }
    }
361358
public function modifySelect(Zend_Db_Select &$select) {
        foreach ($this->_config as $i => $condition) {
            $select->where($condition, $this->_values[$i]);
        }
    }
1055438
public function selectRange($name, $begin, $end, $selected = null, $options = [])
    {
        $this->addErrorClass($name, $options);
        $tags['input'] = parent::selectRange($name, $begin, $end, $selected, $options);
        $tags['error'] = $this->getErrorTag($name);
        return $this->buildTags($tags);
    }
520524
protected function buildSelect()
    {
        if (!empty($this->props['attribs']['multiple']) && \substr($this->props['attribs']['name'], -2) !== '[]') {
            $this->props['attribs']['name'] .= '[]';
        }
        if ($this->props['attribs']['required'] && !$this->props['attribs']['multiple'] && $this->props['options']) {
            /*
                Check for an empty-value "Select" option
                If no empty option, add one
            */
            $firstValue = $this->props['options'][0]['attribs']['value'];
            $emptyValues = array('','--','select');
            if (!\in_array(\strtolower($firstValue), $emptyValues)) {
                $selectOption = array(
                    'attribs' => array(
                        'value' => '',
                        'disabled' => true,
                        'selected' => empty($this->props['values']),
                    ),
                    'label' => 'Select',
                );
                \array_unshift($this->props['options'], $selectOption);
            }
        }
        // build select input
        $this->props['attribs']['type'] = null;
        $attribStrings = $this->buildAttribStrings($this->props);
        $props = \array_merge($this->props, $attribStrings);
        if (empty($props['input'])) {
            $this->props['input'] = Html::buildTag(
                $props['tagname'],
                $props['attribs'],
                "\n".$this->buildSelectOptions($this->props['options'], $this->props['values'])
            );
            $props['input'] = $this->buildInputGroup();
        }
        return $this->props['tagOnly']
            ? $props['input']
            : Str::quickTemp($props['template'], $props);
    }