Future of PHP Revealed
Anonymous Coward writes "In an interview with linuxpower.org, the developers of PHP present hot facts on the future of PHP, the next major release PHP 4.0, the license change, and what window managers they use."
jimjag note: See the Apache section for info about the latest beta release of PHP 4.0.
jimjag note: See the Apache section for info about the latest beta release of PHP 4.0.
Interesting to see that all of the developers listed slashdot.org as web site they visit often.
PHP is going to be a strong alternative to ASP, and its good to see that the developers are being open and forthcoming about developments in PHP. Way to go...
I wanted to point out that Eugenia Loli is offering up to $260 for PHP 4 on BeOS ($120 for the Xitami and $140 for the RobinHood add-on). More details at http://www.ukbug.org/ Scot Hacker is also offering $140 for porting PHP 4 for Robin Hood.
---
I worked for a while on a web-based application, where we used ASP/IIS with MSSQL server on the backend. We would have loved to migrate to Apache/PHP, but the size of the existing codebase would have made a port too costly. I've heard of a number of other people in this same situation.
The ASP->PHP port would be much easier if PHP supported the ASP object model. This would allow for dumb parser/translators to be written (like asp2php) that could work nearly flawlessly, because arbitrary translations don't have to be hardcoded in. For example, instead of hunting down how to do a redirect in PHP (ie. writing the header manually: this took me a good 15 minutes to figure out), I can just type response.redirect().
If mindshare is what this project's after, I can't think of a better way than to get a horde of gracious ASP/IIS converts. The stability and performance boosts alone should be enough to convince all but the most devout Microsoft fanatics.
This is sort of a wierd concept, but it is straightforward: The creator of the software has the right to license it under any terms he or she wishes. If I wanted, I could release software simulataneously under the GPL and under a license where I would get your firstborn if you ever ran the software. If you received a copy under the latter license, you would have to adhere to it, while those who got it under the GPL would not have to. Of course, getting the software under the FBL (Firstborn License) does not preclude you getting it under the GPL and gaining less restrictive terms.
Why is this moderated down?
its properly moderated down because (IMNSHO) its purely argumentative. the author does not attempt to justify his claim that zope is better. the claim by itself contributes nothing to the discussion (other than to possibly motivate responses such as "no, PHP is better" or "you are dumb"), hence the post was moderated down.
you on the other hand have stated two reasons which appear to support the claim. while i have used neither Zope nor PHP, and thus am not in a position to weigh your argument, i can at least say that it has some substance and is relavant to the discussion.
--Siva
Keyboard not found.
Keyboard not found.
Press F1 to continue.
I'm a long time PHP developper (since early PHP2) and I simply love this language since the beginning. Like they said in the interview, the syntax is really clear and simple so it's really easy for anyone to read someone else's code and start modifying it. Anybody tried reading the (outdated) slashdot source code lately ?
.4 seconds to generate with PHP3, and now only .17 seconds with PHP4. It will be even better when we will be able to preprocess the files (ala java). See http://www.zend.com for some benchmarks.
I really like perl for some of it's strenghts but unless you have a LOT of experience with it it's really hard to modify a big project written with it (from my own experience).
The C like syntax of PHP is really neat, well thought and emacs (vim also) works like a charm with it.
One of the biggest improvement of PHP4 is the speed, it's really impressive. I'm working on a rather complex site, and a single page took
Lately a java module for PHP4 has landed in the cvs. At first I wondered why they did such a thing, but take a look at this code :
$InetAddress = new Java("java.net.InetAddress");
$localhost = $InetAddress->getByName("www.yahoo.com");
$addr = $localhost->hostAddress;
Basically it does a simple nslookup on www.yahoo.com, but uses a java class to do it. Isn't it amazingly easy to use ? Think about what you will be able to do with this extension ! And of course it can use a lot of JVM (Kaffe, IBM JDK 1.1.8 for linux, sun JDK 1.2.2 for NT and others).
Any serious web developper should give PHP4 beta2 or the soon to be released beta3 and experiment a bit with it. I can understand someone not liking it, but I certainly can't understand someone not liking it without at least trying to use it !
J-F Mammet
webmaster@softgallery.com
These are the little bits I know:
- Built-in session management.
- Customizeable session swapping (session info is swapped to the hard drive if session is inactive for a specified time period.
- Modular.
- Cross-platform.
- Compiled.
- All the features of Java, such as inheritance.
Did I miss anything? Are there any huge drawbacks? The Java Web Server (JWS) home page is here (http://www.sun.com/980310/javawebserver/ - if I used the URL as the link's text, Slashdot filtered out the </a> for some reason).--
- they don't get into the details enought...
eh...ill bet more info like that will be available off their website in the not so distant future. someone mentioned they were in need of a detailed changes/features list.
- they repeat themselves.
maybe, but they interviewed like a half-dozen developers. and its not like they repeated stuff verbatim; it was more like certain people expanding on some issues. you cant expect everyone's opinions to be mutually exclusive. and its better than half of them just saying stuff like "yeah, what he said"
- they spent too much time on GPL != QPL.
well, it seems to me that licencing is a big issue for any large open source project. with all the wacky stuff going on in the courts, i cant say i blame them for being careful with how they licence stuff. and whenever a large project changes its licencing, theres bound to be a lot of questions from the community.
i agree though, good overall.
--Siva
Keyboard not found.
Keyboard not found.
Press F1 to continue.
They can easily do this, as *THEY* are the copyright holders. They can distribute this software under as many licenses as they want.
One license, the GPL, allows anyone to take it and modify it, do whatever, so long as they release source to their mods.
The PHP license, on the other hand, allows them to include PHP in a complete product wihtout necessarily providing source, or divulging what they do (I haven't read the entire thing yet).
You can't take a piece of code that is under GPL and 'modify' or 'tie' it to another license... but in this case, they are the copyright holders, and the original authors. They can do what they want.
Actually, in most of the civilized world, you would have difficulty enforcing the 'firstborn' clause of the license, as most courts would throw it out as unreasonable.
Certain things can not be given out by contract. This is probably one of them.
I use both on a daily basis. Both are excellent.
PHP Hypertext Preprocessor (it's recursive). It used to stand for "Personal Homepage", but it outgrew its original use, so they hold a competition for renaming the thing.
things. take. time.
It stands for Hypertext Pre-Processor. Of course that would really make it HPP, but a while ago (when it was still called Personal Homepages), the PHP group ran a survey on their site where users could vote for their favorite "acronym." The most popular one was Hyptertext Pre-Processor.
That's it.
PHP, and indeed ASP are not really great technologies.
Sure they work; they are good for quick prototyping, but every application I have seen written in them soon become a huge mess of "include" files that all need to be loaded in for every page hit. Yuck!
It doesn't scale very well, it is hard to maintain, and being purely interpreted, it difficult to debug (e.g. syntax errors aren't picked up until you execute the given line).
Unless you are very disciplined and limit the php pages to very presentation-level stuff, you end up with something that is harder to understand and maintain than even c (because it doesn't have the flexibility of it), with none of the advantages (even simple bugs cause the interpreter to bomb with an obscure error message, and it is very slow).
As stated elsewhere, Java servlets are easier to write, easier to maintain, and scale much much better. The problem on Linux is finding a decent vm for it.
ASP/PHP has its place, it just seems to get overused. We use it in 2 web applications, and in hindsight, it wasn't a wise choice for either.
NotZed
PS The bit about the GPL license in the FAQ I just find bizarre.
quick guide to slashdot moderation:
"linux is better" -- redundant -1
"freebsd is better" -- flamebait -1 (unless accompanied by well reasoned argument, and at least acknowledging places where linux is better, like SMP, drivers, and scheduling latency and jitter, in which case Informative +1).
"WinNT is better" -- flamebait -1
"Win98 is better" -- no moderation, since people are laughing to hard to select from the list and click the button.
Zope is a framework, PHP isn't - it's a language plus a set of modules. Zope's language is Python, for what it worth.
From what I know, Zope is suited for large to very large projects, with well-defined standard site structure, while using it for small project could be a great over-kill. Also a concern is that it's way slower - just because of a complication involved.
-- Si hoc legere scis nimium eruditionis habes.
Commenting as a long-time Perl coder who likes a Perl a lot, but who has recently discovered PHP and likes it, too:
...)
DBI is database interface independent
PHP not
Bingo. This IMO is the biggest problem that needs to be solved with PHP. It supports a wide variety of databases with APIs that are very similar in function, but they're all different. We do a lot of work with MySQL and Oracle around here, and with Perl/DBI you can often go from one to the other with no changes at all (except the connection string). It couldn't possibly be easier.
Something like DBI could probably be done in PHP. It would be an enormous advantage.
Great Perl Module (DBI, CGI, IRC, FTP,
Few library un PHP [sic]
That's not true. The standard distribution in PHP has far more libraries than I'll ever need. To be sure, it's not nearly as big as CPAN, but as you pointed out, Perl is more general purpose than PHP. And note that you don't need something like the CGI.pm module (an HTML-generating library) in PHP. You're programming right into the HTML file anyway, that's the whole point.
Always keep a sapphire in your mind
Is it just me or does ASP rarely give a useful error message when it barfs? It's often something like:
"Error 8000AFDZ"
???
WTF
I'm using ASP with JScript. Decent error messages are enough to win me over to PHP. (Not too mention the fact that PHP has docs which are not "a complete work of fiction", and the fact that you don't need to cough up money for 3rd party plugins to do the most simple stuff.)
Go PHP!
ok I'll stop ranting now.
--
Simon
Who is busting for PHP4.
As I understand the QPL allows derivitive works and modifications provided the original liscensce holders gain the right to redistribute your modifications.
AND
Any modifications you make must be distributed as a seperate patch file.
The first clause doesn't seem to cause the community any difficulty (so some people can sell it big deal)! However the second clause is very bothersome. Suppose KDE or PHP really catch on and people decide to improve/extend the base libraries. These products could still be around and kicking 10-15 years from now just like X is. But by that point the liscensing companies may very well have faded from the picture.
This leaves us with a huge bloated mess of patch files at the core of an expanding system making it difficult to work with. Now I understand the desire of the company to keep their product name undiluted and to recieve patches so perhaps the minor modification that the patches must be made availible on request (you can always go back and diff it) but the modified source may be distributed UNDER A DIFFERNT NAME!!
Small modification but it could make a big difference in the longterm future of some products.
Marriage is the "pseudo-ethics" that cloaks the messy truth of sexuality in the raiment of propriety -- it's "Don't Ask,
:-)
(old joke)
--------------------------------
I am also a long time perl coder who recently "discoverd" php3.
There are two things that I really miss in php, as you pointed out, DBI rocks. And the second thing is that the regex implementation in php3 is useless (more or less). The array and hash types in php3 is lacking the beauty of the perl version.
Otherwise I kind of like php3 , it's really "easy-to-use", and supports the most stuff you would like to do in a web application. You get results fast and easy.
The biggest disadvantage of perl is that is harder to get started in, it's to much of a "smorgasbord", you don't know what to pick and when you get started your plate is full before you get to the really good parts.
BUT, if you are a profesional staff with time. knowledge and experience building something big that is suposed to be extendable, maintainable and contain all the bells and whistles I would suggest to go for perl. Take a look at mod_perl and all the zilions of addons that is available and you will understand why.
A shameless plug for phpbuilder.com. No, it isn't mine, but it gets its connectivity from the same ISP I use. Those people who have been complaining about a lack of PHP source code and information, you should visit this site.
Isn't this the same thing that Larry Wall has been doing with Perl for years? As I understand it, you can license Perl under either the GPL or Larry's own Artistic License.
Weblogging Considered Harmful:
One license, the GPL, allows anyone to take it and modify it, do whatever, so long as they release source to their mods.
right...and the PHP License requires you to get permission to redistribute php or works derived from it. so...isnt that kinda contradictory to the GPL?
or maybe its only contradictory if both licenses are taken to be "active". the licensing page does say to pick *ONE* license. i guess that would clear things up.
--Siva (doh...licenSe, not licence)
Keyboard not found.
Keyboard not found.
Press F1 to continue.
Why make such a big deal about it? If it is free and open source and a good product then why should we care what the license is? Or is there something I am missing out.. I started using PHP3 since way back and I have used it in several hundred websites and will continue to use it even in the event that (God Forbid) I would have to pay for it.
Movie News - "Entertainment news, bitch!"
We've done a few PHP sites here at TekLab, and live by it as a platform for building smart web applications.
One of the best examples I can think of is my Totally Free Sample Library, which can be accessed here:
http://www.samplelibrary.net/
We developed this site using totally free tools, and it's a shining example of the power and flexibility of the PHP/Apache combo.
The most difficulty I have with Apache/PHP though is explaining to my clients that yes, in fact, this amazingly powerful platform that I want to use for their projects *is* free, and it is fundamentally a better choice than IIS/ASP for all of their work. They just can't believe it.
Then I show them what we've done with SLN, and it's pretty much a done deal...
; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
I just wanted to make a quick response to the various voices who claim that PHP cannot be used for large projects. I think this is a very misguided viewpoint, and in my experience PHP is a terrific platform for delivering a large site.
I wrote almost all the code for Catalyst Recruiting - a site that helps small, startup, and nonprofit companies find top college students to hire. It's not a gargantuan site, but it handles a fair amount of traffic with a high degree of customization and 99% dynamic content. It was built entirely on Linux using PHP3 and MySQL in roughly two months.
Now, PHP3 has some limitations, and it's OOP model leaves something to be desired, but I have found that it makes it pretty easy to use objects to abstract away the interface from the logic of the program. This enables me to work pretty seamlessly with several design people who don't know PHP from their own ASP.
Of coures, when PHP4/Zend hits, hold on to your hats. Not only will our site be able to render pages with almost the same speed as static content, but the expanded object model will really make life easier.
PHP is a great language for rapid deployment of custom software. I'm so pleased with it, that I'm thinking of open-sourcing the Catalyst software as an add-on to either PHP or PHPLIB. Anyone think that'd be a good or bad idea?
Eric
Can your IM do this?
Yeah, I dig it... functionality first, then we'll make it pretty...
; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
Well, the docs say that the result of MOD has the sign of the divisor. This makes sense. However, the result of -3 mod 7 is returned as -3. I ran into this when trying to do day-of-the-week calcuations.
I know about the custom tags -- they don't help when you want to do evalution in the place where you can use built in functions. For example, you can write:
<CFSET foo = StructFind( bar, baz )>
But not:
<FSET foo = MyFunction( bar )>
Furthermore, custom tags can't return values, unless you play silly games with variable names and scopes that really smells like a hack to me. The reusability they provide is at best adequate, I've found.
I'll agree that CF has it's place -- it works as a good "plug-dynamic-values-in-here" engine. But I really can't recommend it for functions that involve more than a very small amount of complexity.
Anyway...I could rant for a while about ColdFusion, and so could some of my co-workers. We've done some pretty hairy projects with it, and in the end, have determined that it really wasn't worth it. I'll stand by the statement that anything that can be done in ColdFusion can be done as easily, as stably, and as quickly by PHP. Not to mention, less expensively, and free-as-in-speech-ly. Which is why I say PHP is a better ColdFusion than ColdFusion.
pooptruck