@ 2017-07-13T14:14:41Z <?php
var_dump(array (
0 =>
array (
'$match' =>
array (
'user' =>
MongoId::__set_state(array(
'objectID' =>
MongoDB\BSON\ObjectID::__set_state(array(
'oid' => '5943a756fe986c4e74367267',
)),
)),
'created_on' =>
array (
'$gte' =>
MongoDate::__set_state(array(
'sec' => 1483228800,
'usec' => 0,
)),
),
'type' =>
array (
'$in' =>
array (
0 => 'session_completed',
1 => 'session_skipped',
2 => 'session_progress_updated',
3 => 'session_started',
),
),
),
),
1 =>
array (
'$group' =>
array (
'_id' =>
array (
'year' =>
array (
'$year' => '$created_on',
),
'month' =>
array (
'$month' => '$created_on',
),
'day' =>
array (
'$dayOfMonth' => '$created_on',
),
),
'types' =>
array (
'$addToSet' => '$type',
),
),
),
2 =>
array (
'$project' =>
array (
'type' =>
array (
'$switch' =>
array (
'branches' =>
array (
0 =>
array (
'case' =>
array (
'$in' =>
array (
0 => 'session_completed',
1 => '$types',
),
),
'then' => 'session_completed',
),
1 =>
array (
'case' =>
array (
'$in' =>
array (
0 => 'session_skipped',
1 => '$types',
),
),
'then' => 'session_skipped',
),
2 =>
array (
'case' =>
array (
'$in' =>
array (
0 => 'session_progress_updated',
1 => '$types',
),
),
'then' => 'session_progress_updated',
),
3 =>
array (
'case' =>
array (
'$in' =>
array (
0 => 'session_started',
1 => '$types',
),
),
'then' => 'session_started',
),
),
'default' => NULL,
),
),
),
),
));
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.7 Fatal error: Uncaught Error: Class "MongoId" not found in /in/0DHaO:9
Stack trace:
#0 {main}
thrown in /in/0DHaO on line 9
Process exited with code 255 . Output for 7.0.0 - 7.0.20 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 Fatal error: Uncaught Error: Class 'MongoId' not found in /in/0DHaO:9
Stack trace:
#0 {main}
thrown in /in/0DHaO on line 9
Process exited with code 255 . preferences:dark mode live preview
154.74 ms | 403 KiB | 204 Q