Skip to content

Instantly share code, notes, and snippets.

@danprince
Last active December 22, 2015 00:29
Show Gist options
  • Save danprince/6389841 to your computer and use it in GitHub Desktop.
Save danprince/6389841 to your computer and use it in GitHub Desktop.
Selttob fo reeb!
<?php
$i=99;
$e=1;
$R='strrev';
function P($i){
$b="elttob";
$i==1?0:$b="s".$b;
return $b;
}
function B($i){
$a=P($i);
return $R("reeb fo ".$a);
}
$n=$R("erom on");
while($i){
printf(R("\n.s% s% ,llaw eht no s% s%"),$i,B($i),$i,B($i));
--$i<=0?$i=$n:0;
if($e)
printf($R("\n\n.llaw eht no s% s% ,dnuora ti ssap dna nwod eno ekaT"),$i,B($i));
else {
printf($R("\n\n.llaw eht no reeb fo selttob 99 ,erom emos yub dna erots eht ot oG"));
break;}
$i==$n?$e=0:0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment