<?php tmpfile(): resource|false
<?php some content EOT; $fp = tmpfile(); fwrite($fp, $yaml); $path = stream_get_meta_data($fp)['uri'];