View Category
produces a copy of its own source code
In computing, a quine is a computer program which produces a copy of its own source code as its only output.
php
// We make sure nothing else is outputted on the screen
ob_end_clean(); // Clean everything
die(highlight_file(__FILE__)); // Print and die
ob_end_clean(); // Clean everything
die(highlight_file(__FILE__)); // Print and die
cpp
#include <cstdio>
#define B(x) x; printf("{ B(" #x ") }\n");
int main()
{ B(printf("#include <cstdio>\n#define B(x) x; printf(\"{ B(\" #x \") }\\n\");\nint main()\n")) }
#define B(x) x; printf("{ B(" #x ") }\n");
int main()
{ B(printf("#include <cstdio>\n#define B(x) x; printf(\"{ B(\" #x \") }\\n\");\nint main()\n")) }
