Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Push one or more elements onto the end of array
<?php array_push(array &$array, mixed ...$values): int
<?php foreach ($this->haystack as $item) {
$record = (array) $item;
$record['_category'] = 'data';
array_push($output, $record);
}
<?php foreach ($records as $item) {
$record = (array) $item;
$record['_category'] = $category;
array_push($output, $record);
}
}
}
<?php unset($record['pruned']);
array_push($output, $record);
}
}
<?php }
if (is_null($this->limit) || ($this->limit && count($categorized_output[$item['category']]) < $this->limit)) {
array_push($categorized_output[$item['category']], $item);
}
}
<?php throw new Exception('');
}
array_push($new_data, $item);
} catch (Exception $e) {
continue;
}
<?php }
}
array_push($output, [
'data' => $item,
'pruned' => $local_item,
'score' => 0,
'category' => $category,
]);
}
return $output;
<?php if ($this->include_full_query) {
array_push($parts['chunks'], $query);
}
<?php foreach ($words as $word) {
if (strpos($word, '-') === 0 && strlen($word) >= $this->min_word_characters + 1) {
array_push($parts['disallowed'], substr($word, 1));
} elseif (strpos($word, '+') === 0 && strlen($word) >= $this->min_word_characters + 1) {
array_push($parts['required'], substr($word, 1));
} elseif (strlen($word) >= $this->min_word_characters) {
<?php if (strpos($word, '-') === 0 && strlen($word) >= $this->min_word_characters + 1) {
array_push($parts['disallowed'], substr($word, 1));
} elseif (strpos($word, '+') === 0 && strlen($word) >= $this->min_word_characters + 1) {
array_push($parts['required'], substr($word, 1));
} elseif (strlen($word) >= $this->min_word_characters) {
array_push($parts['chunks'], $word);
}
<?php } elseif (strpos($word, '+') === 0 && strlen($word) >= $this->min_word_characters + 1) {
array_push($parts['required'], substr($word, 1));
} elseif (strlen($word) >= $this->min_word_characters) {
array_push($parts['chunks'], $word);
}
}
<?php if ($this->include_full_query) {
array_push($parts['chunks'], $query);
}
<?php $output = str_singular($words);
} else {
foreach ($words as $word) {
array_push($output, str_singular($word));
}
}
<?php foreach ($words as $word) {
if (strtolower($word) == 'and') {
array_push($output, '&');
continue;
}
<?php }
if ($word == '&') {
array_push($output, 'and');
continue;
}
<?php }
if (strpos($word, "'") !== false) {
array_push($output, preg_replace("/'/", '‘', $word));
array_push($output, preg_replace("/'/", '’', $word));
continue;
}