* Compatible with PHP 5.4 and below.

This commit is contained in:
caoyanyi
2023-09-04 14:56:47 +08:00
parent 1ad3414286
commit ce99f6e465
+1 -1
View File
@@ -424,7 +424,7 @@ class helper extends baseHelper
public static function arrayColumn(array $input, int|string|null $columnKey, int|string|null $indexKey = null): array
{
/* If php version greater than 7, calling system functions returns. */
if(PHP_VERSION_ID >= 70000) return \array_column($input, $columnKey, $indexKey);
if(defined(PHP_VERSION_ID) && PHP_VERSION_ID >= 70000) return \array_column($input, $columnKey, $indexKey);
$output = array();
foreach($input as $row)