PHP strspn() May 23, 2012 Pramod T P It returns the number of characters found in the string that contains only characters from the charlist. Example <?php echo strspn(“phpcodephp”,”phpe”); ?> Output 3