Slashdot Mirror


PHP 5 RC 1 released

An anonymous reader writes "PHP just released the first release candidate of PHP 5 after 4 beta releases. It is considered stable and feature-complete -- so get testing!"

33 of 388 comments (clear)

  1. It is NOT stable by panic911 · · Score: 0, Insightful

    RC1 != stable

    Don't assume it's stable, until PHP 5.0 (stable) comes out. Here's what the article on php.net says:

    quite stable - stable enough for everyone to start playing with

    (wooo RC1's out!)

    1. Re:It is NOT stable by Anonymous Coward · · Score: 3, Insightful

      You'll know it's stable when porn sites start transitioning to it. Consider the load testing that they are able to throw at any software.

    2. Re:It is NOT stable by Anonymous Coward · · Score: 3, Insightful

      ...why do people mod this shit up? It's NOT fucking insigtful, it's redundant. The entire parent post could be removed and no one would think anything different than if it was never posted to begin with. It's just repeating shit that was already said and is so blatantly fucking obvious to anyone who cares enough to use it.

      "RC1 != Stable". No fucking shit, Captain Obvious. That's why it's a RELEASE CANDIDATE *gasp*. Nowhere did it state "Put this on your production machines at once." It said "stable enough for people to start playing with."

      Let me guess, the sun is yellow?

      Modding this shit up just encourages people to post brain-dead information and therefore makes everyone stupider in return. So don't do it.

  2. Re:Power Power Power by Anonymous Coward · · Score: 5, Insightful

    It's funny, I remember when it was a main tenet of programming that data should be separate from presentation. However, PHP has shown just how powerful integrating data and presentation can be through inlining code directly into a webpage layout.

    Try something complicated. You'll change your tune right quick.

  3. Re:Power Power Power by Anonymous Coward · · Score: 4, Insightful

    Powerful is one thing, maintainable another.

    Keeping data and presentation separate is still the best thing to do. But that's why we have CSS. So unless you're still using tables, font tags or whatnot, you're not integrating data and presentation.

  4. Re:Power Power Power [where's my perl!?!] by Telastyn · · Score: 5, Insightful

    Huh?

    Having been a big PHP fan, let me assure you that PHP has a strong central theme like a kleptomaniac with ADD has a strong attention span.

    Having been a big PHP fan, every story about PHP releases reminds me of the page long list of vulnerabilities and issues under it's entry in netbsd's package listing.

    Having since moved to perl, I'm wondering if those death throes you're talking about are the same ones that haven't arrived on my BSD machine yet...

  5. Re:Power Power Power by kevin_conaway · · Score: 4, Insightful

    Umm, Perl is not dead or dying. It may not be used as much as it used to for CGI programming but in the world of system administrators, it is still very much alive and even growing. An admin without perl is making his or her life much worse than it could be

  6. Re:PHP in comparision to others by Phexro · · Score: 2, Insightful

    Not sure about speed. It seems fast enough for most stuff, but I'd do some careful benchmarking and optimization if I was writing/designing a big app.

    I've never used ASP or JSP, but PHP is much easier to pick up than Perl or JavaScript. It's very simple, and uses C/C++-like syntax without the complexity you have to learn to program effectively in C/C++.

    Unfortunately, this means that there's huge amount of PHP code that's utter crap out there, because you don't have to think before you code.

  7. Re:Power Power Power by junkymailbox · · Score: 2, Insightful

    I've tried both simple and complicated. It's in the design. You can easily write incomprehensible code that's not easy to maintain in any language.

  8. Re:Power Power Power by w3weasel · · Score: 2, Insightful
    inline into a web page is HORRIBLE, it's hard to read, it's easy to miss a badly spelt variable name

    PHP can be written as OO or Speghetti; inline with presentation or seperate... the choice is yours...
    (if you know what you are doing... PHP can be incredibly flexible)

    --

    Just as irrigation is the lifeblood of the Southwest, lifeblood is the soup of cannibals. -- Jack Handy

  9. Re:Power Power Power by sir_cello · · Score: 2, Insightful


    Different horses for different courses. The great thing about ever popular use of computing languages the sheer diversity and the speciality of niches.

    Don't try to compare a high level rendering and application logic language like PHP against the toolbox data manipulating kitchen sick included lanaguage of perl.

  10. Re:Safety? by GnuVince · · Score: 2, Insightful

    Using unit testing in a test-first mode of development can make type problems go away.

  11. Keep the presentation and code SEPARATE, please! by Anonymous Coward · · Score: 1, Insightful

    PHP5 is an excellent choice for prototyping because of the integration between display and function,

    What the hell?! If you've been involved in any kind of app deployment followed by its maintenance (especially web apps), you'll know that keeping presentation and code separate is extremely desirable. Integration of these two is a weakness, if anything.

    Having said that, PHP itself is no worse or better than say mod_perl in that regard. If you use a template library with PHP, you can accomplish some nice separation of presentation and code. But them mod_perl has excellent and mature template libraries also.

    Once again, it's not about the language. Use a language you enjoy and then surround yourself with appropriate tools and libraries.

  12. Re:significant changes by Carl+T · · Score: 5, Insightful
    the semantics regarding object assignment have changed from copy to reference

    Sounds to me like the migration to PHP 5 will be a long and painful one. The project I've been working on in PHP for the last couple of years sure could use some of the new features, and if what another poster said about responsiveness translates to higher speed, that's another reason to switch. Then again, looking through megs of PHP code for things that are suddenly ever so slightly broken because of subtle language changes is not exactly fun.

    For new projects, OTOH, I don't see much reason to stick with PHP 4, except the horrors of having to instruct users that they need to upgrade their PHP interpreter(s) again.

    --

    This signature is not in the public domain.
  13. Re:Power Power Power by Anonymous Coward · · Score: 1, Insightful
    Whenever I see a story about PHP, I think more about the death throes of Perl than about PHP itself.

    That says a lot more about your attention whoring than either language.

  14. Re:significant changes by qlippoth · · Score: 2, Insightful

    be careful upgrading, as the semantics regarding object assignment have changed from copy to reference. i know some of my code would make use of the old copy-on-assignment semantics.

    Which is why it may suffer problems with a lot of hosting companies upgrading and adopting PHP5 initially. Its seems like 90% of the borrowed code and available projects out there tend to be class based (even though most small projects don't necessarily need to be done in OOP, but this isn't an argument I'm going to delve into), which may subsequently become broken if said hosting company were to upgrade to the new version. Then again, one could always compile both versions to use different extensions like .php4, .php5...

    --
    Mmmm, -funroll-loops
  15. Re:Power Power Power by Snoopy77 · · Score: 2, Insightful

    PHP has shown just how powerful integrating data and presentation can be through inlining code directly into a webpage layout.

    A lot of people using PHP, ASP, JSP, ColdFusion are doing their best to separate data collection and manipulation with the actual presentation of the data.

    My particular favourite methodology fusebox tries to help programmers separate the model and the view. It is unbelievable how simpler web applications are to write when you do separate data and presentation.

    I may be feeding the troll but they don't let me feed the aninamls at the zoo anymore.

    --
    "She's a West Texas girl, just like me" - G.W Bush Iraqis
  16. Re:Apache 2.x safe to use yet? by mattdm · · Score: 2, Insightful

    My understanding (and I don't actually use PHP, so maybe I'm out of date) is that with PHP 4.x, at least, it worked fine with the traditional fork-based Apache model, but br0ke with threads. (And for this reason, the threaded binary is installed at /usr/sbin/httpd.worker and /usr/sbin/httpd is the old-fashioned way on Red Hat's distro.)

  17. Re:Power Power Power by FyRE666 · · Score: 3, Insightful

    If you are putting php in your html you are doing it backwards. Marked up content goes in one database table CSS goes in the other and php puts them together.

    That's possibly the most ridiculous thing I've ever read here (above -1 anyway). Why on Earth would you want to keep hammering the database for HTML markup, let alone CSS text?!! You'll find there's this thing known as a "filesystem" that does a better job at returning such content, much more quickly and more efficiently.

    If you really are using the method you suggest above, then I can only imagine you don't have a very busy site...

  18. Re:Safety? by Tablizer · · Score: 3, Insightful

    PHP is a weakly-typed language by design.....Let's not forget that PHP is, after all, a scripting language

    Agreed. Why does everybody want to turn PHP into Java? If you want to use Java, then use Java. Diversity is good.

  19. Re:Power Power Power by Rui+Lopes · · Score: 2, Insightful

    Keeping data and presentation separate is still the best thing to do. But that's why we have CSS. So unless you're still using tables, font tags or whatnot, you're not integrating data and presentation.

    I think you are wrong... CSS splits STRUCTURE from PRESENTATION. DATA is what you put between tags. You can have the same structure with diferent data instances, presented in several diferent forms. Oh, BTW, php, asp, jsp are BAD ways of using this kind of design. Try using XML/XSLT/CSS to unleash the true power of web...

    --
    var sig = function() { sig(); }
  20. Re:Here you go by perrin_harkins · · Score: 3, Insightful
    All of these scale well enough that for most sites you won't care, and none of them really scale well enough to support something like cnn.com.[...]If you want something that will scale to absolutely huge levels (like the aforementioned CNN), J2EE is about the only game in town.

    Yahoo uses PHP and Perl. Amazon uses Perl. TicketMaster uses Perl. These are some of the biggest sites in existence. The only truly large site using Java is eBay, and they are not using all the standard J2EE stuff. And I can't believe you are claiming that Tcl is more maintainable than Perl.

  21. perl isn't maintainable? by Anonymous Coward · · Score: 1, Insightful

    how is the language working against it? perl development is as maintainable as the developers on a project make it.

    with proper modularization, templating, and checking in of versions, it's not a problem.

  22. Unicode by UnConeD · · Score: 4, Insightful

    So does PHP5 have proper Unicode support, or are we still supposed to pretend that you can treat UTF8 as ASCII and that it will 'just work'?

  23. Re:Power Power Power by aanand · · Score: 2, Insightful

    No-one inlines presentation and data in complicated web apps though. Because it's bad design. PHP lets you do either, which is The Point.

  24. Re:PHP vs. Perl by The_DOD_player · · Score: 2, Insightful

    First, the two languages are very similar, with PHP biased towards web-programming, mostly by the absense of particular libraries. But PHP is also emerging as a general purpose language. There has been some experiments to get a GTK capability to PHP.

    But, if you already have a staff trained in perl, there's IMO not any real reason for you to switch to PHP.
    I have, however, developed a preference for PHP, it has a simpler syntax, and better naming conventions. PHP has more text and perl have more meta-characters when defining arrays, doing string manipulation ect. PHP is simply more readable, to beginners at least. What is the point for example for an array to be prefixed by % or @ or $, depending on the context?

  25. Re:Perl's grammar is too big by Ender+Ryan · · Score: 1, Insightful
    Oh please... Perl's syntactical footprint isn't nearly that bad. Surely any competent programmer woudn't have a difficult time. Christ, perldoc comes with perl and is arguably the most useful language documentation that exists. Don't understand a bit of syntax, if you're using perl, you've got a huge reference right there.

    As for PHP, it's an awful language. There are entirely too many core functions that all do way too similar things. How many regular expression functions are there, and separate functions for case (in)sensitivity? What the fuck were they thinking? Worse yet, they don't seem to follow any naming conventions for their functions. Sometimes words are separated by underscore, sometimes not. Some functions use a similar naming convention for case sensitivity, sometimes not.

    PHP looks as if it was designed by beginning Perl programmers who hadn't even finished reading Learning Perl... You know the kind; they use all global variables, create libraries that pollute your namespace, mix logic and presentation, etc.

    Meh, to each his own I guess.

    --
    Sticking feathers up your butt does not make you a chicken - Tyler Durden
  26. Re:Power Power Power by SnatMandu · · Score: 2, Insightful
    First off you can't even compare Perl to PHP.

    Oh Really?

    Perl is a general purpose progamming language not a simpleton web language such as PHP.

    Evidently, you've had no trouble making a comparison... do you need a special badge or licence to make such comparisons?

  27. Re:Here you go by ghost. · · Score: 2, Insightful

    Gotta jump in here:

    Javascript: poor fit for server-side use. Nobody does anything serious with it that way.

    Actually, in a 'classic' ASP environment, server-side JavaScript (JScript) is a vastly superior option to VBScript. I have used it extensively in the past for small-to-medium sized corporate intranet apps at my job. You get identical access to the ASP, COM and Windows-scripting object models, and much better object-oriented support to boot. JavaScript is damn solid; I wish it had a server-side presence in the Unix world.

    Plus, in a Windows environment JScript is probably the closest thing to PHP, in terms of syntax and relative complexity.

    Unfortunately ASP.NET is a classic "leaky abstraction;" it tries to make things simple that sometimes aren't, and this will bite you.

    Agreed completely. With this stated, I'm surprised you would rate ASP.NET the best choice. What you pointed out is a significant issue, especially when one relies on Visual Studio. Too many web developers don't understand how a lot of their code works; VS.NET takes that problem to a frightening new level.

    If you want something that will scale to absolutely huge levels (like the aforementioned CNN), J2EE is about the only game in town. (But a living hell to code for -- not recommended for smaller projects!)

    No argument.

    Perl: it's nearly impossible to maintain a substantial site in perl with multiple developers working on the code. The language works against you here.

    Totally disagree. Put *good* Perl programmers on a team, make them adhere to sane coding/documentation standards, and give them Mason or HTML::Template (depending on preference); you'll get maintainable site. The catch with Perl is that it punishes seat-of-pants code slinging more harshly than the other languages mentioned. I know it's a mantra around here, but you CAN write clear Perl code. (Disclaimer: I mostly use Perl nowadays.)

    I really like Python, but I usually run back to Perl for CPAN and the quality/volume of the documentation available. I don't have enough real-world experience with it to fairly judge against the others. Ditto Tcl.

    Cheers.

    --
    Bush is a cylon.
  28. XML/XSLT for humans? by phutureboy · · Score: 3, Insightful

    OK, I tried using XML & XSLT under PHP a couple years ago, for the CMS system which is linked in my .sig. It was one of the most frustrating experiences of my life.

    Firstly, it required that PHP be recompiled with the Sablotron module, which would have made the software inaccessible to most of its current user base.

    Secondly, writing the XSL stylesheets was complicated as hell. The learning curve associated with them would have made the software inaccessible to ~96% of its current user base, probably including me. (it now uses its own templating system which allows designers to create the templates.)

    Has any of this changed? For example, are there any WYSIWYG editors which make it easier to write stylesheets? Will PHP 5 have XSLT capabilities built-in?

    Or am I missing something? Is XSLT really not as hard to get started with as I think? (If I'm just a dumbass, I'm sure someone on /. will quickly point that out :)

  29. Connection pooling ? by vlad_petric · · Score: 4, Insightful

    All the OO features are nice, but what's really missing in PHP are some critical "enteprise" features, like true connection pooling (and no, pconnect doesn't count).

    --

    The Raven

  30. Re:Safety? by pod · · Score: 2, Insightful

    Forget abstraction. It is even more trivially solved by using placeholders with prepared SQL statements, like "select * from table where field1 = ?". The driver should then take a paramater in the execute() function, figure out what type it is supposed to be, and convert the parameter, or error out if it can't. It worries about escaping quotes, newlines, and any other special characters. Inject THAT.

    --
    "Hot lesbian witches! It's fucking genius!"
  31. Re:Power Power Power by matt4077 · · Score: 2, Insightful

    The problem with template engines is, of course, that they are either not powerful enough for what you do, or they become a new language by themselves. What good does it do, to replace a php if() { }else {} statement with some uber-xml-template-engine's ?
    None, other that everybody who needs to use your system has to learn another language.

    For a php-product of ours, we have chosen to simply use php as the template language. The codebase itself is OO and seperate from the html, but somewhere you just have to have a loop through every row of a result making a table with it. And right there you have to mix logic and presentation, because presentation becomes part of the logic.