News for hackers. Stuff that matters.
Re:PHP: v8.js by postfuturist on Friday February 24, 2012 @11:38AM (#3629737)
It looks like a PHP extension to embed JavaScript using the V8 engine. The docs are pretty limited. The return value of executing a blob of JS is described thusly: "Returns the last variable instantiated in the Javascript code converted to matching PHP variable type." I supposed the mapping is obvious, to someone :). I'd personally want to know if JS objects come back as stdClass objects or assoc arrays.

It could definitely be handy for a lot of reasons. Seems like it might be handy for embedding a bit of JavaScript testing in your PHP test suite.

Re:PHP: v8.js by TomNomNom on Friday February 24, 2012 @01:35PM (#3630307)
I imagine the objects would come back as stdClass as this is the behaviour when decoding JSON objects with json_decode(). I assume other type-mappings will match the behaviour of json_decode() too.

I can't think what the result would be if the last variable instantiated in the JavaScript code was a function though; perhaps null, or an exception would be thrown.

Re:PHP: v8.js by DomBlack on Friday February 24, 2012 @11:56AM (#3629832)
I'm in complete agreement with you. Having a CI server is great for PHP work, but it would be better to have the one CI server process both PHP and javascript unit tests together.
Re:PHP: v8.js by bdg on Friday February 24, 2012 @12:19PM (#3629946)
Last time I looked I don't remember seeing any bindings to the PHP environment.