Skip to content

Instantly share code, notes, and snippets.

@magmastonealex
Created October 16, 2013 16:22
Show Gist options
  • Save magmastonealex/7010655 to your computer and use it in GitHub Desktop.
Save magmastonealex/7010655 to your computer and use it in GitHub Desktop.
<?php
$t1 = 120;
$t2 = 71;
$count = 2;
while($t2 < $t1){
$temp = $t2;
$t2 = $t1-$t2;
$t1 = $temp;
$count++;
}
echo $count;
?>
<?php
$Y = 2012;
$good = 0;
while($good==0){
$uniq = 1;
$Y++;
$a = "$Y";
foreach (count_chars($a, 1) as $i => $val) {
if($val>1){
$uniq=0;
break;
}
}
if($uniq==1){
$good=1;
}
}
echo $Y;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment