00b5c6f3d4
Signed-off-by: Aaron Brock <TheMineBench@gmail.com>
23 lines
363 B
PHP
23 lines
363 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: TheMineBench
|
|
* Date: 7/1/2015
|
|
* Time: 1:25 PM
|
|
*/
|
|
|
|
|
|
function myfunction($a,$b)
|
|
{
|
|
if ($a===$b)
|
|
{
|
|
return 0;
|
|
}
|
|
return ($a>$b)?1:-1;
|
|
}
|
|
|
|
$a1=array(new stdClass(),"b"=>"green","c"=>"blue");
|
|
$a2=array("a"=>"blue","b"=>"black","e"=>"blue");
|
|
|
|
$result=array_udiff($a1,$a2,"myfunction");
|
|
print_r($result); |