Supported Versions: PHP 5 >= 5.1.0, PHP 7, PHP 8
Computes the difference of arrays using keys for comparison
<?php array_diff_key(array $array, array ...$arrays): array
<?php {
$properties = is_array($properties) ? $properties : func_get_args();
return array_diff_key($this->all(), array_flip($properties));
}
public function all()
<?php {
$properties = is_array($properties) ? $properties : func_get_args();
return array_diff_key($this->all(), array_flip($properties));
}
public function hasProperty($prop)
<?php $container = app('livewire')->new('__mountParamsContainer');
$container->forMount = array_diff_key($params, array_flip(['lazy']));
$snapshot = app('livewire')->snapshot($container);
<?php public function diffKeys($items)
{
return new static(array_diff_key($this->items, $this->getArrayableItems($items)));
}
<?php {
$options = $config['options'] ?? [];
return array_diff_key($this->options, $options) + $options;
}
<?php public function without($relations)
{
$this->eagerLoad = array_diff_key($this->eagerLoad, array_flip(
is_string($relations) ? func_get_args() : $relations
));
return $this;
}
<?php }
if (count($this->getHidden()) > 0) {
$values = array_diff_key($values, array_flip($this->getHidden()));
}
return $values;
<?php $attach = array_diff_key($records, array_flip($detach));
if (count($attach) > 0) {
$this->attach($attach, [], false);
<?php return true;
}
return empty(array_diff_key($value, array_fill_keys($parameters, '')));
}
<?php $this->passes();
}
return array_diff_key(
$this->data, $this->attributesThatHaveMessages()
);
}
<?php $foreignKeys = [];
$remainingForeignKeys = array_diff_key(
$diff->fromTable->getForeignKeys(),
$diff->removedForeignKeys
);
foreach ($remainingForeignKeys as $foreignKey) {
foreach ($diff->renamedIndexes as $index) {
<?php protected function getVersionArray(array $itemArray)
{
return \array_diff_key($itemArray, \array_flip($this->getNonVersionArrayKeys()));
}
<?php }
}
$progress = array_diff_key(curl_getinfo($curlHandle), self::$timeInfo);
$this->jobs[(int) $curlHandle] = array(
'url' => $url,
<?php continue;
}
$curlHandle = $this->jobs[$i]['curlHandle'];
$progress = array_diff_key(curl_getinfo($curlHandle), self::$timeInfo);
if ($this->jobs[$i]['progress'] !== $progress) {
$this->jobs[$i]['progress'] = $progress;
<?php {
$default = ['url' => '', 'options' => null, 'status' => 200, 'body' => '', 'headers' => ['']];
$this->expectations = array_map(function (array $expect) use ($default): array {
if (count($diff = array_diff_key(array_merge($default, $expect), $default)) > 0) {
throw new \UnexpectedValueException('Unexpected keys in process execution step: '.implode(', ', array_keys($diff)));
}