i need a solution to check a string with PHP
and determine if it is a javascript
command.
i want to generate javascript scripts dynamically in runtime. but a string could be an invalid javascript command.
for example in :
$str = 'hello';
hello
is a simple string and not a javascript command but in:
$str = 'str.split()';
str.split()
is javascript commnad.
i want to know if a string is really a javascript command