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 @09:32PM (#39235301)

    Difficult to write assembly without "goto"

  • by Daniel Dvorkin (106857) on Saturday March 03, 2012 @09:35PM (#39235323) Homepage Journal

    Like every other tool, multiple inheritance can be used or abused. It may be one of those tools which is actually more prone to abuse than to proper use, but that doesn't mean it can't be done right.

    For a specific example, I used to work on a database application stack which had a bunch of classes for database entities (People and Companies, say) each inheriting from a DBEntity class; and other classes, inheriting from the database-facing classes, to format those entities for display (DisplayPeople, DisplayCompanies, etc.) The display classes each had to inherit from the database-facing classes, and each had its own particular display needs, but there were also, unsurprsingly, a lot of display functions in common. It would have been very useful to be able to define a DisplayEntity class from which each of the display classes could have inherited, using the common methods when applicable and defining their own methods when needed.

  • Re:PHP security (Score:5, Informative)

    by CastrTroy (595695) on Saturday March 03, 2012 @10:02PM (#39235479) Homepage
    PHP has had some security issues, but they can largely be avoid. First, always use parameterized queries (prepared statements) using PDO or MySQLi. Register Globals [php.net], which was a big problem in the past has been removed in 5.4. Most of the security problems I'm aware of can be summed up in those two things. I think the reason it has such a bad reputation is that it has so many newbie developers on it, and because there are a lot of bad tutorials out there (possibly written by newbies) that show bad practices, such as not using parameterized queries.

The Universe is populated by stable things. -- Richard Dawkins

Working...