PHP 5 Released; PHP Compiler, Too 524
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?"
So it is out... (Score:3, Insightful)
Re:So it is out... (Score:4, Funny)
The answer is, "Depends on if you wrote PHP5 or if you just write with it."
Re:So it is out... (Score:3, Interesting)
Goodbye Perl? (Score:3, Interesting)
Re:Goodbye Perl? (Score:5, Interesting)
It's too bad the compiler is $399 per year, and only currently available on Linux. If it was a little less, and not licensed annually, I'd be uninstalling a lot of other development tools right now.
Re:Goodbye Perl? (Score:3, Funny)
Re:Goodbye Perl? (Score:2, Interesting)
It started out as a prototype but worked so well and fast that it stayed.
Re:Goodbye Perl? (Score:3, Interesting)
Re:Goodbye Perl? (Score:3, Funny)
Your firewall blocks traffic from 127.0.0.1 to 127.0.0.1? You're hard core, man.
Re:Goodbye Perl? (Score:3, Insightful)
Re:Goodbye Perl? (Score:4, Interesting)
I've been using Perl for around 10(?) years and while I appreciate its regex engine is faster than PHP, and the CPAN modules offer things PHP doesn't have (at present), you can put almost any web app together far faster with PHP than Perl. IMV this also goes for most database driven shell scripts.
Re:Goodbye Perl? (Score:3, Interesting)
If you properly abstracted your db layer in the first place, then you're safe to use mysql_* without having to worry about rewriting large sections of your code later.
Pet peeve: all these open source PHP applications that embed every single fucking query right where they use it. Inheritance works great for this, and I've got an object model put together that solves this problem nicely. Two classes, one that you derive from. That one you call for your data, whatever you need. It (dbPage or dbCategory, d
Re:Goodbye Perl? (Score:3, Interesting)
Re:Goodbye Perl? (Score:5, Insightful)
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.
Re:Goodbye Perl? (Score:4, Interesting)
As far as PHP for shell scripting. I use it when I just need something quick. I'll sometimes go back and change it to a different language when I have time.
To make a long post short...I'm estatic about php5 being released!
Don't you mean "Goodbye PHP"? (Score:3, Interesting)
(Hurray for being modded as flamebait!)
Re:Goodbye Perl? (Score:5, Interesting)
Re:Goodbye Perl? (Score:5, Informative)
Re:Goodbye Perl? (Score:3, Insightful)
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 reg
Re:Goodbye Perl? (Score:5, Funny)
PHP is more like a more friendly. Allows you to fumble around and then gives you informative errors. Kind of like your first Girlfriend.
Well, the first week of her anyways.
Re:Goodbye Perl? (Score:4, Interesting)
Of course, she could be like Oracle, where she knows you're not doing it right, but has no suggestions whatsoever on where the problem might lie or how to fix it.
Perl can be difficult to debug. It's one of those "wide or deep" questions: you can have an extremely simple syntax, and require a ton of code to describe what you mean to do, or you can have a rich syntax and say it more succinctly (even more descriptively, given skill on the part of the writer and the reader).
All languages are a tradeoff. Glad PHP is where you want to be on that spectrum.
Re:Goodbye Perl? (Score:3, Insightful)
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.
Why Perl is still the Regex king (Score:5, Insightful)
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..."
Re:Why Perl is still the Regex king (Score:3, Insightful)
Re:Why Perl is still the Regex king (Score:5, Interesting)
If you've ever been programming Python and wished it was cleaner and less "arbitrarily verbose", you'd like Ruby. If you wonder why Python arbitrarily makes you say "len(str)" instead of "str.len()", you'll like Ruby. If you wonder why Python makes you type "def foo(self)" instead of just "def foo", you'll like Ruby. If you wonder why you should type verbose hard-to-read stuff like "[f for f in n if f < 4]" instead of something like "n.each { |f| f<4 }", the give Ruby a whirl.
If you ever programmed Perl and wished it had an actual object model, so you don't have to do stuff like "UNIVERSAL::isa($val, 'FooClass')", but can just treat each variable the exact same way like "foo.kind_of? Integer" you'll like Ruby. If you hate how Perl lets you make objects that are hashrefs OR arrayrefs OR scalarrefs, making extension of existing classes utter madness, you'll like Ruby.
If you like adding your own methods to base types like Arrays, Hashes, Integers, etc., you'll just go nuts with Ruby.
If you like distributed programming you'll get a kick out of DRb (comes with Ruby).
Do you need extended your languages with external C libraries? You will positively, absolutely shit yourself three times when you try out Ruby/DL, which lets you extend Ruby with arbitrary C libraries at run time without any compiling or setup.
If you wonder why Java takes 3-5 lines of code just to parse an XML file or set up a loop you will find Ruby quite a change. And REXML is the most lightweight easy to use XML parser I've ever used (PHP5's new parser comes *close*.. but PHP is not Ruby).
If you like writing code FAST without worrying about heavy syntax or arbitrary design choices, you'll like Ruby. If you like passing anonymous code blocks to your functions like SmallTalk, you'll get a kick out of Ruby (and if you don't do that, learn, it will make your programs tighter). If you are into agile programming and merciless refactoring, you'll like Ruby (unless you are a lover of lisp macros, then you'll find Ruby blocks a little limiting, can't help you there).
If you use a Mac you'll like it because Ruby is pre-installed.
If you do MVC-type web apps, your mouth will hang open when you use the highly dynamic Ruby on Rails (how do you add a new object to your app when you add a new database table? ONE LINE OF CODE. How do you add a new field to your object when you add a new column to the database? DO NOTHING.)
Ruby is the only language I can say with a straight face is "beautiful" AND useful.
So unlearn a couple of those languages and try Ruby!
Re:Why Perl is still the Regex king (Score:5, Informative)
Re:Why Perl is still the Regex king (Score:3, Insightful)
If you know all those other languages, you probably don't need much to learn one more. Come on! The first one's tricky, the second one's annoying, all the rest are easy.
Hell, I can't remember the last time it took me more than 15 minutes before I could code a new language (and I'm not talking 'hello, world' either).
Wait a minute, you count VB, Bash, and SQL as programming? Maybe that explains it all. Some of us consider those UI.
Let the PHP flame war begin! (Score:2, Funny)
While I use PHP quite a bit, I think I'll wait a few months / versions befor deploying this...
Re:Let the PHP flame war begin! (Score:5, Funny)
Thanks PHP team (Score:3, Informative)
Thanks again PHP team!
PHP is moving in the right direction (Score:4, Insightful)
Remember, nobody's forcing you to upgrade that site running perfectly well under php4, and you probably shouldn't.
Re:PHP is moving in the right direction (Score:5, Informative)
Bottom-line: Very few people will have problems doing the upgrade. Of course you should thoroughly test your site before upgrading.
Re:PHP is moving in the right direction (Score:5, Interesting)
I can vouch that, to the extent that I've been trying it, all of my PHP4-developed code has been working fine with the PHP5 interpreter so far. As andig suggests above, I suspect that only a few cases where someone relies heavily on 4.x "quirks" will cause a problem.
I was slightly disappointed to find that the "native Java/PHP integration [php.net]" support was quietly dropped from PHP5 - I'd been wanting to play with that. Oh well.
Re:PHP is moving in the right direction (Score:5, Informative)
Re:PHP is moving in the right direction (Score:2)
Re:PHP is moving in the right direction (Score:2)
Re:PHP is moving in the right direction (Score:5, Informative)
Cross Platform? (Score:2, Interesting)
Re:Cross Platform? (Score:5, Informative)
Check out the downloads section [php.net] at php.net for Windows binaries and *nix source, and here [apple.com] you can find more details on PHP under Mac OS X.
As for the compiler in the story, I haven't tried it before so I don't know.
Re:Cross Platform? (Score:2)
However, a few months ago I moved an (admittedly small) webapp from Windows apache to Linux apache, and the only change I needed to make was switching all my include backslashes to frontslashes. Which I should have done to start with, since frontslashes work on Windows.
So that cross-platformability seems pretty reliable.
Re:Cross Platform? (Score:4, Informative)
Re:Cross Platform? (Score:2)
the past is the future (Score:5, Insightful)
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.
Re:the past is the future (Score:5, Funny)
Re:the past is the future (Score:3, Interesting)
Re:the past is the future (Score:2)
PHP's far from the first language to have an interpreter and get a compiler, far from the first language to accept extentions, and far from the first language to be cross-platform... none of these are new concepts.
Re:the past is the future (Score:2)
Generally, it refers the type system; i.e. the language is dynamically typed (as opposed to statically typed).
Not to be confused (though it often is) with weak typing.
PHP5 (Score:5, Interesting)
I am certain this is not the last we'll hear about PHP5 on Slashdot, yet I am only hoping that it's creative/cool stuff, and not security problem/exploit stuff.
I can't wait to see what kinds of changes I can make to my content management system [sf.net] that PHP5 will bring.
PHP Object Model (Score:3, Interesting)
The bigger question is compatibility. Will older code be ok? When will mainstream hosts migrate to the newer version? It'll be scary to find systems borken because of version updates.
As for a compiler, I'm not sure I'm comfy with the idea. Always figured if you wanted to write code for native compilation, you'd hack in C or maybe C++. Not that PHP wouldn't have its uses...as PHP is really handy and greatly increases the speed of development.
PHP compiler is nice, but expensive! (Score:5, Informative)
$400 for the license, which is only good for one year. After that, it won't compile until you renew.
Doesn't seem worth it for the casual hobbyist...
Re:PHP compiler is nice, but expensive! (Score:2)
Re:And the benchmarks (Score:2)
Compiled vs Cached (Score:5, Interesting)
mmCache is OSS and free (as in beer), which is a big plus in my book.
-Charles
No it wasn't... (Score:3, Informative)
$$ for compiler (Score:2, Interesting)
Re:$$ for compiler (Score:3, Informative)
And if they can do it, why can't we... how long till GCC compiles php code?
Re:$$ for compiler (Score:3, Interesting)
Not really. Most people interested in compiled PHP are working in the "enterprise" market. $400 for a commercial compiler is not that bad.
And if they can do it, why can't we... how long till GCC compiles php code?
I think most people who have the skills to write something like a compiler generally want to make a living from their work, hence the
Re:$$ for compiler (Score:4, Funny)
You mean except for those dirty commie gcc guys!
Re:$$ for compiler (Score:5, Interesting)
The price is nothing. If you're running a site that requires compiled PHP, $399 is a joke. The thing holding the compiler back isn't the price, it's the lack of Solaris support.
Awesome! (Score:3, Funny)
A Book Recommendation (Score:5, Informative)
And the compiler is only $399.00! (Score:2, Troll)
What a deal, what a deal!
not trying to start a flamewar (Score:5, Interesting)
I had avoided Python for a long time, as I really disliked (and still do) the indentation-matters issue. But besides that, and its own set of quirks, it's a really great language, and for larger projects I have trouble even thinking about going back to PHP.
I think the biggest selling point to PHP over other solutions such as Python is that its simple. You don't have to make a whole of choices. For example, with Python you have a large number of packages to choose from: Zope, mod_python, twisted.web, Python CGI, and a bunch of variants on these. While choice can be good, it can also be overwhelming (like how do you know which package to go with until you've tried them all?).
I think I am not alone with some of difficulties I faced with PHP. So while it's great to hear that PHP has fixed many of its bugs, I think its worthwhile for people to also look at other solutions out there.
Just my $0.02.
IonCube (Score:3, Informative)
(no, I have no affiliation to them)
Re:IonCube (Score:3, Informative)
PHP5 is out... (Score:4, Funny)
Damn kids.
"Student Suspended OverSuspected use of PHP" (Score:5, Funny)
Too late... [bbspot.com]
Dynamic languages? (Score:3, Interesting)
Re:Dynamic languages? (Score:5, Informative)
Sometimes, it also implies things like dynamically extensible type definitions at runtime, automatic memory management, and support for various functional-style features such as closures.
Compiling a dynamic language to machine code is usually a challenging problem.
PHP 5 Tutorials (Score:4, Informative)
PHP 5 Section on Zend.com (Score:5, Informative)
I also posted the first chapter of my PHP 5 book in that section which gives an overview of what's new in PHP 5. This book will be part of the Bruce Perens series of Prentice-Hall and will therefore be open-source and freely accessible to anyone.
Yahoo Store, of course, is in LISP (Score:5, Informative)
LISP's parentheses turn everybody off, including me, but the data structures really are a win for tree-like applications.
Parens don't turn everybody off (Score:3, Informative)
The future of programming languages: LabView (Score:3, Interesting)
Many people haven't heard of LabView [ni.com], even though it has been around since the late 80s. It runs on Windows, Mac OS, and Linux. The premise behind LabView is there is no such thing as written code. Instead of code, applications are literally drawn by dragging variables (controls, indicators) onto the block diagram and wiring them together. For instance, if I wanted to add 1 and 2, I would create two integer objects with respective values, find the addition function, and wire them together to an output (indicator - think text box). I have written entire graphical application suites/analysis tools in a matter of days and weeks instead of months (had I written them in, say, C or Java or $your_texT_based_language_of_choice).
The only issue many will have with LabView is that it is expensive. It is also closed source, but hey, so is Java. Anyone interested in rapid application prototyping/development or digital/analog instrumentation should check out LabView.
Re:The future of programming languages: LabView (Score:3, Insightful)
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 abstractio
Re:The future of programming languages: LabView (Score:3)
This has been coming up regularly since the 80s. I've seen apps like this, and even tried writing my own version, and recently there was a fad for UML->code compilers. The fact is that it's not going to happen. It's far quicker to type than it is to draw. Also you can fit a lot of code on one page making it easier to debug, as opposed to scrolling through vast screens of visu
Unicode Any Better? (Score:3, Interesting)
PHP is dead. Long live PHP!
Now that I have that out of my system. Does anyone know if PHP5 Unicode is any better than PHP4?
Admittedly I've done about 10 total minutes of PHP coding in my entire life, but I do follow it as closely as possible when I'm not thinking about Perl. I always got the impression the Unicode working in PHP4 was a little lacking compared to the latter versions of Perl.
For example: PHP does have limited unicode support [randomchaos.com] and Joel on Software [joelonsoftware.com].
PHP and Unicode (Score:3, Informative)
The reason is that PHP's biggest strength is that these days, you can get a PHP-enabled host for virtually no money. However, most of these installs run a standard PHP, some even a locked down one.
The consequence is that anyone who wants to de
I hate to say it.... (Score:3, Informative)
Just to clarify this, consider the following:- ASP.net's been precompiled since the 2000 beta, and it's been production ready for years. The C# language is also fully documented and is a public standard ratified by the EMCA.
PHP5, however nice, is treading old water, and in terms of functionality is still lagging behind even Java/JSP. The whole reason I'm assuming people stuck with PHP4, rather than move to something more robust that provides this kind of capability, is that:-
1) They're apathetic about new technology.
2) If the old language does what they want, why upgrade. It's *Personal* Home Page, after all, not corporate homepage.
3) Why make things more complex, for very little benifit.
Performance wise, the compiled version advantages are fairly insubstantial, and 99.9% of the new stuff they've added could have been done in other ways using the existing language.
The whole thing seems pretty stagnant, and I'm guessing there's a small chance that the PHP guys are stuggling to find their own space between the land of true pre-compiled OO languages and the interperated world that lay behind it.
I've worked with PHP4 and ASP.net since both of them were betas, and if PHP wants to be a serious consideration for large scale development, it'd better decide which side of the OO fence its on, and stay there.
Re:I hate to say it.... (Score:3, Informative)
2) If the old language does what they want, why upgrade. It's *Personal* Home Page, after all, not corporate homepage.
3) Why make things more complex, for very little benifit.
You forgot:
4) Because it works.
I've been the admin for Apache/PHP servers for close to 6 years now and I've not ever had PHP cause a single crash. You can have complete idiots writing PHP scripts and you don't have to worry about them taking down you're entire server with a bad piece of cod
Can this be a JIT compiler? (Score:3, Interesting)
SOAP (Score:3, Interesting)
Hard to imagine what the OS crowd will do with a blockbuster feature like this generally available. SQLite will improve the xcopy deployment compatibilities of simpler apps and SimpleXML is the best xml API i have seen so far in any language. On the OOP front we get exceptions which will finally unmangle the error systems of most complex php web apps which usually accounted for a big chunk of the code.
Anyways, php is cutting edge again.
Perl2Exe, PAR... Perl rocks.. (Score:3, Insightful)
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!!!
Re:Perl2Exe, PAR... Perl rocks.. (Score:3, Informative)
Those are not compilers, they just bundle the interpreter and needed libraries into package.
This could be so exciting... (Score:5, Interesting)
...but for some reason I'm rather disinterested.
Don't get me wrong; I've been doing PHP coding for a while. But the fact of the matter is that the more I code in PHP, the more I dislike it.
Granted, the new OOP features in PHP5 are a good thing; hell, they should've been in there a LONG time ago. And exception support has me jumping for joy.
But where for the love of all that is holy is support for namespaces? I mean, sure PHP has a ton of really handy extensions, but I am getting so sick to death with typing underscores that I'll be happy man if the world suddenly decided that underscores were bad and removed them from all character sets (oh, and keyboards) entirely.
And I've also come to the conclusion that the standard PHP api can't quite make up it's mind whether it's supposed to be emulating C, or maybe some other language. Some array functions are prefixed by array_. Some aren't. Some have their arguments in the reverse order that almost all the others do. It's a mess.
PHP is a nice language, good for beginners. But it's complete lack of namespaces, half-arsed support for functional constructs (damn I hate having to write callback functions out seperately when they're one liners!), and schizophrenic api are slowly pushing me towards more well thought-out languages like Python.
Sure, Python's "thou shalt indent" system annoys me a lot of the time, but other then that it's just a clean, logical language. Unfortunetly, support for it on web hosts seems to be all but non-existant.
Seriously, if the PHP devs really want to bring PHP up a few notches, they need namespaces, and to standardize the API naming conventions. I shouldn't have to constantly open up the PHP manual to work out whether the array sorting function has array_ out the front or not.
Still, it's a nice set of improvements, so credit where credit is due. Kudos to the PHP team.
dynamic languages (Score:3, Interesting)
No more and no less so than they have ever been: dynamic languages are a good choice for many, but not all applications. And dynamic languages have been enormously popular for decades, with far programmers using them than using static languages; PHP just follows in that tradition.
What is more interesting is the emergence of dynamic languages which use static type systems by default: in their runtimes, Java and C# have more complete and better defined dynamic features than Lisp, but they still give the user a simple static type system by default. It remains to be seen whether that gives you the best of both worlds or the worst. Fortunately, their runtimes are well-defined enough that one isn't limited to the specific choices that the currently popular languages running on top of them have made.
my experience with php (Score:4, Interesting)
I ran into some awesomely dumb stuff. I mean "what are they smoking" stuff.
Brain dead parser: First of all, this requirement to put everything in tags or whatever brackets you have defined. What is this, javascript? (and even javascript doesn't need it if you use src="foo.js"). That alone, not so bad, but the parser would easily choke on any end bracket construct ANYWHERE -- in a string, in a comment, etc.
Flat namespace. OOP completely unused in extensions. Since PHP can easily call functions dynamically by name, and we have PEAR now, I consider the problem solved. No worse a hack than perl's OOP implementation, really. But I had other problems with OOP...
Pass-by-value: PHP4 would pass objects by value. Which is actually great if I want such value-type, but 99.9% of the time, I don't. What made matters worse was PHP's twisted notion of object identity -- it had no operator to test it. Equality comparison operators were always by value, and either "shallow" or "deep". I had to explain the concept of object identity, and for my trouble, got the '===' operator
Second-class-language attitude: I got choice responses from Zeev himself about how PHP is never intended to be more than a "web language" (apparently meaning limited to trivial scripting, because the web apps I use sure aren't trivial). PHP can be and has been used for powerful things, but I don't see writing a caching bulk DNS lookup service that tests against multiple RBL's using PHP if I can't get a serious contender to Net::DNS because PHP is "merely a web language" after all. I used Perl for that, then switched it to Python (stackless was ideal for this job) and then dropped it into the object publisher in mod_python. Painless. There is no such thing as a "web language", behind every web app there should be a *real* language.
Error handling: Nonexistent. Got an error, it would print a traceback to the output if you were lucky. Syntax errors would simply die without any useful diagnostic. No eval (well there is, but it would also just die on syntax errors). I've seen structured exceptions in C, but PHP's was awful. Awesomely brittle.
Hopefully PHP5 is migrating most of these warts away from PHP4. Perl certainly still has its own problems (mod_perl 2.0 is still not in a stable release state) so it's not too late for PHP among current perl users.
Re:PHP Compiler (Score:4, Informative)
The compiler generates binary code that is executed directly by the CPU, avoiding the intermediate process of compiling to bytecode and running in a virtual machine
That's a true native compiler to me.
Re:Am I the only one... (Score:5, Informative)
The products they produce to support the development of php the closed source.
You do not need to touch, use or otherwise dirty your poor soul with any "non-free" software to use php.
There is nothing wrong with this business model, get over it.
Re:Am I the only one... (Score:5, Interesting)
However, it is right to be watchful (not necessarily concerned) when the core of an open-source app is created and driven by a for-profit company. Since they sell a lot of surrounding support applications to make their money, they are clearly driven at some level to pay for that development. At the very least, it means that any really good idea that they have will get turned into a commercial product instead of rolled into an open source solution. Again, perfectly fine business model, but not awesome.
The other thing it does is that there is a subtle but probably powerful pressure pushing other developers working in the PHP space to consider not working there, because they will by definition start out behind this core company. It wouldn't hold off a determined company, but if a determined company began to come into the mix, it would be surprising if the core company didn't somehow use the fact that they are so essential to their advantage somehow. Without competition they can be magnanimous, but with it much less so.
At any rate, I'm just pointing out that there's reason to keep an eye on it, even if nothing ever comes of it. It's also important to encourage more businesses to adopt this model so something as good as this can come along, and it's important for them to be watched by others to make sure they don't abuse it. The lessons of Microsoft, although in a different league entirely, are too strong to ignore.
debugging (Score:3, Interesting)
Re:Am I the only one... (Score:3, Interesting)
This is part of the problem. While this isn't in itself a terrible practice, it does leave esoteric developers who prefer other [wikipedia.org] different [wikipedia.org] architectures [wikipedia.org] out in the cold.
Exactly. It's not that we always want free beer, we just like to make sure that we can drink as much as everyone else. Now, if you could request a cross-compilation for a different architecture at no
Re:Am I the only one... (Score:4, Interesting)
Many useful PHP tools are open source. From the bytecode compiles such as APC and MMCache, debuggers (APD and XDebug).
I see tha fact that there are some companies out there providing commercial tools for PHP developers as a good thing(tm).
Re:Am I the only one... (Score:3, Funny)
AUGH! And now I've violated your copyright by creating a derivative work by replying to your post without permission!
(I'll stop now. It's just too easy to make fun of the current interpretations of "Intellectual Property"...)
Re:Compatible? (Score:3, Informative)
The only situations where you're likely to hit problems are in reassigning $this in OO code, for example if you had constructors which would go
$this = new My_Error_Class();
Which is no longer supported.
Re:Compatible? (Score:5, Informative)
Yuck.
As a person who codes entire 20,000+ line application libraries in PHP and has been watching the development of PHP 5 very closely, there are a lot of decisions the PHP developers have made that make me very hesitant about going anywhere near the new PHP version.
As an aside, the PHP developers have decided to make SQLite, a light file-based database engine, the default session handler. Even with all file locking turned off, this is at least 4 times slower than the current system used by PHP 4. Of course you can change this setting back to flat session files, but the fact this is their default should say something about other decisions they've made. This setting itself makes especially no sense to me, as all session variables go into the $_SESSION superglobal as associative array keys - there is absolutely no benefit to using a database-enabled flat file for this, as opposed to a regular flat file. It's as if the PHP group were excited about sqlite and tried shoving it into everything.
Just read the changelog very carefully. If you're already using PHP, and have gone deeper than casual use, your applications *will* break - especially if you turn on PHP's strict mode which kills backwards compatibility with PHP 4.
wrong (Score:5, Informative)
i've been using php5 since the first beta and afaik it has never required overloaded child methods to require the same number of arguments as the parent class.
<?
error_reporting(E_ALL|E_STRICT);
class SomeParent
{
function __construct($var1, $var2)
{
echo "Parent: $var1, $var2\n";
}
}
class SomeChild extends SomeParent
{
function __construct($var1,$var2,$var3)
{
echo "Child: $var1, $var2, $var3\n";
}
}
$x = new SomeParent(1,2);
$y = new SomeChild(3,4,5);
$z = new SomeParent(6,7,8);
Parent: 1, 2
Child: 3, 4, 5
Parent: 6, 7
*/
?>
as for sqlite as session handler, it is not the default, nor has it ever been the default.
there was a patch to ALLOW it to be used as a session handler, by setting session.save_handler = sqlite in php.ini
but if we look at the php.inis in the php5 distribution:
[solidox@server150 php-5.0.0]$ cat php.ini-*|grep "session.save_handler"
session.save_handler = files
session.save_handler = files
both dist and recommended use flat files as the default session handler.
Re:PHP - ASP Showdown (Score:3, Insightful)
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, P
Re:Thread Safe yet? (Score:5, Informative)
Re:Woohoo! Now only 3 years out of date! (Score:3, Insightful)
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 the