SyntaxFix
Write A Post
Hire A Developer
Questions
That code is invalid as you can only pass variables into language constructs. empty() is a language construct.
empty()
You have to do this in two lines:
$result = array_intersect($people, $criminals); $result = !empty($result);