Skip to content

Commit

Permalink
Adding compatibility function for array_column. Closes photo#1552
Browse files Browse the repository at this point in the history
  • Loading branch information
jmathai committed Sep 25, 2014
1 parent 755903c commit 8a801c8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/libraries/compatability.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
<?php
// array_column is >= 5.5
if(!function_exists('array_column'))
{
function array_column($array, $column)
{
return array_map(function($element){ return $element[$column]; }, $array);
}
}

// parse_ini_string is >= 5.3
if(!function_exists('parse_ini_string')){
function parse_ini_string($str, $ProcessSections=false){
Expand Down Expand Up @@ -55,4 +64,4 @@ function get_mime_type($filename)
}

// password_verify and password_hash are >= 5.5
// provided in external/password_compat/password.php
// provided in external/password_compat/password.php

0 comments on commit 8a801c8

Please sign in to comment.