Question: For example, I want a function that returns me true for the following two inputs:

```
array('4','5','2') 
array('4','5','2')

```

Answer: 
You have a couple of options depending on what you want:

just use a straight `if`

```
 if($array === $array2)

```

or you can use [array\_diff](http://php.net/manual/en/function.array-diff.php) which will give you an output array of any differences.

```
 $diff = array_diff($array, $array2)

```
If the 2 arrays are "identical", meaning that types are the same, than you can use the triple = comparison. If types are not identical, you could use the double = comparison.

```
$array1 = array('4', '5', '2');
$array2 = array('4', '5', '2');

var_dump($array1 == $array2); // true;
var_dump($array1 === $array2); // true;

```

VS

```
$array1 = array('4', '5', '2');
$array2 = array(4, 5, 2);

var_dump($array1 == $array2); // true;
var_dump($array1 === $array2); // false;

```