I developed this piece of PHP code:
$cursor = $collection->find
(
{
username:
{
$in: ['admin', 'test']
}
}
);
but this message was displayed:
Parse error: syntax error, unexpected '{'
I am using:
targetMinOS: Windows 10 (64 bits)
db version v3.6.4
According to the MONGODB documentation, this code is right.
What's wrong?
UPDATE: This question was marked as duplicate but the referenced link doesn't mention this question which is specific of my code.
UPDATE #2 : This question was solved thanks to Neil Lunn and Deceze comments. I was wrong why I took a look to the MongoDB Shell documentation. My fault.