<?php

include_once 'AV.php';
$obj = new leancloud\AVObject('GameScore');
$geo = new leancloud\AVGeoPoint(30.0, -20.0);
$obj->location = $geo->location;
$return = $obj->save();
$query = new leancloud\AVQuery('GameScore');
$query->whereNear('location', (new leancloud\AVGeoPoint(30.0, -20.0))->location);
$return = $query->find();
print_r($return);
<?php

include_once 'AV.php';
$obj = new leancloud\AVObject('GameScore');
$obj->score = 1000;
$obj->name = 'dennis zhuang';
$save = $obj->save();
print_r($save);
$updateObject = new leancloud\AVObject('GameScore');
$updateObject->score = 2000;
$return = $updateObject->update($save->objectId);
$deleteObject = new leancloud\AVObject('GameScore');
//取消注释来删除对象。
//$return = $deleteObject->delete($save->objectId);
<?php

include_once 'AV.php';
$file = new leancloud\AVFile('text/plain', 'Working at AVOS Cloud is Great');
$save = $file->save('hello.txt');
print_r($save);
$obj = new leancloud\AVObject('GameScore');
$obj->image = $obj->dataType('file', $save->objectId);
$obj->save();