Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

PHP 6 and What to Expect 101

An anonymous reader writes "Jero has a few interesting thoughts on what PHP 6 is driving towards and provides a nice overview of what has been keeping the PHP team busy lately. For more specifics, PHP.net also has the developers meeting minutes from last November available with a great recap of all the major issues on their platter."
This discussion has been archived. No new comments can be posted.

PHP 6 and What to Expect

Comments Filter:
  • Namespace (Score:4, Insightful)

    by CHaN_316 ( 696929 ) on Tuesday March 14, 2006 @04:28AM (#14914192)
    It'd be great if variables, functions, classes, and constants could be defined in their own namespaces. For really big projects, it's too easy for names to collide in the global namespace. An annoying workaround has always been to make names unique by prepending them with something.
  • by oztiks ( 921504 ) on Tuesday March 14, 2006 @05:28AM (#14914340)
    The argument why .PHP is seen as being less of a programming language to .NET is its lack of framework support.

    They should finish working on PEAR and getting it properly documented along with getting most of the respoitory packages out of "alpha" release. Then we wont have this stigma about .PHP being not quite enough agaisnt competeing solutions.

    Its good to see that they want to "fine tune" php and they are discussing the important programming syntax elements of the langauge, but like everyone else is saying why move to v5 in the first place? Well for those .PHP hardcore users v5 is really quite nice it does allow for more sparing use of memory and allows for a bit more OO functionality but at the end of the day to make .PHP a usable piece of enterprise software it needs to have a mature framework.

    Otherwise I presonally believe we'll start seeing Ruby hit the scene a bit more and .PHP will be left to catch up.
  • GOTO? (Score:2, Insightful)

    by Two9A ( 866100 ) on Tuesday March 14, 2006 @07:01AM (#14914579) Homepage
    Admittedly, I didn't RTFA, but 'goto' is almost definite to be included in PHP6 upon release. Do we really need this pandering to the VB migration crowd, sacrificing code structure for the sake of a bigger PHP userbase?
  • by tehshen ( 794722 ) <tehshen@gmail.com> on Tuesday March 14, 2006 @08:03AM (#14914741)
    No, seriously. PHP has accumulated a lot of broken things over the years, and it is hurting it. This new version of PHP should be turned into a whole new language entirely, or made incompatible with older versions (like Perl 6 is doing). Reasons:

    PHP's design is fucked up. Some functions have underscores, others don't; some have numbers, others don't: strtolower, isset, stripslashes compared with hex2bin, is_null and strip_tags to name a few. Why? Who knows? But too many applications rely on these inconsistencies, and making them consistent would break everything.

    It has no namespaces. Luckily, they are to be added in PHP 6 (and about time too!), so we can do $db::connect() rather than mysql_connect($db). So can we get rid of all the mysql_* and other pseudo-namespace functions please? They are annoying and will be wholly unnecessary.

    Security problems. Register_globals and magic_quotes are still built into PHP when they should be built out and as far away from it as possible (and they are!). There are going to be people who will wonder why this upgrade breaks those things, and people should know that a new language does things differently. (Likewise: Perl 6's given/when block isn't called switch/case because it behaves differently).

    Now that I've typed all that, much of my reasoning is that people rely on PHP's being bad. People should never rely on poor language design, or bugs, or bloat, of which PHP has loads. The language should work, you shouldn't need to work around the language - and if you do, you're going to have a lot of trouble rewriting your code.

    There might be little incentive to switch away from older versions of PHP for some people, but a few refinements of the language won't change that. "Better than PHP" would actually be true. "Made from the PHP team" would be a major selling point too.

    I know that it's a bit risky saying this here (there seem to be a lot of people who like PHP for some reason), but a serious redesign is in order, and it's more than just a simple bumping up of the version number can fix.
  • by masklinn ( 823351 ) <slashdot.org@mCO ... t minus language> on Tuesday March 14, 2006 @08:18AM (#14914772)

    Try some other languages (Ruby, Python, CLisp/Scheme/Haskell/OCaml if you manage to get past the syntax), you'll see that PHP is lacking in many areas.

    Closures (even read-only, as in Python), functions as first-class objects, namespaces, modules, consistency across the standard library, properties, metaobjects, strong typing (not static, strong), infinite-length integers (these dummies want to add a 64bits integer in PHP6... whoa, so kewl eh), good iterators (not Java's, either Ruby style or Python style iteration), partial application (curryfication), pattern matching, ...

  • by self assembled struc ( 62483 ) on Tuesday March 14, 2006 @12:12PM (#14916328) Homepage
    I think you're missing his point.

    In my experience (working in large PHP driven shops) the people writing PHP didn't necessarily have a comp sci background. They don't care (and most don't even know) wahat a first-class object is, why they would even want namespaces, strong typing or 64 integers. In fact, adding them to the language makes it in accessible to them, so they'll just stick with php 4, which "works for me."

    I mean, in a fundamental sort of way, yes PHP is broken, but in a useable sort of scripting language way, PHP 4 isn't broken. And if it ain't broke, then don't try to fix it.

8 Catfish = 1 Octo-puss

Working...