having decided to attempt to write a visual merge/edit/translate tool for 'old
skool'
php lang files (see previous thread I started) I have got to a stage where I
can reliably
extract 'keys' and 'values' from multi-dimensional tokenized arrays regardless
of the
complexity of the key or value definitions (displaying the complex values is
another problem :-)
in the mean time I now have a situation where I could have an array 'key' that
is made up of
of the following tokens:
1. 'foo'
2. .
3. MY_CNST
when a form is submitted I'm going to have to find a way to track down that
string of
tokens from a concatenated version of those tokens ... I have noticed that I
can pass the
concatenated tokens (prefixed with '<?') to token_get_all() and retrieve the
individuals tokens back ... very handy.
in fact it seems that you can pass just about any kind of crap into
token_get_all(),
prefixed with '<?', and token_get_all() will return an array of tokens ...
there seems
to be no obligation to pass in anything that even resembles valid code.
AND NOW FOR THE QUESTION... does anyone know if I can rely on token_get_all()
tokenized
anything and everything that is thrown at it?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php