Someone wrote this 'stunning' short hand encapsulated statement. I am sure its not even suppose to be done like this, but I want to dissect it for someone else (myself as well) to be able to understand it well by break it down into if and else statement. I wonder where exactly is the way it should be broke down the statement with. the ? and : position really confused me and make me can get down to nowhere! (i.e. there is ? after another ? how that could be?
$cust->is_company() ? 'TekCustomer__'.($cust->getID() ? $cust->getID() : 'new'.($next_new_id-1)) : 'Person__'.($cust->people[0]->getID() ? $cust->people[0]->getID() : 'new'.$next_new_id++)