// From PHP 7.4, you can use the spread syntax to merge arrays in PHP like JavaScript
$firstArray = ['a' => 'life', 'b' => 'ball'];
$secondArray = ['c' => 'History'];
$thirdArray = [...$firstArray, ...$secondArray];
// you can still use the array_merge function
$thirdArray = array_merge($firstArray, $secondArray);