private static function fromHStore($string)
    {
        $result = [];
        if (empty($string)) {
            return $result;
        }

        preg_match_all(
            '#"((?:\\\"|[^"])*)"=>"((?:\\\"|[^"])*)"#U',
            $string,
            $matches
        );
        foreach ($matches[1] as $id => $val) {
            $result[stripcslashes($val)] = stripcslashes($matches[2][$id]);
        }

        return $result;
    }
private static function fromHStore($string)
    {
        $result = [];
        if (empty($string)) {
            return $result;
        }

        preg_match_all(
            '#"((?:\\\"|[^"])*)"=>"((?:\\\"|[^"])*)"#U',
            $string,
            $matches
        );
        foreach ($matches[1] as $id => $val) {
            $result[stripcslashes($val)] = stripcslashes($matches[2][$id]);
        }

        return $result;
    }
private static function fromHStore ( $ string ) { $ result = [ ] ; if ( empty ( $ string ) ) { return $ result ; } preg_match_all ( '#"((?:\\\"|[^"])*)"=>"((?:\\\"|[^"])*)"#U' , $ string , $ matches ) ; foreach ( $ matches [ 1 ] as $ id => $ val ) { $ result [ stripcslashes ( $ val ) ] = stripcslashes ( $ matches [ 2 ] [ $ id ] ) ; } return $ result ; }
Convert hstore to php array

@param $string

@return array
Convert hstore to php array