Domain: php-compiler.net
Stories and comments across the archive that link to php-compiler.net.
Comments · 13
-
Re:Real PHP Compiler
Or Phalanger at http://www.php-compiler.net/ which is a GPL project that compiles to CIL bytecode, which is then run through
.NET or Mono in a JIT fashion. It's a proper .NET language, so you get access to the .NET framework as well as the core PHP functions and default extensions. Unfortunately, some of the non-default extensions that they've ported (like gd2 or memcached) are not available in the GPL version. -
Re:Speed
I don't use COBOL because it doesn't have useful hooks into the libraries I need to use on a day to day basis. Same with Microsoft tech.
Microsoft development tech today is primarily:
1)
.NET
2) C++with heavy investments into both, balance being different depending on the kind of platform you're targeting (desktop/web/mobile). Also, JavaScript/HTML5 is coming as a third distinct platform with IE9, but we're looking at what is here and now.
So, I'm genuinely curious as to what libraries are you missing on either platform, especially keeping in mind the existence of C FFI on
.NET (P/Invoke), automated wrappers to generate declarations for it wrapping C and C++ code (SWIG), and various MS and third-party tools facilitating cross-language interop, such as C++/CLI, IKVM for Java, IronPython, IronRuby, Phalanger (PHP on CLR) etc. -
Re:What language for business logic?
As I understand it, neither the Objective-C-only platform nor the
.NET-only platform can run PHP.Phalanger is an implementation of PHP for
.NET. -
Phalanger
It's interesting to see what the Phalanger guys are going to do now. They've already been using ":::" as a namespace separator for their
.NET/CLR language extensions, as the next most logical choice. And now this.On the whole, though, this is probably just as bad as using "." for string concatenation (it was sort of okay for Perl because back then it wasn't yet used ubiquitously as a member access operator, but for PHP, it was a dumb choice). Backslash has a near-universal meaning as an escape character for several large language families now (all curly-braces family languages - C/C++/Java/C#/EcmaScript, and almost all modern popular scripting languages - Python, Ruby, Lua...). It's even used as the same in PHP, given that it is also a curly-braces language. Reusing it outside string literals in an entirely different capacity is not a good idea (especially when other languages of the family have already applied different meaning to backslash outside string literals - in C# and Java it's used to escape Unicode characters in identifiers).
-
Re:Angle of teh dangle
Not just Apache, it's more like a complete "WAMP.NET" stack: Windows / Apache / MSSQL / Phalanger.
-
Re:Its very probably a ploy /trap but it wont flyYou underestimate Microsoft. If they see that there's really no way this can be stopped, they'll just hop on the train and will try to make the best out of it.
For one thing, have you heard of Phalanger? It's a PHP implementation for
.NET, complete with Visual Studio integration and debugger? It's open source (BSDL-like), it runs on IIS and Apache, and it works with Mono and on Linux. And yes, it is essentially a Microsoft product now - they've hired the entire team (and before anyone wants to say something funny, Mono/Linux support was released after the buyout).Now think about it. For starters, you can try out Phalanger, see that JIT actually helps performance, and stick with it without changing anything else - i.e. it's still LAMP, just the last bit is replaced. But now that you actually have access to
.NET Framework classes, the temptation to use them might be strong (especially considering how sucky the PHP standard library is). And then eventually you stumble into the limitations of Mono, and Microsoft guys will be more than willing to sell you a W2K8 license...Alternatively, if you already run PHP+Apache+MySQL on Windows (and it is a surprisingly popular combo these days), you might also want to consider playing with Phalanger and maybe even IIS. And then you find out that you can write ASP.NET applications in it, and pretty conveniently work with MSSQL...
To put it simply, if people want PHP and Apache so much, Microsoft will give them PHP and Apache - in such a way that those provide full hooks into MS proprietary offerings such as
.NET and MSSQL. You are not forced to use them, but some people will - out of curiosity, or because they blindly think that MS is better, or because they have some needs that are genuinely better satisfied by MS offerings - and the migration path to the full Windows/IIS/MSSQL/.NET/Silverlight stack will be prepared for them. It's just business as usual.On a side note, Phalanger can also be used to write Silverlight applications. I haven't heard about anything analogous for rich client-side content for plain PHP (Ajax, Flash, or whatever), so if PHP popularity as a language is really so great, it could play out in an interesting way.
-
Re:FOSS on WindowsMicrosoft is, indeed, trying to win over the more visible FOSS products by ensuring that they run better under Windows. One good example is PHP (for all my dislike of it, it is an extremely popular and widely-deployed OSS product). If you read MSDN blogs, you know that IIS team specifically had "make PHP run as fast as possible" as one of their goals for IIS7; furthermore, Microsoft has hired the developer of the Phalanger project, which is a compatible implementation of PHP that runs on top of
.NET (and is quite a bit faster because of that) - once again, one of the stated goals of the project is to run as many existing PHP apps as possible, such as phpBB and even MediaWiki. They distribute it under MS-SSPL, which is somewhere between GPL and BSDL (you can make derivative works, you do not have to redistribute source code if you do, but if you do include the code, it also has to be licensed under SSPL) - that's pretty liberal if you ask me.Of course, this isn't some kind of altruism, just business. If Microsoft can covert a large part of existing PHP installations over to Win2008, they will substantially increase their market share in the Internet server segment. I wouldn't be at all surprised if they have similar things in mind with respect to Blender, Firefox, or any other popular OSS product out there.
-
What kind of LAMP shop are you?
If you are a PHP shop, you probably could use Phalanger to compile PHP into
.NET CIL.
If you are using Python, you could use IronPython.NET.
Just because upper-management has decided on .NET, does not mean you have to also give up your favorite programming language.
You could probably even keep a Linux workstation using Mono for testing the .NET apps.
Only the system administrators with no Windows experience need be worried at your office... not the developers. -
Re:In other news...
I know you meant that as a joke, but something very close actually exists! Have a look at Phalanger, the PHP Language Compiler for
.NET Framework. -
Re:Special MS PHP?
What on earth will they [Microsoft] do to PHP? Assimilate it into
Already been done by a 3rd party: Phalanger .NET?
The benchmarks are interesting... I suppose that stuff works about as fast as Apache+PHP on a libre OS. -
too little too late
Phalanger is going to support Mono in their next release, which already support IKVM.
-
Re:Its not going to attract a bigger audienceThe argument why
.PHP is seen as being less of a programming language to .NET is its lack of framework support.Actually
.NET is not a programming language, it's a platform. Many languages run on the .NET platform, PHP amongst others. -
Re:Marching Orders...
is there any plans to make PHP a full member of the
.NET environment?
It exists now: http://www.php-compiler.net/