Books
A Chinaman of the T'ang Dynasty - and, by which definition, a philosopher - dreamed he was a butterfly, and from that moment he was never quite sure that he was not a butterfly dreaming it was a Chinese philosopher. Envy him; in his two-fold security.
— Tom Stoppard ‧ Rosencrantz & Guildenstern Are Dead

Behind the line May contain spoilers.
Our reading
An editorial interpretation.
A dreamer becomes unsure whether he is a philosopher who dreamed of a butterfly or a butterfly now dreaming of being a philosopher. The closing invitation to envy him is wry: being unable to tell which is real leaves him doubly secure, since either identity brings its own reassurance.
Context reviewed