3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $object = new \stdClass(); $object->currentMissionId = $this->currentMissionId; $object->currentMissionInitTs = $this->currentMissionInitTs; $object->quests = [ (object) ['id' => 1, 'points' => 5, 'claimed' => false] ]; $object->currentSubmissions = [ (object) [ 'id' => 1, 'purchasedPoints' => 1, 'points' => 5, 'currentPoolSize' => 40, 'lastProgressAddedAt' => 143576344], (object) [ 'id' => 2, 'purchasedPoints' => 1, 'points' => 5, 'currentPoolSize' => 40, 'lastProgressAddedAt' => 143576344], (object) [ 'id' => 3, 'purchasedPoints' => 1, 'points' => 5, 'currentPoolSize' => 40, 'lastProgressAddedAt' => 143576344], ]; var_dump($object);
based on fQjeb
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Using $this when not in object context in /in/7EeJp:4 Stack trace: #0 {main} thrown in /in/7EeJp on line 4
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Fatal error: Using $this when not in object context in /in/7EeJp on line 4
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/7EeJp on line 8
Process exited with code 255.