Simple PHP string tokenizer for lexical scanning operations