<?php array_map(?callable $callback, array $array, array ...$arrays): array
<?php { if (isset($this->options['clsLineNumber']) && $this->options['clsLineNumber'] === true) { return array_map(function ($cls) use (&$lineNumber) { $cls->setId($lineNumber++); return $cls; }, array_values($classifications)); } return array_values($classifications);
<?php $classifications = array_merge($incomeClassification, $expensesClassification); $classificationSum = array_sum(array_map(fn($item) => $item->getAmount(), $classifications)); $diff = round($row->getNetValue() - $classificationSum, 2); if ($diff != 0) {
<?php public static function labels(): array { return array_map(fn(self $case) => [$case->value => $case->label()], self::cases()); } }
<?php $dom->loadXML($xml); $dom->schemaValidate(__DIR__.'/../../xsd/InvoicesDoc-v1.0.10.xsd'); return array_map(function ($error) { preg_match("/Element '(.+?)':( \[.*?])? (.+)/", $error->message, $matches); return [ 'field' => $matches[1] ?? null, 'message' => $matches[3] ?? null, ]; }, libxml_get_errors()); } }
<?php $this->$set( is_array($value) && isset($value[0]) ? array_map(fn($v) => is_object($v) ? $v : new $cast($v), $value) : new $cast($value) ); }
<?php if ($value instanceof Type) { $array[$key] = $value->toArray(); } elseif (is_array($value)) { $array[$key] = array_map(fn($v) => $v instanceof Type ? $v->toArray() : $v, $value); } elseif ($this->isEnum($key) && is_object($value)) { $array[$key] = $value->value; } else {