PHP class constructor to return mysql row as object
===

Could someone please provide an example of how to achieve this? I am hoping to use it something like this:

    $user = new User($id = '5');
    echo "hi {$user->firstName}\n";

The object should contain all fields in the row, which may be subject to change.

Thanks in advance!