How to group array by 'tax'and 'concept' and SUM attribute 'val'?

I looking for create a single object when tax and concept are the same, also SUM the val. 

I tried with simple foreach and validation inside, but doesnt work.

thanks.

```
echo json_encode($array);

```

**Array Print**

```
[
 {
    "tax": "10",
    "concept": "TUC",
    "val": "10"
 },
 {
    "tax": "10",
    "concept": "TUC",
    "val": "86"
 },
 {
    "tax": "15",
    "concept": "TUC",
    "val": "8"
 },
 {
    "tax": "11",
    "concept": "IPS",
    "val": "6"
 },
 {
    "tax": "11",
    "concept": "IPS",
    "val": "45"
 }  
]

```

**Expected Result**

```
[
 {
    "tax": "10",
    "concept": "TUC",
    "val": "96"
 },
 {
    "tax": "15",
    "concept": "TUC",
    "val": "8"
 },
 {
    "tax": "11",
    "concept": "IPS",
    "val": "51"
 }
]

```