Do you have any ideas where to find a PHP class (library) which can validate JavaScript syntax?
Result: it seems that there is no such library which is available to download, so the only solution is to write own. Thank you all.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is a nice class which is a wrapper to the ubiquitous (for JS validation) JSLint – http://www.overflow.biz/blog/lang/en-us/2010/07/07/jslint-php-class/
It does require that you can execute binaries on you’re server as you require JSLint itself of course.
EDIT:
There is also a (very old) php-based parser – http://timwhitlock.info/blog/2009/11/jparser-and-jtokenizer-released/ – I used it a long time ago not for a while!