What are some potential pitfalls of using array_column in PHP?

One potential pitfall of using array_column in PHP is that it will throw a warning if the array is empty. To avoid this warning, you can check if the array is empty before using array_column.

// Check if the array is empty before using array_column
if (!empty($array)) {
    $column = array_column($array, 'column_key');
} else {
    $column = [];
}