V8Js class in PHP

The more I PHP I learn the more there is to learn

I’ve just come across the V8Js class: http://php.net/manual/en/book.v8js.php

I had no idea that they had integrated the V8 JavaScript engine into PHP

When did they do that? Has anybody used it yet?

I googled it but there doesn’t seem to be much written about the class yet

It’s not in the core but as PECL extension: http://pecl.php.net/package/v8js

I see if I can find a guide on how to install a PECL ext and I might play around with it

An update on this I emailed the principle developer Jani Taskinen and he replied saying that he has retired from coding and hasn’t touched it for about a year, so that’s a put a dampener on my enthusiasm to try it out

Hi Andy,

The v8js extension was added to PECL at the tail end of 2010 and hasn’t received a whole lot of use[SUP]1[/SUP], nor publicity[SUP]2[/SUP]. It’s a niche extension like much of PECL/PEAR/PHP; for people who wish to execute JavaScript on the server, and particularly for those who wish to have PHP and JavaScript interact, it is a neat little tool. If you find someone using it out in the wild, I for one would be happy to hear about it.

Also, don’t be too disheartened to hear that Jani doesn’t plan to maintain the extension. For a start, I wouldn’t expect too many problems with the extension as it is right now. Secondly, there is always scope for anyone else to come along and pick up the task of maintaining or further developing it. If folks are actively using the extension, then that’s all the more reason for it not to get left on the wayside.

1. Judging from the download count.
2. I don’t remember seeing many blog posts about it back when it was released.