Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Php

Idiom #182 Quine program

Output the source of the current program. A quine is a computer program that takes no input and produces a copy of its own source code as its only output.

Reading the source file from disk is cheating.

<?php $s='<?php $s=%c%s%c;printf($s,39,$s,39);';printf($s,39,$s,39);
int main(){char*s="int main(){char*s=%c%s%c;printf(s,34,s,34);return 0;}";printf(s,34,s,34);return 0;}

New implementation...
< >
a