Forgot your password?
typodupeerror
PHP Open Source News

PHP 5.4 Released 209

Posted by Soulskill
from the onward-and-upward dept.
mikejuk writes "PHP 5.4 has been released, along with a new version of Zend Framework. It has a number of optimizations that make it faster and smaller (early estimates say 10-20% faster), a built-in webserver for testing purposes, and features that had been destined for PHP 6.0. The big addition from the now-crashed PHP 6.0 project is Traits, which are sort of a cross between a class and an interface, bringing some of the advantages of multiple inheritance to PHP. The full changelog and download page are both available."
This discussion has been archived. No new comments can be posted.

PHP 5.4 Released

Comments Filter:
  • by Anonymous Coward on Saturday March 03, 2012 @08:14PM (#39235229)

    Please enlighten me on the "advantages" of multiple inheritance.

    Everything I've learned has taught me that MI is a BAD thing (worse than GOTO), so I'm honestly curious what these supposed "advantages" are.

  • a cross between a class and an interface,

    ... having php adopt a bad idea from Java and making it worse? Wouldn't we be better off actually having static typing instead?

  • by Anonymous Coward on Saturday March 03, 2012 @08:18PM (#39235247)

    GOTO is perfectly fine in some situations. Using a technique badly doesn't make the technique bad itself. It's just stupid users.

  • by Daniel Dvorkin (106857) on Saturday March 03, 2012 @08:41PM (#39235367) Homepage Journal

    Java interfaces are essentially a fancy form of documentation. Traits sound like they provide actual functionality.

    As for static typing ... oh, never mind. If you prefer static typing, by all means, use a language that has it. Also bear in mind that static typing != strong typing; a lot of people who complain about the lack of the first really seem to be talking about the second.

  • by Anonymous Coward on Saturday March 03, 2012 @08:56PM (#39235443)

    The people who scream the loudest about how multiple inheritance or gotos are bad are the ones who also scream the loudest about "best practices", but in reality write some of the shittiest code there is.

    Just look at Java and C#. The worst Java and C# developers are those who go on and on about design patterns. Then instead of writing software that solves real problems, they spend months and years putting together frameworks and obtuse architectures that are damn near impossible to use in practice.

    Then there are the Ruby users. Basically everything they advocate is wrong. Maybe it lets you crank out yet another blog engine quickly, but what they propose falls apart completely for any moderately complex application. All it takes is debugging one problem caused by monkeypatching, and you'll immediately see how stupid their ideas are.

    JavaScript "programmers" are the worst. Their language is so fucked up, but most of them are so ignorant that they can't see this for themselves. I mean, they didn't even manage to get equality comparisons implemented in a sensible manner! Yes, very core functionality like that is broken.

    PHP has traditionally been just slightly better than JavaScript, in terms of developer stupidity, but at least they're making a small degree of progress in the right direction. We can't say the same for Ruby, though. In fact, we rarely hear about Ruby these days. The hype surrounding it sure has died down lately. This isn't completely unexpected. Consistent failures, like most sizable Ruby projects tend to be, can quickly kill even the loudest hype.

  • Re:Oh good Lord (Score:4, Insightful)

    by CastrTroy (595695) on Saturday March 03, 2012 @09:11PM (#39235535) Homepage
    I don't even know why they added object oriented features in the first place. It's really hard to bolt something like Object Oriented features on to language that never had them. Not to mention that having half the standard library in OO and half in procedural just makes everything an even bigger mess. PHP would probably be a lot cleaner and more palatable had they never tried to add objects in the first place.
  • by hcs_$reboot (1536101) on Saturday March 03, 2012 @11:00PM (#39235901)
    A language named after a main TLD sounds, indeed, a bit iffy. Maybe the nostalgia of the late .COM?
  • by Anonymous Coward on Saturday March 03, 2012 @11:19PM (#39235983)

    You base your criticism of a platform (not a language) on its name? Seems pretty arbitrary.

    On top of that, the old platform was just called COM (no dot).

    For what it's worth, I've used pretty much all the well-known languages out there (OO languages, functional ones, dynamic ones) and I have to say that the .NET framework and C# are pretty damn good. In particular, the C# language designers are really good at incorporating the good ideas from other languages but keeping the syntax from spiraling out of control (a la C++).

    Not that this opinion will garner much praise on slashdot.

    CAPTCHA: informed

  • by wimg (300673) on Saturday March 03, 2012 @11:31PM (#39236077) Homepage

    If you want to get your code compatible, a start is to scan it automatically : https://github.com/wimg/PHPCompatibility - just released for 5.4 as well :-)

  • Gotos are great. Look at your switch statement. See those case labels - they're the targets for the computed goto. Or do you not use switch statements?

    There's absolutely nothing wrong with goto. Just people who abused it and it got a bad reputation.

  • by MisterMidi (1119653) on Sunday March 04, 2012 @08:07AM (#39238391) Homepage

    Insightful my ass. The people who scream the loudest how fucked up some programming languages and how stupid their users are, are actually the worst.

    Sane programmers however, just use what's best for the job. For example, what other programming language would you suggest for enhancing a webpage? VBScript? Or just throw in a Java applet like in the nineties?

    If you think the equality comparisons of JavaScript are fucked up, I think you don't understand loose typing. If they don't do what you want, it's because you don't use them properly.

Truth is free, but information costs.

Working...