I don't know if someone can help me, but i'll ask anyway. I'm creating a function like the php token_get_all
written in javascript. This function should "tokenize" a given php code, but i have some problems with whitespaces.
Executing the token_get_all
function in php i see that only some whitespaces are considered tokens, the other ones are ignored.
Can someone explain me how this function behaves with whitespaces? Have you ever found some documentation about it?
UPDATE
<?php
if ($var == 0)
{
?>
- Beetween php and if: ignored
- Beetween if and (: tokenized
- Beetween $var and =: tokenized
- Beetween = and 0: tokenized
- Beetween ) and {: tokenized
- Beetween { and ?>: tokenized