Hi Kozlov,
This is known issue from PHP SDK as far as I understand. I cannot believe this hasn’t fixed yet.
See Cannot install SDK v2.1.0 on Mac OSX
$bucket->query($query, null, true)
should be a fix for your problem.
If CB team is not willing to fix this after 5 months+, I think this bug should be noted somewhere.