• Answers
  • Web
Personalize Yedda, (And make Danny Happy)
People ask & answer about almost everything. Tell us what you're interested in... So we can personalize Yedda especially for you
I'm interested in:

Can javascript be implemented in PHP?

Can javascript be implemented in PHP?


Share Send to a friend Watch Report
 
 

2 Posted Answers
Order by

 
17 helpful answers

It could be, but I'm not sure why you'd want to do it as it would be extremely slow?  The point of Javascript, usually, is that it is executed in the browser rather than on the server, where PHP is usually executed.

If you mean you want to automatically generate client side Javascript in your PHP code, then there are a number of frameworks which will provide this sort of functionality, for example symfony or AjaxAC.

If you really want to run Javascript on the server side then the only solution I know of is Rhino, but that is based on Java rather than PHP.

Posted 2008-02-05T17:47:25Z
Helpful?(2)
Rated as Best Answer
 
2 helpful answers

You sort-of can... but it doesn't really make sense to because you could just do the same thing in PHP if you're doing it server-side anyway. I'd keep JS for client-side stuff.

Posted 2009-08-25T18:26:05Z

Sign in to participate

Got an answer for xxAlex? Would you like to comment on the posted answers, or vote for the one which you think is the best?

Sign up for a free account, or sign in (if you're already a member).

Feed - Subscribe to changes to this Q&A Blog
ADVERTISEMENT
  • Answers
  • Web
Copyright © 2006-2009, Yedda Inc. and respective copyright owners · CC License