function _array_intersect_first($array1, $array2)
    {
        foreach ($array1 as $value) {
            if (in_array($value, $array2)) {
                return $value;
            }
        }
        return false;
    }
function _array_intersect_first($array1, $array2)
    {
        foreach ($array1 as $value) {
            if (in_array($value, $array2)) {
                return $value;
            }
        }
        return false;
    }
function _array_intersect_first ( $ array1 , $ array2 ) { foreach ( $ array1 as $ value ) { if ( in_array ( $ value , $ array2 ) ) { return $ value ; } } return false ; }
Returns the first value of the intersection of two arrays or false if
the intersection is empty. The order is defined by the first parameter.

@param array $array1
@param array $array2
@return mixed False if intersection is empty, else intersected value.
@access private
Returns the first value of the intersection of two arrays or false if the intersection is empty . The order is defined by the first parameter .