Skip to content

Instantly share code, notes, and snippets.

@gasp
Created September 24, 2012 13:21
Show Gist options
  • Save gasp/3775919 to your computer and use it in GitHub Desktop.
Save gasp/3775919 to your computer and use it in GitHub Desktop.
recursive function
// the shortest strlen function
function cc($s){
if(($ss = substr($s,1))!='') return 1+cc($ss);
else return 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment