[wp-hackers] WordPress PHP Extension

Computer Guru computerguru at neosmart.net
Wed Nov 14 15:29:22 GMT 2007


You're going about the long way...

There are already exist PHP compilers (not converters to C++, but stuff that
actually converts PHP to assembly directly) by MS and Roadsend.

The first is Phalanger, an open-source CLR implementation of PHP that comes
with a support for compliing an einter PHP project as a single DLL/binary.
Second is Roadsend PHP, an open-source PHP interpreter NOT based on the
original PHP code, that can also compile PHP directly to a FastCGI
executable.

I haven't had much luck with either w/ WordPress.


On 11/14/07, Jacob <wordpress at santosj.name> wrote:
>
> Midgard[1] has it, ADODB has it, why not WordPress[2]? I suppose, this
> is better split in two parts.
>
> The first part is the question of whether anyone has explored this for
> WordPress before. If so, how did they fare? There are a few challenges
> of building and maintaining a PHP Extension that requires constant
> maintenance. If anyone has known of anyone doing so, can they let me know?
>
> The obvious answer of why there isn't one, is because WordPress
> development is constantly evolving and keeping up with even a small team
> would be difficult. How the two projects above handled it was to take
> the most time consuming parts and place them in C/C++ code and call
> those functions, if they exist, where needed.
>
> It is not impossible to translate PHP code to C/C++, even with MySQL
> connections intact. There are two ways to go about it. However, if you
> are going to develop an optimized, you'll want to hook into PDO or the
> underlying API that the MySQL extension itself uses to push it that much
> further.
>
> It really goes beyond Opcode Caching to a realm slightly faster than
> that. Having access to the underlying C/C++ code allows for usage of
> quicker structures than Hashes.
>
> I thought about it. Just a thought really. Would anyone be interested in
> this exercise in entertainment (building PHP extensions is fun, honest)?
> Thought I would ping the hackers to see what your opinion is on the
> matter. Really, I wouldn't have thought about it, if it wasn't the
> discussion on optimizing the Plugin API (still have to submit that
> updated patch).
>
> [1] http://www.midgard-project.org/
>
> [2] The main setback would be that not many users has access to
> compiling PHP (or know how to compile PHP), therefore the audience of
> such an specialized Extension would be small.
>
> --
>
> Jacob Santos
>
> http://www.santosj.name - blog
> http://wordpress.svn.dragonu.net/unittest/ - unofficial WP unit test
> suite.
>
> Also known as darkdragon and santosj on WP trac.
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Computer Guru
Director,
NeoSmart Technologies
http://neosmart.net/blog/


More information about the wp-hackers mailing list