PHP5: Could PHP Soon Be Owned by Sun?
At first glance, the obvious changes to PHP are a result of the success of the Java platform and the weaknesses of PHP revealed in comparison. With the release of PHP 5, it's apparent that the developers of PHP and the Zend Engine (essentially a single group) felt compelled to make PHP much more like Java with respect to object-oriented programming. Zend, the Israeli company backing the development of PHP, promises on their web site that "full integration with Java will be closer than ever before." Hmmm, full integration with Java, huh?
On November 4th, 2003, Zend announced a strategic partnership with Sun. This deal also included advisors from Borland, Macromedia, MySQL and others. The purported purpose of this deal was to make PHP part of Sun's web server and bring it to the corporate world of development that previously had been dominated by ASP and ColdFusion. Now with the release of PHP 5, it's far more apparent which path PHP is taking.
PHP's object model was re-written from the ground up and mimics the abstract properties of Java's object method. There are private and protected members and methods, abstract classes and interfaces, in practice, identical to Java's object model. The extent of the influence that Sun has on PHP today is clear. If you have experience with Java and PHP, reading the details of the object model reveals the absolute cloning of the Java object model within PHP 5. From throwing exceptions to static variables, PHP 5's object model mimics Java in concept all the way to the syntactical level.
This is great for enterprise developers using Sun products, but with the release of PHP 5, what does this mean for the half-million PHP developers worldwide who have depended on PHP for open-source development, or for the developers whose ideas and efforts have brought PHP up through the ranks from its inception in 1995? When PHP goodies were bundled with Sun's web server on November 4th, 2003, with a $775 price tag, PHP began down the path of corporate ownership. For years developers have eagerly contributed their ideas and efforts to be a part of the success of PHP. Now that all the hard work and volunteering has paid off and PHP is a worldwide success, it appears that PHP could soon be another corporate shill owned by Sun, MySQL, Borland and Macromedia, if not on paper, then by direct influence on the people at Zend. Of course it will remain open source so that those half-million developers can continue to contribute their time and genius to its success, but if those thousands of contributions lead to direct financial gain for companies whose coffers are already overflowing and are simultaneously using those contributions to manufacture software with price tags out of reach to anyone but corporations, is PHP still the language developers should be focusing on for use in the open-source community?
On the positive side, this edition of PHP does bring improved performance and a new suite of MySQL functions. Backward incompatibility is limited to a list of ten issues. Additionally, there are only minor configuration file changes that need to be made to the web server. Several directives have been introduced for configuring php.ini files, mainly dealing with hashes for encryption.
Some very useful functions have been added to PHP5. It's been nine years in the making, but PHP5 now includes two functions to uuencode and uudecode. Combining those functions with the new socket and stream functions, developers can create a lots of "kewl" applications. An application to automatically encode and decode files to and from news servers comes to mind as an example of how to incorporate these new functions. At that point of course, a developer could use any of PHP's existing functions to continue to manipulate the files, store the contents in databases, and so on.
An addition to error reporting aids developers in keeping their code up-to-date. The E_STRICT message tells developers when their code is using deprecated functions or is in danger of not being forward compatible. However, don't assume that E_STRICT will be output if using E_ALL, because it won't. E_STRICT must be explicitly declared to output its suggestions to PHP 5 code.
While the rewriting of PHP's object model to essentially that of the Java object model does raise flags about the direction of PHP, it is still a powerful addition to the PHP5 release. Java became successful for a reason: it's intelligently designed and facilitates code reuse. By borrowing the best features of Java's object model, PHP has leveraged itself with far more credibility as a programming language that can stand on its own two feet (even if Sun, Borland and Macromedia are holding it by its arms).
Some vital re-workings in the PHP object model lie in how objects are treated in low-level fashion. Instead of passing the actual object itself, PHP's object model passes by reference. Now when operating on objects, developers can pass around multiple handles to the actual object allowing for more powerful and efficient applications. Existing PHP objects do not need to be re-written to take advantage of this change in PHP 5.
In general, developers who have experience with Java will easily adapt to PHP 5's object model. On the downside, if PHP is a developer's primary language and he or she hasn't been introduced to the world of static variables, public and private methods and the host of aspects included with this new model, they may have a bit of a learning curve adopting the higher-level format of object-oriented programming in this release. Overall, though, this change will be a plus for creating large-scale, object-oriented applications with PHP.
Keeping pace with the developments in MySQL and PHP's tight relationship, PHP5 has added a new suite of MySQL functions relating to the new features added since MySQL 4.1. Denoted as Improved MySQL Extension, its purpose is to allow developers to take advantage of prepared statements and the other additions to MySQL 4.1 and above.
Something very interesting to note with the addition on the Improved MySQL Extension is the absence of bundled MySQL client libraries with PHP5. There are numerous reasons given for this, including the different licenses that PHP and MySQL are under (PHP is under a BSD/Apache type license and MySQL is under a GPL license). The PHP5 documentation also assures developers that "there will always be MySQL support in PHP of one kind or another," but doesn't go into details as to the future of MySQL support. This perhaps is further evidence that the long-lasting popularity of LAMP environments (Linux, Apache, MySQL, PHP) will soon be replaced by SLOP environments (Sun, Linux, Oracle, PHP). If Zend continues to shy away from MySQL and completely joins forces with Sun, MySQL may soon no longer be part of the picture, and cheap, fast development may no longer be possible for PHP developers in the same capacity as it is today.
Zend clearly has underplayed the extent of the shift that has taken place concerning the future of PHP. While this version of PHP does provide a much better object model and added features, is this the beginning of the end of PHP as the choice of web scripting language for the open-source community and developers not under the employ of corporations? Will the average developer still be using PHP five years from now, or will the usefulness of PHP be limited to companies who can afford to shell out thousands of dollars for all of the necessary software that may be required to make PHP a viable option for development (along with the purchase of products from Sun, Macromedia, Oracle, Borland and others)?
While today this is still speculation, the evidence and tone lends credence to the thought that with the success of PHP, built on the backs of developers worldwide, the near future of it may include an alienation of it from those who energized it at its genesis, propelling it to the corporate enterprise status that those in control of PHP are seeking today. No matter what actually happens, developers should be aware of the major developments with PHP beyond the surface level function additions and new object model. Companies and developers who are employing PHP 5 for large-scale applications today at a reasonably low price may be in for a surprise in the next few years, if operating PHP at full capacity involves the purchase of additional, expensive software.
There's a great overview of PHP5's new OO capabilities at Kuro5hin.
Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
Don't know if this is really relevant, but as is noted in the Section 5.G of Feb 2004 ASF Board meeting minutes, the PHP project is terminated and rights for PHP will be tranfserred to the PHP group.
All of these comments are irrelevant. These predictions of PHP's future may come true or may not. But if you don't like the direction PHP takes, fork the project, take the source code, remove the parts you don't like, grow it in a direction you do like.
See that's why Open Source is different than proprietary software. It's not just another choice, it's fundamentally DIFFERENT. Nobody can take the software and force it down a direction you don't like because you and like-minded individuals can take it in the direction you like.
- For the complete works of Shakespeare: cat
It seems Microsoft isn't the only one capable of spreading FUD. If PHP gets to far into someone's pocket, it will get forked into something more palatable to the community.
This is the beauty of open source. It defies this kind of corporate grab.
Less Talk, More Beer.
I feel like Mr. Felton is looking for things to be wrong with PHP 5:
"There are private and protected members and methods, abstract classes and interfaces, in practice, identical to Java's object model."
A ton of languages treat classes like this. This is really pretty standard. The underpinnings of the way PHP handles classes may be like Java, which makes sense because Java does it pretty well, but as far as the developer is concerned, it's just like a host of other languages.
"companies whose coffers are already overflowing"
Sun's coffers are not exactly overflowing
"Java became successful for a reason: it's intelligently designed and facilitates code reuse."
exactly. why shouldn't php do the same?
"Instead of passing the actual object itself, PHP's object model passes by reference"
This has been deprecated for some time - most PHP developers knew this was coming and had php.ini configured to do this by default already. This has nothing to do with my point, but is an interesting side note.
"if PHP is a developer's primary language and he or she hasn't been introduced to the world of static variables, public and private methods"
oh come on. This is CS 101 stuff...how many serious PHP developers could there be who don't know that stuff?
"Of course it will remain open source so that those half-million developers can continue to contribute their time and genius to its success, but if those thousands of contributions lead to direct financial gain for companies whose coffers are already overflowing and are simultaneously using those contributions to manufacture software with price tags out of reach to anyone but corporations, is PHP still the language developers should be focusing on for use in the open-source community?"
This is the gist of your argument. Now substitute any open-source software of your choosing. Has the argument changed? Better, or worse? Why is PHP any different than any other FOSS?
If Zend continues to shy away from MySQL and completely joins forces with Sun, MySQL may soon no longer be part of the picture, and cheap, fast development may no longer be possible for PHP developers in the same capacity as it is today.
... you have plenty of choices, and fast development doesn't depend on MySQL. In fact there are problem domains where MySQL slows down development because of lacking features. It's something to consider. Unless PHP drops all support for database operations, it'll remain useful for these kinds of applications. There's no reason to give up hope!
... legal. It makes sense for a language like PHP to distance itself from such projects -- not eliminate support, just appear less entangled. It cleans everything up, and leaves us with obvious choices to be made.
Maybe you don't realize this, but PHP supports quite a range of database products. The fact that it seemed to favor MySQL over the rest didn't really help anything; it just made more people use a product they wouldn't necessarily have chosen on its own merits alone, and directed more programming/bug-fixing toward that one product. Postgresql or Firebird, SAP or Oracle
And as to MySQL, remember it's not as free as the rest. Like Qt and MySQL (Trolltech and MySQL AB) are both using dual-licensing to make their products "free" for some use, but not for others. MySQL's client libraries are GPL rather than LGPL, which makes using them for corporate projects less
The PHP group is 9 guys across the globe. Zend is a strong force and helpful. I like the syntax changes that make PHP more like Java, but I don't want to see any company own PHP.
Luckily, it's not gonna happen.
-Jackson
Of course it will remain open source so that those half-million developers can continue to contribute their time and genius to its success, but if those thousands of contributions lead to direct financial gain for companies whose coffers are already overflowing and are simultaneously using those contributions to manufacture software with price tags out of reach to anyone but corporations, is PHP still the language developers should be focusing on for use in the open-source community?
I feel soo bad. I have used open source at my work and I have received financial gain through salary and the occasional bonus. AYE HE SAID COFFERS! Obviously promoting piracy.
Get a grip on yourself man. It's Friday - go out & have a few beers.
Besides, you missed the real threat: Given the similarity between PHP 5 & C# object models, it's obvious the evil empire is trying to take over PHP (or maybe Sun is trying to control C# as well).
Of course it will remain open source so that those half-million developers can continue to contribute their time and genius to its success, but if those thousands of contributions lead to direct financial gain for companies whose coffers are already overflowing and are simultaneously using those contributions to manufacture software with price tags out of reach to anyone but corporations, is PHP still the language developers should be focusing on for use in the open-source community?
A - Which of these companies have overflowing coffers?
B - It's open source. If someone wants to contribute then they can contribute. If someone wants to profit then they can attempt to profit. I don't see why a company that contributes shouldn't have the opportunity to profit somehow.
C - Nothing says that PHP can't be forked back towards the little web scripting engine that was once PHP and PHP/FI before that.
5 years ago no one had heard of PHP (ok, a bit of exaggeration since I started with PHP 7 years ago) ... and it has grown from the niche geek toy into something the big boys play with ... it started as a small project of one person and now it has tens of books written about (many translated to multiple languages), 3 specific magazines, numerous companies providing commercial tools, more companies providing development support and women who think it's sexy (I know she's out there, where are you?) ...
... it's nice to know that the larger companies are taking notice (even if one of them may be grasping at anything to stay alive) ... and yes Zend can be considered to have a large say in what direction PHP takes (I will not propogate rumors, I will not propogate rumors) ... but what about looking at the history of Perl as a possible role model for PHP? Didn't that also get slammed with rumors of corporate takeover when ActiveState started doing more with it? Notice that Perl is still OS ...
... or is this a wakeup call to the PHP programming public to take back their rights that have been trampled on by so many trying to take commercial advantage of a language by the people for the people?
...
:)
It's nice to know where the OO model comes from, gives it more credence
Is talking about Sun, Macromedia and MySQL horning in on the action is like chicken little proclaiming the sky is falling
Food for thought
p.s. I work for a company that produces commercial tools for PHP development
While PHP5 is very similar to Java I believe it's mainly the shift to object orientated programming that brings the 'cloning' that you see.
That and a dash of paranoia.
What drives me crazy about PHP is it just keeps growing. Need another function? Ah let's just add it! The problem is the language grows from something quite simple to something that's impossible to master.
I like the approach Python has taken. Everything is kept clean and simple, and the complexity is added through importing modules. Need another function? Import it! I guess that's why Python is said to "fit in your head".
I'd better stop before I start a flame-war. The point I wanted to make is PHP and Java will both probably collapse under their own weight, and another simpler language will take their place. If the plan is the grow PHP into Java, then there will be tonnes of books needed to reference everything, which is good if you want to sell books, but bad if you want to write programs without having to constantly look something up.
It seems to me that a programming language needs to plan for growth before it starts, otherwise it grows and gobbles up the mental resources of the programmers using it. Once it's too big, people will just fall back on simpler tools.
Ruby on Rails Screencast
Grown from a toy language with one neat trick -- a big switch that you throw between "write this to stdout" and "interpret this as code" -- PHP is yet another language whose only reason for existing is to indulge the coders' desires to play with the new shiny toy. (TCL, Python, etc.)
All scripting languages move toward feature-parity with perl. Why bother with that process? Let the toy remain a toy.
Rather than reiterate language design from 10 years ago, why not just use an existing tool to do something new and useful?
Yeah, perl's syntax is arcane, but it's powerful. Yeah, the language is huge, but is it better to implement a smaller language that is then expanded over and over?
Curmudgeonly yours,
Flumph
Keep using PHP4 or PHP5 if you dont like where Zend/Sun takes PHP6. Its not like features will start to magically disappear from the old versions.
The way Java handles protected variables (due to packages) is starkly different from the way C++ handles protected variables. Fortunately, it looks like PHP picked the (less broken, IMHO) C++ way to do it.
As for your final comments--all too many PHP developers don't know "CS 101 stuff", serious or no. Also, I know that when I first learned about the OO methodology, it was quite confusing. Now that I know more about it, I'm convinced that there's a lot there to be avoided, and all of it should be carefully considered.
Fortunately, (like the crippled "object system" in PHP 4) if you don't want to use it, you still don't have to use it.
pb Reply or e-mail; don't vaguely moderate.
This article is packed with FUD of the worst kind. Bleeeech!
A Multiplayer Strategy Game for Mac OS X, Windows, and Linux
If there are any problems with PHP, it will be forked. Or rather, rewritten, because the PHP license includes a rather obnoxious trap door:
6. The software incorporates the Zend Engine, a product of Zend Technologies, Ltd. ("Zend"). [....] In the event that you separate the Zend Engine (or any portion thereof) from the rest of the software, or modify the Zend Engine, or any portion thereof, your use of the separated or modified Zend Engine software shall not be governed by this license, and instead shall be governed by the license set forth at http://www.zend.com/license/ZendLicense/.I haven't looked at that URL because it's an URL: it can change at any time.
I have always been concerned about the tight interaction between PHP and Zend. For instance there is still no free and *reliable* bytecode compiler available for PHP, and the maintainer of the most promising accelerator has been "taken off the street" (hired) by Zend.
I do believe this article is a minor dose of FUD but I also believe someone *needs* to re-implement PHP based only on the specification and release the code under the GPL or the BSD license, rather than a made-up pseudo-BSD Zend-friendly license.
now don't get me wrong, i'm not bashing php. i use php all the time and it is a pretty straightforward tool and quite easy to pick up. the inevitable problem with trying to reform a language is that you need to "break" it in order to fix it
Zend, the Israeli company backing the development of PHP...
As far as I understand from your review, PHP development was directed not by a non-profit (think Apache Foundation), but by a business (think MySQL and Zope) for a while now, and this was OK from your POV until some bigger businesses offered investment in Zend. Can you reasonably justify (at least to yourself) why Zend was OK and "Sun, MySQL, Borland and Macromedia" are bad-bad-bad corporations? Especially since MySQL could not be MUCH bigger, right?
If there were a Microsoft connection, I might don on my tinfoil hat (not just because they are BIG, but because of their monopolistic practices).
Paul B.
I would argue that PHP's "One Thing", in this case, would be it's ability to handle a variety of different types of data streams with a single simple set of functions.
Data from webservers, ftp servers, files, named pipes, and network sockets can all work more or less the same way. I find it nice to be able to talk to network servers with it just as easily as I can read and write plain files.
Hacker Public Radio is our Friend
It seems to me that the situation he's describing here is much like RedHat 'shilling' Linux for profit. Now, of course, I recognize that Linus et al aren't part of RedHat, but the end effect is the same, really, just further down the timeline.
PHP is at the state right now where Linux was before people started forking off various distros.
I'm not particularly concerned that PHP will become 'commercialized' any more than I am that Perl is 'commercialized' by ActiveState. The language and the community is more than the sum of a few key people, or even companies involved. The community around it is the main strength, and it's that ubiquitiousness that's the core of PHP, not the language itself.
I don't what the Sun interest would be in PHP given that Java has Servlets/JSP that could be seen as a competing techonolgy.
"I think this line is mostly filler"
Microsoft, long ago, felt it had a stake in reshaping the nature of browsers. Personally, I don't think the GNU C Compiler folks feel they have a stake in reshaping the nature of compilers.
"The Devil does not know a lot because He's the Devil, He knows a lot because he's old." -- unknown
Java became successful for a reason: it's intelligently designed and facilitates code reuse. By borrowing the best features of Java's object model, PHP has leveraged itself with...
For years I have been asking for concrete examples of OO producing code reuse in the business domain, but have yet to see a convincing example. OO does NOT have objectively demonstratable magic properties (except in a few narrow conditions that I don't encounter very often).
Some people pick OO because they personally like it, NOT because it is objectively better. Enough with the OO hype.
Table-ized A.I.
On November 4th, 2003, Zend announced a strategic partnership with Sun. This deal also included advisors from Borland, Macromedia, MySQL and others. The purported purpose of this deal was to make PHP part of Sun's web server and bring it to the corporate world of development that previously had been dominated by ASP and ColdFusion.
ColdFusion, is a product of Macromedia. Is that the deal hiring advisors from Macromedia, or advisor itself is Macromedia?
This guy only knows Java and PHP, and he's amazed at how similar they are. Me, I only know Latin and PHP, and I'm amazed at how similar THEY are! I predict that PHP will soon change its name to the Pompeii Hypertext Processorium!
I have discovered a truly remarkable
3079 is only if you compile in every single possible external module. Most people aren't going to compile in mssql and mysql and oracle and pgsql and msql support at the same time, for example. Anecdotally, having worked across dozens of installations in various shops large and small and numerous hosting environments, there's probably 1000 functions that are commonly available via 'standard' compiled-in modules (mysql, gd, odbc, imap, etc).
creation science book
As OO languages go, there will always be similarities in implementation. Having needless variation in the what the time function is called (for instance) isn't in anyone's interest. := a language.
There are relevant differences in underlying code compilation and running, but when it comes to writing.. a language == a language = a language
It's all just syntax in the end.
click-clack, front and back. I'm not moving this car otherwise.
Why bother with the inconsistent mess that's called PHP, when you can plug mod_python into Apache. With recent editions you can also write inline python code - just as PHP.
It all tastes better, run faster, is easier to learn and maintain.
True. Forking PHP and building a successful community around the fork would send two powerful messages to corporations. Message 1: You can profit from OSS but you can't (successfully) dictate its politics. Message 2: Normal people are in control of OSS, not corporations. If you ask me, Message #2 will upset them the most.
Also, in Java 1.0.2 there was a "private protected" keyword that corresponded to C++-style protected variable access. However, apparently that was a "bug", and was quickly removed, over the protests of the userbase.
:)
P.S. sorry I didn't reply in this thread earlier to clarify things, guys, I guess I didn't think anyone would be interested.
pb Reply or e-mail; don't vaguely moderate.
It's an interesting exercise to study just how much OSS is actually helping corporations, who already use it in one form or another, and individuals, people at home.
Especially those on the wrong side of the tracks, or the border lines, affected by the "digital divide".
I tried installing Linux for internet access on an old P5, just the way it was, without changing any hardware.
Winmodems are what the poor have. They don't work on Linux.
Ethernet is what corporations have. It works.
Build your own energy sources from scratch. http://otherpower.com/
So now, we'll have two Java clones, .NET and PHP?