I have the following code where I try to assign a value to a variable and then evaluate if it's empty:
if(!empty($user = User::find($id))){
// do some operations on the $user
}
But I'm getting an error... Does the PHP compiler allows this in any way?
PS. I'm using PHP 5.3