You are currently reading the 1.2 documentation. Switch to 2.0 

To Array

The toArray() method returns an array representation of your records or collections. It also accesses the relationships the objects may have. If you need to print a record for debugging purposes you can get an array representation of the object and print that.

// test.php

// ...
print_r($user->toArray());

If you do not want to include the relationships in the array then you need to pass the $deep argument with a value of false:

// test.php

// ...
print_r($user->toArray(false));

Questions and Feedback

If you find a problem with the documentation or have a suggestion, please register and open a ticket.

If you need support or have a technical question, you can post to the user mailing-list.