<p>If I've got an array of values that are basically zerofilled string representations of various numbers and another array of integers, will <code>array_intersect()</code> still match elements of different types?</p>

<p>For example, would this work:</p>

<pre><code>$arrayOne = array('0003', '0004', '0005');
$arrayTwo = array(4, 5, 6);

$intersect = array_intersect($arrayOne, $arrayTwo);

// $intersect would then be = "array(4, 5)"
</code></pre>

<p>And if not, what would be the most efficient way to accomplish this? Just loop through and compare, or loop through and convert everything to integers and run <code>array_intersect()</code> after?</p>

$ cat > test.php
```
```
<?php
$arrayOne = array('0003', '0004', '0005');
$arrayTwo = array(4, 5, 6);

$intersect = array_intersect($arrayOne, $arrayTwo);

print_r($intersect );

?>
```
```
$ php test.php
Array
(
)
$
So no, it will not.   But if you add
```
```
foreach($arrayOne as $key => $value)
{
   $arrayOne[$key] = intval($value);
}
```
```
you will get
$ php test.php
Array
(
    [1] => 4
    [2] => 5
)