How to convert mongoDB shell query to php
<p>How to Convert mongoDB Query to php</p>

<pre><code>db.getCollection('xyz').aggregate({ $match: { 
$and: [ 
{ created_at: { $gt:new ISODate("2016-07-05"), $lt:new ISODate("2016-09-05") }, id: "1" } 
] 
} }, 
{ $group: { _id : "distance", sum : { $sum: "$distance" } } });
</code></pre>