@@ 34-41 (lines=8) @@ | ||
31 | * @category Array Functions |
|
32 | */ |
|
33 | function array_column_php(array $array, $columnKey = null, $indexKey = null) { |
|
34 | if (!is_int($columnKey) |
|
35 | && !is_float($columnKey) |
|
36 | && !is_string($columnKey) |
|
37 | && $columnKey !== null |
|
38 | && !(is_object($columnKey) && method_exists($columnKey, '__toString')) |
|
39 | ) { |
|
40 | trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING); |
|
41 | } |
|
42 | ||
43 | if (isset($indexKey) |
|
44 | && !is_int($indexKey) |
|
@@ 43-50 (lines=8) @@ | ||
40 | trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING); |
|
41 | } |
|
42 | ||
43 | if (isset($indexKey) |
|
44 | && !is_int($indexKey) |
|
45 | && !is_float($indexKey) |
|
46 | && !is_string($indexKey) |
|
47 | && !(is_object($indexKey) && method_exists($indexKey, '__toString')) |
|
48 | ) { |
|
49 | trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING); |
|
50 | } |
|
51 | ||
52 | $paramsColumnKey = ($columnKey !== null) ? (string)$columnKey : null; |
|
53 |