PHP5 Coming Soon
Grip3n writes "PHP5 is well under development and a beta is expected out by March 2003 and released summer 2003. One of the more notable improvements which many PHP developers desired is a substantial improvement in PHP's performance. This is due to a new object model PHP5 will be introducing which handles objects by reference rather than by value. Co-creator Zeev Suraski states the new object model is inspired by the book, "Design Patterns"."
This sounds like a very good thing, and will address many of the things I find cumbersome about the language (namespaces!). But while it sounds full of objecty-goodness, does anyone know how backward compatible this will be with PHP4? It sounds like major changes are in the works, and rewriting my code in six months sounds about as much fun as putting pencils in my eyes.
This is the voice of World Control. I bring you Peace.
From the article: PHP runs seamlessly under Windows, as do MySQL and Apache. WAMP anyone?
.] in the bank to make a great web language. (*cough* M$ *cough*) Neither do you need a couple thousand to deploy a website with dynamic content.
IMO this is what makes *AMP. Consistency between platforms. I use Apache, MySQL, and PHP religiously, and no matter what kind of machine I'm running everything on it is seamless.
I'm not saying this isn't true with other scripting languages, but being able to code on anything with a few tools no matter where I am is EXCEPTIONALLY nice.
PHP's use on large web application projects has been uncertain. Yahoo doesn't feel this way. Neither does Earthlink (WebMail)
But I suppose perception needs to change--you don't have to have a billion dollars [Article, still reading it. .
I've been blaming PHP for the fact that I haven't gotten around to learning much of Perl or Java - I've been able to do everything I've needed to so far (Nothing TOO complex, obviously) with PHP. I've been "going to start playing with Java to learn it Real Soon Now" for well over a year at this point...
On the other hand - from the article:
"PHP5's object model has syntax very similar to the Java programming language, so it will be easy for J2EE programmers to learn it"
Using PHP as a metaphorical stepping stone to learn Java then?...works for me...
Hacker Public Radio is our Friend
Well, I have a couple of opinions.
:)
1. PHP is a little easier to learn than Perl (at least it was for me).
2. PHP was designed specifically to generate dynamic HTML, whereas Perl seems to be more of a general purpose language.
Then again, sometimes it depends upon the application. There are some things that may be easier to implement in one language than the other, you may need the features of one that the other lacks, etc...
Others may, and probably will, disagree
It's mostly a matter of entrenchment. Perl, being a more general purpose language, would likely perform better than PHP in a lot of areas, including web apps. PHP, however, is known as a "web language" simply because that's where it was marketed too and where it's used. People could (a few do) write full GUI apps in PHP, but there's no real advantage to using it in such an area when there are better options available.
At some point in history, PHP provided a few features which were relatively novel at the time, at least in the Free software arena, which has a tendancy to be a bit behind the rest of the world. [1] At this point though, you can get templating ala ASP in plenty of free and open languages, including perl.
I could be full of it though- other than having the benefit of entrenchment, does PHP have any features that truly set it apart from perl, python or any of the more mature languages?
[1] Not in all areas of OSS, of course, but this statement is relatively true for the mainstream of OSS. There are interesting projects and acedemic research things going on that are doing new and interesting things. Like the regular mainstream, most people in the OSS mainstream aren't interested in doing things better so much as doing them as they already know how.
Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
Why are PHP and Perl paired together so often? (I like both languages; don't get me wrong.)
After spending some time toying around with both, their syntactic similarities seem superficial, like the fact PHP has that "$" prefix on its variables and that they use the ugly "->" operator for OOP.
They seem like distant (free, open-source) cousins at best.
Joe
http://josephgrossberg.blogspot.com/
Joe
http://www.joegrossberg.com
Moore's Law has NOTHING to do with this. Moore's Law has to deal with the density of transistors on an integrated circuit.
The observation that the logic density of silicon integrated circuits has closely followed the curve (bits per square inch) = 2^(t - 1962) where t is time in years; that is, the amount of information storable on a given amount of silicon has roughly doubled every year since the technology was invented. This relation, first uttered in 1964 by semiconductor engineer Gordon Moore (who co-founded Intel four years later) held until the late 1970s, at which point the doubling period slowed to 18 months
There are only 10 kinds of people in this world... those who understand binary and those who don't
However there are some things which I think need to be cleaned up.
The language is a great big mud puddle of libraries and helper functions. It would be nice if libraries could be imported at script run time (They could be sitting in memory waiting to be imported to negate speed issues) instead being available all the time. Ie If you want to use a function you must explicitly import the module containing the function. Why do I need MSSQL, Postges and MySQL connectivity all at the same time?
And I really hate prefixing all variables with '$'. Maybe they can do something about that...?
a ^= b; b ^= a; a ^= b;
While this isn't false, it did get me on the wrong foot. It appeared to me as if the PHP developers were just realizing that stuff like design patterns exist, and started writing their code accordingly. THe article however states:
It would've been helpful if that quote had been in the post, but it makes clear that PHP5 will have much better OO features than PHP4 currently has.
--
If code was hard to write, it should be hard to read
... and why I won't go back.
... and sometimes expose it on another machine. I'm talking about adding a blank line to a script. It seemed likely that there was a memory error of some kind in PHP.
... transferring to a 3rd-party session system that was incompatible with the 4.x sessions and completely untested by us was not possible by that time.
... I dumped PHP. I was in a situation where I could not trust the underlying technology.
... IIS 5.0 and Active Server Pages. Believe me ... if there had been any other viable option, I would have taken it. mod_python looked viable at first, but I didn't have time to go through the cycle of building a single-threaded python, and verifying the underlying technology. With ASP there was a fairly direct translation from PHP.
... which was acceptable since the users are trusted. Under IIS I eventually needed to create an administrator user which a single page uses - all other pages use a Guest user.
PHP 4.2.3. Windows 2000.
90% of the way into a decent-sized project, I started experiencing somewhat random crashes. Somewhat random in that there seemed to be no consistent way to provoke them, but once they started happening they happened in precisely the same way, consistently.
Simple changes, such as adding a single character to a script, would "fix" it on a particular machine
Downgrading to earlier versions of PHP 4.x didn't fix the problem. Downgrading to 3.x was not feasible
Of course, I attempted getting the source code and finding the problem myself. Unfortunately, none of the 4.x versions would compile. The 3.x versions would - but 4.x wouldn't. Obviously, some black magic was required. Sacrifices failed.
Time was running short. Faced with a very short deadline, I made the only decision I could
As an indication of what dire straits I was in, the technology I eventually recommended to replace PHP and Apache was
I hate that this application has been written in VBScript. The shenanigans I had to go through to get a particular COM control to load and be controlled by IIS - it's system of impersonation doesn't work very well if the COM object isn't specifically designed to be used with it. Under Apache it was able to run as LocalSystem
Obviously I was doing something outside the norm, since there are thousands of web sites which use PHP as the underlying technology. I suspect most of them are running 3.x. But the sheer number of issues that I found with PHP during the relatively short development cycle convinced me that it was in no way mature enough for us to trust our work to it.