'total_cost' => is_numeric($row['new_cost']) && $row['new_cost'] > 0 ? $row['new_cost'] : $row['total_cost'],
'total_cost' => $row['new_cost'] ?: $row['total_cost'],
class Dream
{
private $mydream;
private $findDream;
private static $self = null;
public static function _self()
{
if(is_null(self::$self)) {
self::$self = new self;
}
return self::$self;
}
public static function whichDream()
{
return self::_self()->findDream();
}
public function findDream()
{
echo 'Test';
}
}
Dream::whichDream();