Created
September 24, 2012 13:21
-
-
Save gasp/3775919 to your computer and use it in GitHub Desktop.
recursive function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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