Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
PHP Programming IT Technology

PHP 5.3 Released 120

Sudheer writes "The PHP development team is proud to announce the immediate release of PHP 5.3.0. This release is a major improvement in the 5.X series, which includes a large number of new features and bug fixes. Some of the key new features include: namespaces, late static binding, closures, optional garbage collection for cyclic references, new extensions (like ext/phar, ext/intl and ext/fileinfo), over 140 bug fixes and much more."
This discussion has been archived. No new comments can be posted.

PHP 5.3 Released

Comments Filter:
  • by TheNinjaroach ( 878876 ) on Tuesday June 30, 2009 @11:03AM (#28528597)
    Say what you will about PHP, but it puts food on my table and a good roof over my head. I have been clamoring for the new features in PHP 5.3.0 (closures, namespaces, they finally killed register_globals) and can't wait for the improvements coming in 6.

    I truly appreciate the hard work of the PHP development team and the free language they have given us, congratulations on the new release.
  • by MightyMartian ( 840721 ) on Tuesday June 30, 2009 @11:11AM (#28528723) Journal

    I don't think that's quite fair. I think if the functions, calling conventions and naming were regularized, it would be a reasonably decent scripting language. But it's because it suffers multiple personality disorder that it's a horrendous pain.

  • Re:features! (Score:3, Insightful)

    by vivaoporto ( 1064484 ) on Tuesday June 30, 2009 @11:13AM (#28528751)
    GOTO has its uses. I never used it (as I prefer a more structured way to code), but critical mission error handling may take advantage of a more direct way to "jump". Anyway, one excepcional addition to the language is closures [php.net]. Real anonymous functions were missing for a long time on the language, and it is great to have it now. Now it is only a matter of our customers' hosting providers to update their versions of PHP. Oh, well, considering most just migrated from PHP 4 to 5 (thanks to the EOL last year), it may take some time.
  • Re:Horray (Score:1, Insightful)

    by Anonymous Coward on Tuesday June 30, 2009 @11:18AM (#28528829)
    That's the shittiest login code I've ever seen, and friend, that's saying something.
  • Re:features! (Score:4, Insightful)

    by vivaoporto ( 1064484 ) on Tuesday June 30, 2009 @11:49AM (#28529333)
    I didn't said "exception handling", but "error handling", like linux kernel developers [kerneltrap.org] use.

    Anyway, exceptions in languages like Java which enforces its treatment in compile time are more than just a "goto error handling". It all depends on the language you are using.
  • Re:Nuisances (Score:3, Insightful)

    by DragonWriter ( 970822 ) on Tuesday June 30, 2009 @12:27PM (#28530055)

    There's a huge codebase out there that's using PHP against MySQL, and using PHP's original ereg regex syntax instead of the Perl-wannabe stuff. What are they thinking, when they set out to break this? When 5.3 rolls out through the distros a whole lot of MySQL backends will fail on the password thing. And when 6.0 rolls out millions of regexs will suddenly be failing.

    Uh, no.

    Assuming that people running and maintaining the code are paying any attention, when 6.0 rolls out, those installations that have working code relying on features long-announced for deprecation that are removed in 6.0 will not upgrade to 6.0.

    Major new interpreter versions enable new projects, and old projects can be migrated to them if there is a reason. But they aren't intended to be minor, backward compatible, performance improvement and bug fix releases -- that's why they are called major versions.

  • by iluvcapra ( 782887 ) on Tuesday June 30, 2009 @12:34PM (#28530193)

    I think if the functions, calling conventions and naming were regularized

    ...and they removed the sigils, and removed the silent type coercion, and eliminated the "@" function prefix, and removed the "global" keyword, and removed the weird "list" lvalue function that looks-like-functional-pattern-matching-but-really-just-cosmetically, and fixed the pass-by-reference semantic...

    But if you did all of these things, it really wouldn't be PHP anymore.

  • by i_ate_god ( 899684 ) on Tuesday June 30, 2009 @12:36PM (#28530231)

    __construct() is a magic method, just like __get(), __set(), __destruct(), __isset(), __toString(), so on and so forth. Magic methods are called without the programmer having to call them, under specific circumstances. In the case of __construct(), it's called when an object is instantiated. '__' defines a magic method and was chosen back in the day because PHP didn't have protected/private members and so the common practice was to prefix private/protected members with one underscore.

    PHP was a solution to Perl, so -> is what Perl uses so that's what PHP uses.

    The function naming is not so much an issue either. But what is frustrating is argument order. That's something that really needs to be revamped, backwards compatibility be damned.

  • by not already in use ( 972294 ) on Tuesday June 30, 2009 @12:46PM (#28530479)
    It's funny how people cling to languages for arbitrary and sometimes downright illogical reasons. It's like each language is cool or acceptable in various online social circles. In fact, they can be broken down into their equivalent high school archetype:
    • PHP - The Slackers
    • .NET - The Jocks
    • C - The Goths/Hardcore
    • Ruby - The Hipsters
    • Haskell - The Nerds
    • Java - The drifters

    In seriousness, I'm with the OP. I wish the ridiculous language evangelism would stop. In the end, people are just being short sighted and limiting the tools at their disposal.

  • by Ant P. ( 974313 ) on Tuesday June 30, 2009 @01:57PM (#28531961)

    No, no no. PHP is the "new COBOL". It's a horrible language, but it's built up too much inertia to get rid of it or most of its backward-compatibility disasters.

    If you want the new VB take a look at Ruby - a language that lets you bring any webserver to its knees in only 5 minutes and 10* lines of code, no experience required.

    *plus 800000 lines of framework

  • by tarius8105 ( 683929 ) on Thursday July 02, 2009 @12:59PM (#28559731)
    Your comparison is off. Working at a company that has over 1000 java applications, I can tell you right now that you're so off. Simple fact, on a slower machine php will outshine java in terms of performance. On a enterprise powerhouse, the performance is about the same give or take based on how both are written. Its also not a fair comparison to compare java servlets to php. PHP to JSP is a fair comparison and your comparison would still be off base especially with the execution model. You cant compare PHP to Java on the same playing field as they are just that different.

Always draw your curves, then plot your reading.

Working...