<?php $a1 = array();$a2 = array("strawberry", "apple"); $result = array_merge(array_diff($a1, $a2), array_diff($a2, $a1)); print_r($result); ?>
Standard input is empty
Array ( [0] => strawberry [1] => apple )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!