se non mi ricordo male usa pregexp .. e poi è sicuramente moooooooolto + performante di qualsiasi cosa ti inventi tu in PHP (lei è in C :-P )