$name = CUser::FormatName("#LAST_NAME# #NAME#"); // Output: "Doe John"
$name = CUser::FormatName("#LAST_NAME#, #NAME#", array("NAME" => "John", "LAST_NAME" => "Doe"), false, false); // Output: "Doe, John"
$name = CUser::FormatName("#LAST_NAME# #NAME# #SECOND_NAME#", array("NAME" => "John", "LAST_NAME" => "Doe", "SECOND_NAME" => "Peter")); // Output: "Doe John Peter"The CUser::FormatName method is a part of the Bitrix Framework library. It is often used in Bitrix-based websites or web applications.