Slashdot Mirror


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"."

13 of 135 comments (clear)

  1. Porting by eddy+the+lip · · Score: 4, Interesting

    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.

  2. *AMP by Cokelee · · Score: 3, Interesting

    From the article: PHP runs seamlessly under Windows, as do MySQL and Apache. WAMP anyone?

    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. . .] 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.

    1. Re:*AMP by sporty · · Score: 3, Insightful

      I just wish that there was a way to compile PHP into some sorta byte code. 'cause then you'd write your Mysql, XML, expat, imagemagik, and other php modules IN php. THEN it'd be truely portable.

      Problem is, if your php module you wish to compile in isn't written for your system, your are screwed. Besides, using your language to develop your language forces the language to be bulletproof after age.

      I've run into some oddities with php when you push its limits.

      --

      -
      ping -f 255.255.255.255 # if only

  3. I blame PHP... by Dr.Dubious+DDQ · · Score: 3, Interesting

    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...

  4. Re:PHP vs Perl by dt23507 · · Score: 3, Insightful

    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 :)

  5. Re:PHP vs Perl by RevAaron · · Score: 3, Insightful

    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
  6. Re:PHP vs Perl by josephgrossberg · · Score: 3, Insightful

    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/

  7. Re:Moore. by Alizarin+Erythrosin · · Score: 3, Informative

    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
  8. Issues with PHP by pyman · · Score: 3, Insightful
    I have been using PHP for about 4 years, and I quite like the language. I would much rather use PHP than Perl, VBscript or Jscript.

    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;
    1. Re:Issues with PHP by ProfKyne · · Score: 3, Informative

      Um, if you did that then you wouldn't be able to embed your variables in a string, Perl-style.

      • PHP: "My name is $name\n";
      • Java: "My name is " + name + "\n"

      If you think about it, the PHP way is easier.

      --
      "First you gotta do the truffle shuffle."
  9. Using design patterns by Wizard+of+OS · · Score: 4, Interesting
    The quote above states:

    Co-creator Zeev Suraski states the new object model is inspired by the book, "Design Patterns".


    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:


    "The way PHP4 was built -- it was not easy to implement design patterns," says Suraski. "PHP5 is much more suitable, so you will be able to take that book and implement the design patterns in your code."


    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
  10. One person's experience with PHP ... by tdelaney · · Score: 4, Interesting

    ... and why I won't go back.

    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 ... 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.

    Downgrading to earlier versions of PHP 4.x didn't fix the problem. Downgrading to 3.x was not feasible ... 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.

    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 ... I dumped PHP. I was in a situation where I could not trust the underlying technology.

    As an indication of what dire straits I was in, the technology I eventually recommended to replace PHP and Apache was ... 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.

    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 ... 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.

    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.

    1. Re:One person's experience with PHP ... by mgkimsal2 · · Score: 3, Insightful

      Bzzttt - wrong.

      There are not MILLIONS of people running PHP under IIS4 and 5, and it's your responsibility to prove that there are that many. It just doesn't work reliably under IIS in ISAPI mode period, which is what most people would want. Running as CGI is godawful slow, and millions of people are not going to pay $ for Windows specifically to use an extremely slow option for dynamic web stuff.