PHP 5 Released; PHP Compiler, Too
TheTomcat writes "After years of anticipation, PHP 5 was released today. This release represents a milestone in the evolution of PHP. It sports the new Zend Engine II, a completely re-worked object model, and many many new features. Check it and the changelog out."
In other PHP news, remote_bob writes "There have been many attempts, like
BinaryPHP
and PASM,
but finally there is a complete
compiler
for PHP. The Roadsend compiler produces standalone, native executables, and supports the entire PHP language (but not all extensions). It uses
Bigloo Scheme
to do its job, a variant of Lisp, the language that
Paul Graham writes about.
Benchmarks say that performance is pretty good. Is this another sign that dynamic languages are the future?"
...but who will use it for another year or two?
~Necromutant
Is this another sign that dynamic languages are the future?
Yes.
Remember, nobody's forcing you to upgrade that site running perfectly well under php4, and you probably shouldn't.
Is this another sign that dynamic languages are the future?
I'm starting to think there are no new ideas any more, just re-hashes of old ideas. Unix, almost 35 years old, looks to be once again the wave of the future. LISP is still teaching us lessons. And the command line is still the most powerful sysadmin tool we have.
Perl is still an excellent option IMHO. For me, the most important feature of a language is the amount of support available. Perl has so much documentation scattered around the web, it's usually very easy to find an example or get help with a problem. Also, the books are now all on version 2+, meaning most of the bugs have been worked out. With my Safari access, I have years of resources at my disposal. While I appreciate all that PHP offers, I still haven't been convinced that it is good enough to make me switch. The resources out in the community are far too attractive for me to fight my way back up the learning curve.
Plus, is there any greater comedian in the community than Larry Wall?
Any decent language has full PCRE support these days. Perls days as regular expression king are in the past. Sure it may have set the standard for how it's done, but now it's no longer a selling point. Plenty of other nicer languages exist.
C has full PCRE support. That doesn't mean its regexp support is royal.
One of Perl's advantages is just how tightly integrated into the language regexps are. I haven't seen PHP5 yet, I hope it's better than PHP4. I'm just saying that PCRE support does not a good regexp language make.
Plenty of other nicer languages exist.
The biggest problem with PCRE in PHP is the escaping problem. PHP needs something so you don't end up with having to type \\\\ to match a backslash.
First of all having PCRE support and having regular expressions heavily integrated into the language the way Perl does are completely different things. So when I need to do log parsing, I do it in Perl, not Python, not PHP. It is simply easier and things fit more nicely for me (I use Python and PHP for at least as much development as I do Perl, but Perl still has its uses).
Second Perl has some nice features that PHP and Python lack. Of course PHP has some nice features that Perl and Python lack, and Python has some nice features that..... You get the point.
Even Javascript has some nice features if you are scripting other components (i.e. in a XUL application) but the next time I ask someone how to itterate through a hash table in Javascript, they had better not say "you don't..."
LedgerSMB: Open source Accounting/ERP
Except the multithreading argument every point in your list is wrong...
Compiled PHP won't be much faster IMHO. If you want something compiled why don't you write your web apps in C? One of the main points about using an interpreted language is that your app can be changed quickly on the fly which is often nessicary in web development. Doubtful that people are going to start compiling PHP apps anytime soon.
/flame on
PHP for shell scripts? That's just strange. ick.
PHP 5 still lacks namespaces, that alone is a good reason not to switch. That and CPAN (and no before you mention it, PEAR doesn't come anywhere close)
Since I always get the same replies everytime one of these posts comes up I'll answer them all now.
I use PHP everyday, its part of my job (sysadmin/web-developer). Have been using it for 4 years. At first I thought it was alright, but the more I've used it the more I loathe it. I find it inconsistant and I find at its core everything that goes against what a well designed language should be.
Perl code is not ugly unless you make it ugly. You can make C or PHP ugly as well.
Perl can be used in projects with multiple developers, I work with one other developer on a regular basis, sometimes two. At the beginning of the project we plan core modules and set APIs and coding style, much like I would expect anyone would do for any language.
IMHO and experience mod_perl is faster than PHP especially in larger apps.
The Anti-Blog
The problem is i can type "x = 1 + 2;" allot quicker than i can click to create two objects, click on each and give it a value, create a 3rd object and draw two lines to wire it together. Also whenever i use a block system (spent some time with simulink/matlab at uni) i always start trying to make the boxes line up and look neat, where as coding is just a matter of pressing tab a couple of times.
This comment does not represent the views or opinions of the user.
Ok, apart from the fact that you're obviously trolling, I don't really have a comment on most of your points as I've never used ASP, and I've used PHP enough to know that I hate it and everything it stands for, but I still have to question at least one of your points - "ASP includes database connection pooling, something that costs many thousands of dollars on Unix"
That sounds like you're quoting a marketing guy with no idea what you're talking about.
Sure, ASP may contain DB connection pooling, and sure, PHP may not have it, but "Costs many thousands of dollars on Unix" is the most ridiculous thing I've ever heard.
Show me this many thousands of dollars worth of "Database Connection Pooling On Unix".
Unix has nothing whatsoever to do with it. PHP runs in IIS quite nicely. And even if PHP was a Unix specific thing, there's nothing hard or expensive about connection pooling, and there are free libraries implementing it in just about any language that can access a database.
Advanced users are users too!
I don't want to have to deal with every exeption that I am not interested in!
Sure... just ignore the errors... it'll never happen anyway, right?
Senior Programmer
Davenport, FL USA
"What company do you work for?"
"A major one"
...
As a long-time PHP developer, I have to agree with you somewhat. PHP5--Woohoo!! Ohh, wait... No namespace support? (Arggh... of all features to leave out...)
;), but at least PHP puts them all together easily at your fingertips.
All the new features are sort of the stuff you would call a 'given' for object-oriented programming. Nice to have, but nothing to get really excited about.
Really the things that I found more interesting about PHP were all the system-oriented capabilities developed from version 4.3 onward, such as streams, sockets, direct I/O, etc... Of course, all these are givens in some languages too
The other cool things about PHP are the really dynamic things you can't do in Java, such as variable variables ($$varname), variable function calls ($function_name()), and the extended features for variable interpolation in strings. Also, features like array_map, create_function, and the overload extension are quite cool.
But yes, it looks like Perl 6 is going to up the ante big-time. Interesting to see where PHP goes in the interim, though.
I see so many posts about how this would make them switch from perl to php.. but perl has had this for ages...
http://www.indigostar.com/perl2exe.htm
http://par.perl.org/
HEH!!!
-- . . ramblin' . . .
Maybe, just maybe, there's a reason for that.
While "graph" programming may be useful for data flow programming, it's absolutely useless for general purpose programming. For general purpose programming the devil's in the details and introducing a "graph" programming language just moves you further away from the details without actually giving you control of the details (see Joel Spolsky's article about "leaky abstractions" as to why this is a bad idea).
HAND.