Thanks for your answer. I've looked into the details I can see inside the attribute, and the only one accessible from PHP that seems to contain something suitable is data_text, I couldn't see any output_text in PHP (although I know it's available in eZ templates).
the data_text unfortunately contains XML markup and doesn't look like valid xhtml I could render out without the attribute_view_gui function. It still contains paragraph, section, strong and similar tags, too.
attribute_view_gui automatically uses output handler, so you need to do it manually in PHP. Class to use is in kernel/classes/datatypes/ezxmltext/ezxmloutputhandler.php