[php-src] Issue #18773: `array_column()` should handle not-set column name
| From: | mvorisek | Date: | Thu, 05 Jun 2025 10:06:14 +0000 |
| Subject: | [php-src] Issue #18773: `array_column()` should handle not-set column name | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-250210@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/18773
Author: mvorisek
### Description
repro: https://3v4l.org/o3IRK
man: https://www.php.net/manual/en/function.array-column.php
It seems almost like a bug, but I would expect at least warning when
$column_key param
is not found in every row.
Currently any row without the $column_key present are skipped without any warning.
Alternatively I null can be assumed instead.
If the original behaviour is preferred, I would like to have $strict param added which
will require $column_key present in every row and $index_key too if set.