<?php
$a = ['a1', 'a2', 'a3'];
$b = ['b1', 'b2', 'b3', 'b4', 'b5'];
var_dump(array_filter(array_merge(...array_map(null, $a, $b))));
