Ciao,
puoi anche usare un truccheto con il type casting

$tuoOggetto = (array)$tuoOggetto ;