Quine

A quine is a piece of code that produces itself. It takes not input, and outputs a text that is its own code. The code is run to produce itself.

<?php
$code = '<?php
$code = %c%s%c;
printf($code, 39, $code, 39);';
printf($code, 39, $code, 39);

Documentation

See also PHP Quine, PHP Quines: Self-Replicating Code Explained, Quine (ath.cx) and Why Self-Replicating Code (Quines) in PHP Is a Security Red Flag.

Related : Folklore