Matthew Johnson

Page Body

PHP Quine

Since the Part 1A Exam contained a question "write a quine in Java" I decided to have a go at writing one. I decided to write it in PHP, since it has some nice features which mean most of the code only has to be written once, unlike a lot of languages. I also have added some code at the top which displays a message. Some people say this is not a true quine, but I disagree - it prints the source in its entirity, but with other code at the top (which can be arbitrary, and only needs to be entered once).