<?php
$a = [1,2,3,4,5];
$b = [1,3,5,6,7,5,3];
$iguais = [];
$diferentes = [];
foreach($a as $item){
if($i !== false){
$iguais[] = '('. $item .', '. $b[$i] .')';
}else{
$diferentes[] = $item;
}
}
$diferentes += $b;
echo "<pre>";
echo "<pre>";
PD9waHAKJGEgPSBbMSwyLDMsNCw1XTsKJGIgPSBbMSwzLDUsNiw3LDUsM107CgokaWd1YWlzID0gW107CiRkaWZlcmVudGVzID0gW107CmZvcmVhY2goJGEgYXMgJGl0ZW0pewogICAgJGkgPSBhcnJheV9zZWFyY2goJGl0ZW0sICRiKTsKICAgIGlmKCRpICE9PSBmYWxzZSl7CiAgICAgICAgJGlndWFpc1tdID0gJygnLiAkaXRlbSAuJywgJy4gJGJbJGldIC4nKSc7CiAgICAgICAgdW5zZXQoJGJbJGldKTsKICAgIH1lbHNlewogICAgICAgICRkaWZlcmVudGVzW10gPSAkaXRlbTsKICAgIH0KfQoKJGRpZmVyZW50ZXMgKz0gJGI7CgplY2hvICI8cHJlPiI7CnByaW50X3IoJGlndWFpcyk7CgplY2hvICI8cHJlPiI7CnByaW50X3IoJGRpZmVyZW50ZXMpOw==