Follow Slashdot stories on Twitter


Forgot your password?
PHP Programming IT Technology

An Early Look At What's Coming In PHP V6 307

IndioMan writes "In this article, learn about the new PHP V6 features in detail. Learn how it is easier to use, more secure, and more suitable for internationalization. New PHP V6 features include improved support for Unicode, clean-up of several functions, improved extensions, engine additions, changes to OO functions, and PHP additions." Update — May 7th at 16:47 GMT by SS: IBM seems to have removed the article linked in the summary. Here's a different yet related article about the future of PHP, but it's a year old.
This discussion has been archived. No new comments can be posted.

An Early Look At What's Coming In PHP V6

Comments Filter:
  • by thue ( 121682 ) on Wednesday May 06, 2009 @02:41PM (#27849389) Homepage

    All very good. But there is no set release date; I wonder when PHP 6 will be released?

    They have been working on PHP 6 since at least 2005, and from monitoring announcement etc., I haven't seen any signs that they are nearing a release.

  • Interoperability ? (Score:1, Interesting)

    by heatseeker_around ( 1246024 ) on Wednesday May 06, 2009 @02:53PM (#27849581)
    Nothing about migrations between 5&6 ? and 4&6 ? does it accept old crap code running under the V6 ?
  • Namespaces (Score:5, Interesting)

    by Phroggy ( 441 ) <.moc.yggorhp. .ta. .3todhsals.> on Wednesday May 06, 2009 @03:02PM (#27849713) Homepage

    So let's say you've got a global variable, $n

    And let's say you're using it in a module, Foo

    And because scattering global variables everywhere is a stupid idea that will lead to much pain, let's say you've decided to use namespaces in PHP6.

    Now, in your main script, let's say you happen to be using a variable $Foo, for no particular reason.

    What does this do?

    echo "Hello $Foo\n";

  • Re:Finally (Score:4, Interesting)

    by sopssa ( 1498795 ) <> on Wednesday May 06, 2009 @03:13PM (#27849823) Journal

    One thing I hope PHP would have is GUI stuff for both Windows and Linux. Its a great language for everything, and I use it constantly for scripts and other stuff. I've even written ircbots and servers with it, and they all work great and are nice to work with.

    However the GUI design with the existing tools is just pain in the ass, and it doesnt offer a good way to turn your code into machine code.

    I do understand that theres programming languages like c/c++ and delphi and several others, but from all of those php is the nicest to use, even for non-webpages stuff.

    I dont think it would be that hard to implement such, given theres people to do it and understand how PHP can be greatly used for non-webserver stuff aswell. Or is there something against it that I havent thought of?

  • Re:So... (Score:4, Interesting)

    by msh104 ( 620136 ) on Wednesday May 06, 2009 @03:55PM (#27850355)

    I wouldn't mind, but my boss likes to get paid when i work for him...

    A general upgrade project we run looks like:

    1. We talk to the customer that the site that WE wrote for him now sucks because WE wrote it with function xyz that is now broken and sucks. ( we formulate this different, but this is about how it feels to the customer )

    2. customer complains that he paid for his site and that he expects it to just work.

    3. we explain that our knowledge of what will happen to future versions of the product is rather limited and that we therefore in principle can only make the best dessisions at a given time, that we regret the problems, but cannot help it. we then usually evaluate the components that are used in the website, CMS version, modules, tweaks, how much was done by outsourcing, etc and send it of to the customer.

    4. customers views the estimate and nearly dies from a heart attack when he sees what it will cost to port his website to a new php version without any increase in function.

    5. if we were lucky in fase 3 / 4 we have been able to get him addicted to some additional services as well that "only work with php5" making the upgrade path somewhat worth it. If that fails the customer in 90% of the cases won't think the upgrade path is worth it and will arange with us that we will keep hosting the site but without warrenty.

    This has not so much to do with being lazy, but more with being in a commercial company and having a customer that does not think it's worth to pay.

  • Cry me a river (Score:3, Interesting)

    by SmallFurryCreature ( 593017 ) on Wednesday May 06, 2009 @04:08PM (#27850507) Journal

    Staying up to date is part of doing business. Would you use a cab that still used horses? Get on a steam train with open box carts?

    While progress for progress sake can be overrated the simple fact is that we learn from mistakes and improve on the stuff we make. There comes a time when being conservative turns you into a technical ludite and as a tech company you got to ask yourself, is this worth it?

    Is there a business in supplying coal for instance? Some people still heat their houses with it, but does that mean YOU as a business man have to run a business to supply them?

    Ask yourself, how much time does it cost you to keep the people happy who want PHP4 and how much that same time could have earned you in business from PHP5 customers.

    Go into your local shopping district and you can probably find stores that still cater to people who haven't moved on, who still do their shopping at the corner store. It is quit fun actually, but who would you rather be. The owner of a corner store struggling each day to pay the bills, or the founder of Albery Heyn, the corner store that made it big?

    The hardest thing a good business man has to learn is to learn which customers to let go.

  • Re:Finally (Score:5, Interesting)

    by dgatwood ( 11270 ) on Wednesday May 06, 2009 @04:27PM (#27850745) Homepage Journal

    Because it's syntactically similar to C. It's remarkably close to what C++ should have been---C with classes, integrated hashes, variable-length arrays, and usable string manipulation. Thus, for long-time C programmers, it's a very natural language to pick.

  • Re:Finally (Score:3, Interesting)

    by ShawnCplus ( 1083617 ) <> on Wednesday May 06, 2009 @04:33PM (#27850841) Homepage
    I've programmed in both C and C++ and I've used PHP GTK and I'd choose X86 Assembler to build a GUI before I choose PHP for desktop GUI development. And all of the benefits you mentioned are almost completely alleviated with Boost
  • by PCM2 ( 4486 ) on Wednesday May 06, 2009 @05:02PM (#27851307) Homepage

    Oh and $array[] = $value;
    Coding, you should learn it.

    Or maybe the PHP designers should, cuz I know quite a few programming languages and that syntax does not look like "append a value to an array" to me. It looks more like some kind of borked pointer assignment, or a way or re-initializing an array to contain a single value.

  • Re:question: (Score:5, Interesting)

    by SnapperHead ( 178050 ) on Wednesday May 06, 2009 @05:49PM (#27852047) Homepage Journal

    They are really going to destroy the language with this idea. Its a *VERY* bad design decision, and they really don't care what the community thinks of it. People suggested using ::: ... that claim its too many characters to type. Ok, how about : or . or one of the other suggestions.

    The decision was made in IRC without any community input. People are very unhappy with it, and they don't care. It almost makes me embarrassed to be a PHP developer.

    Maybe with some luck, a competent development team will fork it.

  • Re:So... (Score:3, Interesting)

    by ukyoCE ( 106879 ) on Wednesday May 06, 2009 @05:52PM (#27852089) Journal

    There are some new features in php 5 and php 6, but besides some worst offenders (magic quotes and registered globals) are entirely backwards compatible with PHP 4 code.

    I had the pleasure of upgrading a Large website from PHP 4 to PHP 5 and it was honestly quite trivial. 5 to 6 will be the same, except for removing the option of turning magic quotes and registered globals back on. But you fixed it the right way from 4 to 5 by not using them anymore anyway, riiiight? :)

  • Re:So... (Score:2, Interesting)

    by amicusNYCL ( 1538833 ) on Wednesday May 06, 2009 @06:44PM (#27852645)

    I'm sort of curious as to the scope of changes that you actually do to migrate a site, what are you really needing to do that causes the customer to decline, I mean how much work is really necessary? What things are you finding that you need to do consistently to move a site from PHP4? When most people have asked me what might break when they flip the switch on the server to go to PHP5, I usually just talk about the changes in default settings, like register_globals being disabled (which never should have been used in the first place), or safe mode being disabled (which wouldn't have an affect really anyway).

    I'm curious to get your feedback on what kinds of changes actually need to be made though, I've been developing with PHP since before 5 was ready to go, but I really haven't run into very much incompatibility at all as I move things between versions. The biggest problem I have is needing to port something for PHP5 down to PHP4, where I have to find compatible definitions of functions that are now built-in (json_encode comes to mind). And most of the time that happens, I end up convincing them to upgrade to PHP5 once I point out how old both PHP4 and 5 are (PHP5 is almost 5 years old at this point, PHP4 is 9 years old this month).

  • Javascript anyone? (Score:2, Interesting)

    by spanky the monk ( 1499161 ) on Wednesday May 06, 2009 @06:52PM (#27852737)

    I would love to see JavaScript on the server side. It's already way more powerful than php5 with (superior) prototypal oo, higher order/first class functions and many other meta-programming abilities.

    All it needs is some good libraries. There are people [] already working on this. Soon... soon.

  • by amicusNYCL ( 1538833 ) on Wednesday May 06, 2009 @07:18PM (#27853029)

    One of these things just doesn't belong

    hmm.... let's check the rankings at

    python: 5.548%
    ruby: 2.692%
    objective-c: 0.134%
    smalltalk: 0.125%
    PHP: 9.921%

    So apparently PHP is the one that is not like the others, because the ranking for PHP is more than the rankings for everything else combined. []

  • Re:Finally (Score:3, Interesting)

    by ooloogi ( 313154 ) on Wednesday May 06, 2009 @09:07PM (#27854151)

    I didn't mind PHP until I tried porting a a PHP text processing application I'd written into C++. The conversion into C++ (with STL and Boost) was essentially line-for-line, so the lines of code was the same, but the C++ was more readable. The PHP runtime was 32ms, while the C++ was 1.9ms.

    Even in PHP territory, PHP wasn't giving any advantages, but several disadvantages.

  • Re:question: (Score:3, Interesting)

    by Dragonslicer ( 991472 ) on Wednesday May 06, 2009 @09:32PM (#27854351)
    I think it's an incredibly stupid decision too (when we saw the decision at my last job, we decided never to use namespaces just because the separator would look ridiculous), but it still doesn't top register_globals and magic_quotes.

The party adjourned to a hot tub, yes. Fully clothed, I might add. -- IBM employee, testifying in California State Supreme Court