I'm having problems when I've tried to create new ParseUsers from a logged user using ParseUser. I'm getting this error:
Fatal error: Uncaught exception 'Exception' with message 'Tried to save a batch with a cycle.' in /var/www/html/test/vendor/parse/php-sdk/src/Parse/ParseObject.php:1019
session_start();
ParseClient::setStorage( new ParseSessionStorage() );
$user=new ParseUser();
$user->set("username",$user);
$user->set("password",$password);
$user->set("email",$email);
try{
$user->signUp();
}catch(ParseException $exception){
print_r($exception);
}