Skip to content

Instantly share code, notes, and snippets.

@cmcculloh
Created July 19, 2010 22:44
Show Gist options
  • Save cmcculloh/482163 to your computer and use it in GitHub Desktop.
Save cmcculloh/482163 to your computer and use it in GitHub Desktop.
<?
$n = 10;
$i = 3;
if(calc($n) < calc($i){
print "yes";
}else{
prn($n, $i)
}
function calc($v){
if($v &lt; 10){
$v = 13;
print $v . " ";
}else if($v > 10){
$v = 3;
print $v . " ";
}else{
$v = 23;
print $v . " ";
}
return $v;
}
function prn($v1, $v2){
$newV = $v1 + $v2;
print $v1 . " + ";
print $v2 . " = ";
print $newV;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment