Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Applies the callback to the elements of the given arrays
<?php array_map(?callable $callback, array $array, array ...$arrays): array
<?php public function fetchAllNumeric(): array
{
return array_map('array_values', $this->fetchAllAssociative());
}
<?php $fields = $meta->fetch_fields();
assert(is_array($fields));
$this->columnNames = array_map(static function (stdClass $field): string {
return $field->name;
}, $fields);
$meta->free();
<?php public function quoteIdentifier($str)
{
if (strpos($str, '.') !== false) {
$parts = array_map([$this, 'quoteSingleIdentifier'], explode('.', $str));
return implode('.', $parts);
}
<?php throw new InvalidArgumentException("Incomplete definition. 'columns' required.");
}
$constraintFlags = array_merge(['UNIQUE'], array_map('strtoupper', $constraint->getFlags()));
$constraintName = $name->getQuotedName($this);
$columnListNames = $this->getColumnsFieldDeclarationListSQL($columns);
<?php protected function initializeKeywords()
{
$this->keywords = array_flip(array_map('strtoupper', $this->getKeywords()));
}
<?php private function createMapper(callable $function): callable
{
return static function (array $array) use ($function): array {
return array_map($function, $array);
};
}
<?php protected function _generateIdentifierName($columnNames, $prefix = '', $maxSize = 30)
{
$hash = implode('', array_map(static function ($column): string {
return dechex(crc32($column));
}, $columnNames));
return strtoupper(substr($prefix . '_' . $hash, 0, $maxSize));
}
<?php );
}
$names = array_map('strtolower', (array) $names);
return count($names) === count(array_intersect($names, array_map('strtolower', $this->listTableNames())));
}
<?php $names = array_map('strtolower', (array) $names);
return count($names) === count(array_intersect($names, array_map('strtolower', $this->listTableNames())));
}
<?php public function diffForeignKey(ForeignKeyConstraint $key1, ForeignKeyConstraint $key2)
{
if (
array_map('strtolower', $key1->getUnquotedLocalColumns())
!== array_map('strtolower', $key2->getUnquotedLocalColumns())
) {
return true;
<?php {
if (
array_map('strtolower', $key1->getUnquotedLocalColumns())
!== array_map('strtolower', $key2->getUnquotedLocalColumns())
) {
return true;
}
<?php }
if (
array_map('strtolower', $key1->getUnquotedForeignColumns())
!== array_map('strtolower', $key2->getUnquotedForeignColumns())
) {
return true;
<?php if (
array_map('strtolower', $key1->getUnquotedForeignColumns())
!== array_map('strtolower', $key2->getUnquotedForeignColumns())
) {
return true;
}
<?php public function getUnquotedLocalColumns()
{
return array_map([$this, 'trimQuotes'], $this->getLocalColumns());
}
<?php public function getUnquotedForeignColumns()
{
return array_map([$this, 'trimQuotes'], $this->getForeignColumns());
}