Hi mscdex,
I have multiple goals with this project, but most importantly, my hope in
plugging PHP into node is to extend it's usefulness to new demographics
rather than replacing or competing with existing features. The function of
particular packages or extensions might be similar, but it's the
familiarity of the PHP platform that I feel many people will appreciate.
I also want to add that I finished a revision of the invocation framework.
PHP can now be used within JavaScript almost identically as in PHP script,
such as:
var mysqli = new php_class("MySQLi", host, user, pass, database);
var results = mysql.query("SELECT * FROM `users` WHERE `id` = 1;");
var row = results.fetch_assoc();
php.printf ("%s, %s\n", row['lname'], row['fname']);
or:
var out = "";
var fp = php.fsockopen("nodejs.org", 80, errno, errstr, 30);
if (fp == false) {
php.print("failed, but I can't show vars populated by ref yet :/");
} else {
out = "GET / HTTP/1.1\r\n" +
"Host: nodejs.org\r\n" +
"Connection: Close\r\n\r\n";
php.fwrite(fp, out);
while (!php.feof(fp)) {
php.print(php.fgets(fp, 128));
}
php.fclose(fp);
}
On Tuesday, December 25, 2012 4:49:15 PM UTC-8, JSON wrote:
>
> I'm finishing up a php sapi/api for v8. The original taget server is a
> boost asio based game server, but I will also be making a port for node.js
> (yes, the node port will be free and open). What type of features would you
> be most interested in? At the current state, php invocations are made from
> v8 at run time. the invocation is done like such:
>
> var invocation = {
>
> host:"domain"
>
> user:"username",
>
> pass:"password"
>
> method:"mysql_connect"
>
> }
>
>
> var link = php.commit(invocation);
>
>
> Commits take under 2 millionths of a second on low end equipment (thats
> the function invocation, not the function execution) and type conversion is
> done transparently and directly, without JSON parsing. commit also has an
> async variant which handles functions in threads outside of v8 (though
> still part of the same process) and a proxy variant that sends invocation
> into php userspace rather than invoking them at core level. This is slower
> but provides more flexibility to PHP/javascript developers. Proxy calls
> still happen within the same thread if it not called asynchronously.
>
>
> What features would you be most interested in? encryption? gd/image magic?
> database connectivity? Any input would be very helpfull.
>
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en