运行 ❯
获取你
自己的 PHP
服务器
×
更改方向
更改主题,深色/浅色
转到 Spaces
<!DOCTYPE html> <html> <body> <?php function myfunction($a,$b) { if ($a===$b) { return 0; } return ($a>$b)?1:-1; } $a1=array("a"=>"red","b"=>"green","c"=>"blue"); $a2=array("a"=>"red","b"=>"green","d"=>"blue"); $a3=array("e"=>"yellow","a"=>"red","d"=>"blue"); $result=array_intersect_uassoc($a1,$a2,$a3,"myfunction"); print_r($result); ?> </body> </html>