Beta

Slashdot: News for Nerds

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

An Early Look At What's Coming In PHP V6

timothy posted more than 5 years ago | from the press-harder-please dept.

PHP 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.

cancel ×

307 comments

Finally (2, Insightful)

Anonymous Coward | more than 5 years ago | (#27849163)

It's about time PHP has native support for unicode.

Re:Finally (4, Interesting)

sopssa (1498795) | more than 5 years ago | (#27849823)

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:Finally (-1, Troll)

caramelcarrot (778148) | more than 5 years ago | (#27850011)

Is this a troll? PHP a nice language? Use something like Python or C# if you want a nice language that's easy to make GUIs in.

Re:Finally (1, Informative)

RichardJenkins (1362463) | more than 5 years ago | (#27850393)

Interesting thought. Does anyone use PHP for anything other than its ubiquity?

Re:Finally (4, Insightful)

rho (6063) | more than 5 years ago | (#27850565)

Ubiquity is a pretty compelling feature.

I mean, BeOS is pretty bitchin', but I'm not spending any of my time on developing applications for it.

Re:Finally (2, Insightful)

ShawnCplus (1083617) | more than 5 years ago | (#27850059)

There is the PHP GTK project but I'm a PHP developer and even I'm wondering why you would choose PHP for developing a GUI desktop app.

Re:Finally (4, Interesting)

dgatwood (11270) | more than 5 years ago | (#27850745)

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 (3, Interesting)

ShawnCplus (1083617) | more than 5 years ago | (#27850841)

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

Re:Finally (1)

joss (1346) | more than 5 years ago | (#27850085)

Funny, very very dry, but damn funny.

Re:Finally (1)

VagaStorm (691999) | more than 5 years ago | (#27849851)

$output = fopen('outputfile.txt', 'wt');
fwrite($fp, $uni); // writes out data in UTF-8 encoding

..... not where you expect it it dossent....

Re:Finally (1)

ShawnCplus (1083617) | more than 5 years ago | (#27850139)

haha, nice catch

Re:Finally (1)

maxume (22995) | more than 5 years ago | (#27850203)

Where did $fp come from?

Or is PHP even crazier than I thought?

Re:Finally (1)

ShawnCplus (1083617) | more than 5 years ago | (#27850653)

It's a fatfinger by TFA writer. $fp doesn't exist, it should be $output.

Re:Finally (1)

maxume (22995) | more than 5 years ago | (#27850767)

Ah. I only skimmed the article and failed to figure out the context.

Re:Finally (4, Funny)

clone53421 (1310749) | more than 5 years ago | (#27850583)

Too bad Slashdot still wonâ(TM)t.

I mean, won't.

Not very early (1)

ShawnCplus (1083617) | more than 5 years ago | (#27849175)

There have been "sneak peeks" at PHP6 for a long time. This is by no means early.

So... (4, Informative)

msh104 (620136) | more than 5 years ago | (#27849259)

without wanting to be overly sarcastic..

What features are they gonne break this time?

Re:So... (4, Insightful)

77Punker (673758) | more than 5 years ago | (#27849427)

Gotta break some eggs to make an omelet.

Hopefully this will include cleaning up the argument lists of the string and array functions so that they hall take f($needle, $haystack) in a consistent order. Fixing the argument lists isn't in TFA, but it's a really obvious place to start.

At work, it may give me an excuse to rewrite a horrible old app that's been holding us back since the days of PHP4. I suspect I am not alone in wanting to see some old (buggy, slow, insecure, poorly designed) PHP apps get ruined so that they can be redeveloped now that PHP5 is actually a decent language.

Re:So... (1)

tayhimself (791184) | more than 5 years ago | (#27849515)

The function naming convention needs to be fixed as well as the argument lists that you mention. The naming scheme is a little haphazard. Although if you use eclipse or another dev suite, autocompletion of the function names etc does save having to constantly look it up.

Re:So... (1)

uncledrax (112438) | more than 5 years ago | (#27849643)

mod +1; I also hate the Needle/Haystack Haystack/Needle operator ordering..
of course upgrading your code to make it compliant will be a PITA...

Re:So... (4, Informative)

msh104 (620136) | more than 5 years ago | (#27849699)

At my work we host and have build and maintain a little over 200 php websites. We host them all ourselves. ( the CMS that we use is build in PHP )

We earn money from both the hosting and the developing.

Many of our customers don't want to pay for the porting of their websites to PHP5, let alone PHP6. usually this requires upgrading the CMS as well, making modifications to custom extentions written by outsourcing partys, etc. All in all quite expensive for the site owner.

"Threatening" them with PHP4 server shutdowns only makes them go away to other hosting providers that will over PHP4 to them.

So we ended up virtualising all the PHP4 sites together with a good backup system and making our customers understand that we provide no warrenty anymore. We will help them when things blow up on an paid per hour basis.

Another problem is that we cannot reuse a lot of our code anymore now. Many of our new plugins require php5 so we have to modify them to make them php4 compatible again.

when php6 comes out we will have to support three different php versions... the horrors of that vision already scare me today..

Re:So... (-1, Troll)

Anonymous Coward | more than 5 years ago | (#27850061)

Just 200 sites? I think it is time to get off your ass and get them updated to a recent PHP version. Lazy, lazy, lazy.

Re:So... (0)

Anonymous Coward | more than 5 years ago | (#27850193)

I have slightly less than that many sites in the old version of our cms (in perl). Despite a mostly automated processes that lets me bring them up to the latest version, they're just sitting there.

Why? Users. Thousands of them. You can just force a new version of software on people, you have to provide carrots and sometimes sticks.

Or you could just upgrade them, but be sure not to complain when they get pissed and stop sending you checks.

Re:So... (3, Interesting)

msh104 (620136) | more than 5 years ago | (#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.

Re:So... (1)

Scotch42 (1120577) | more than 5 years ago | (#27850407)

I'm with you on this... I still have production site running in php3 on old debian boxes. and the customer doesn't want to upgrade an old time zinning team... just 0.05 EUR...

Re:So... (1, Insightful)

Anonymous Coward | more than 5 years ago | (#27850549)

Perhaps your customers freak when they read your spelling.

Re:So... (0, Flamebait)

Frosty Piss (770223) | more than 5 years ago | (#27850329)

"Threatening" them with PHP4 server shutdowns only makes them go away to other hosting providers that will over PHP4 to them.

That's hard to believe, both that there are any hosts still tunning PHP4, and that there are significant rumblings over upgrading to current technology.

In a day and age where staying on top of the latest software upgrades to prevent hacking and such things is simply expected, who the hell are these people that can't live without php4?

I trying to figure out what kind of troll the parent is.

Re:So... (2, Informative)

msh104 (620136) | more than 5 years ago | (#27850447)

I wish i was trolling, but trust me, i work for a company that hosts sites, and there is still plenty of php4 around. Most people don't mind the upgrading and staying up to date part so much. But they usually don't like the price that comes attached with it.

Re:So... (1)

tendrousbeastie (961038) | more than 5 years ago | (#27851103)

I'm in the UK, and I manage websites for various organisations, perhaps 10 different sites, and not one of them is running PHP5.

I can't think that I've ever seen a web host running v5. (although I accept my experience is not universal, it is merely anecdotal).

The only times I can reliably run OOP code in my PHP is when I run it on servers I own (basically my work servers.)

Cry me a river (2, Interesting)

SmallFurryCreature (593017) | more than 5 years ago | (#27850507)

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:So... (1)

maxume (22995) | more than 5 years ago | (#27849603)

Unicode support.

Re:So... (0)

Anonymous Coward | more than 5 years ago | (#27849651)

They will remove register globals and some other stupid shit which is good.

they will keep short php tags though.

Re:So... (0)

Anonymous Coward | more than 5 years ago | (#27850495)

They will remove register globals and some other stupid shit which is good.

And even more than that, register globals and that other stupid shit has been deprecated for a loooong time now, so people have no one to blame but themselves if removing that stuff breaks their code.

Re:So... (1)

AbbyNormal (216235) | more than 5 years ago | (#27850019)

But if Python [ibm.com] does it, its okay?

  If you don't like the new features, stick with the old one.

Re:So... (1)

Burkin (1534829) | more than 5 years ago | (#27850057)

But if Python does it, its okay?

No. From whose ass did you pull that strawman from?

SPOILER ALERT (-1, Flamebait)

Anonymous Coward | more than 5 years ago | (#27849293)

It's still going to suck.

Re:SPOILER ALERT (-1, Offtopic)

Anonymous Coward | more than 5 years ago | (#27849423)

And yet, it will still be better than Perl

So, when will PHP 6 be released? (3, Interesting)

thue (121682) | more than 5 years ago | (#27849389)

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.

Re:So, when will PHP 6 be released? (2, Funny)

Burkin (1534829) | more than 5 years ago | (#27849455)

I heard it'll be released the same day as Duke Nukem Forever as 3D Realms will be using it in the relaunch of their site for the game.

Time to pay the piper... (4, Insightful)

Onyma (1018104) | more than 5 years ago | (#27849419)

I am definitely no PHP expert so perhaps I am wrong but it seems that much of what is being changed is backtracking due to bad language decisions from the beginning. Sadly I think PHP developers with legacy code are going to be paying the price for several versions to come.

Re:Time to pay the piper... (5, Funny)

FictionPimp (712802) | more than 5 years ago | (#27849451)

This is why I never write legacy code, only progressive forward thinking code!

People who write legacy code are just not thinking of the future.

Re:Time to pay the piper... (1)

zwei2stein (782480) | more than 5 years ago | (#27849725)

You will love it when they add functional approach and constructs. Declarative style in php for more points!

Re:Time to pay the piper... (4, Insightful)

Anonymous Coward | more than 5 years ago | (#27849541)

You're not far off track. A lot of PHP's problems stems from the fact that the language itself was more or less kind of thrown together rather than planned out (from the early simple Personal Home Page scripting stuff to PHP3 that just kept extending things and adding more functionality bolted on). They only just began to start to stabalize some of that in PHP4 and really only started to fix a lot of issues in PHP5 and now PHP6. They are making good strides but there's a lot of work to do (and a lot of backwards compatible considerations, I'm sure).

The good news for PHP developers with legacy code is that they've had a long time to fix things. Stuff that is going away has been deprecated for many versions now so none of this should be a surprise. The people that will get hit are the site administrators using PHP based apps that haven't been updated in forever.

Re:Time to pay the piper... (0, Flamebait)

SanityInAnarchy (655584) | more than 5 years ago | (#27849561)

PHP itself is one giant bad language decision.

Re:Time to pay the piper... (4, Funny)

77Punker (673758) | more than 5 years ago | (#27849577)

I think PHP developers with legacy code are going to be paying the price for several versions to come.

I prefer to call it "job security".

Re:Time to pay the piper... (1)

phatslaab (1046786) | more than 5 years ago | (#27850749)

Those complaining about migration from PHP4 do have a small gripe but the fact is that the developers gave people ample time to plan for the end of PHP4 support. PHP5 has been out since 2004 - it's 5 years later!!! Since PHP is a young language that was built for a totally different purpose than what it is used for today, things like breaking backwards compatibility are necessary for its maturation. Just look at a description of Rasmus' original implementation of PHP (Personal Home Page [wikipedia.org] ) and you'll see this language needed to be altered for the heavy lifting it tries to do today. The culture had to and must continue to change. Unlike Java or other robust languages, PHP was created from the ground up to be Christina Aguilera...er, I meant quick and dirty.

PHP4 which was the first version of PHP that was really ready for widespread use was released in 2000 with much of the cruft that made PHP/FI 2 swiss cheese when it comes to security. Also, it had hacked-on OO syntax and even though you could create your own objects, it was more about OO syntax than function. PHP5 changed a lot of key things, especially those having to do with objects, mysql, new extensions, and quite a few variables.

The changes between PHP4 & PHP5 weren't that big of a deal as some made them out to be though. Its not like it went from -> to .dot syntax. Things are much less painful this time around going from PHP5 to PHP6. They are mainly doing some housekeeping, unifying some parts of the most used pieces, making it play nicely with the world's many languages, and shaving off the stuff that causes the most security problems. No biggie. The security benefits, speed, built-in caching (APC), & bug fixes give people added incentive to upgrade.

-PHP Expert

Object Oriented support in PHP (0)

Anonymous Coward | more than 5 years ago | (#27849531)

How good is the object oriented support in PHP these days?

I haven't used PHP in a couple of years. I gave up because it didn't support object inheritance very well (maybe even at all).

Feedback from anyone who is current with PHP would be much appreciated.

Re:Object Oriented support in PHP (2, Informative)

revlayle (964221) | more than 5 years ago | (#27849753)

PHP5 and, soon 6, is pretty strong. PHP5 has a fairly proper inheritance and member visibility model and is truly reference based (i.e. $objX = $objY means, in PHP5, that they are reference to the same object instance... opposed to PHP4 where $objX = $objY made a FULL copy of the object to $objX). Not perfect, but not bad - the rest of the language/API needs a cleanup, which lookd like v6 will help address.

question: (5, Insightful)

larry bagina (561269) | more than 5 years ago | (#27849543)

are these ass clowns still planning on using \ for namespaces?

Re:question: (4, Informative)

Anonymous Coward | more than 5 years ago | (#27849683)

Yes :(

Re:question: (1, Insightful)

Anonymous Coward | more than 5 years ago | (#27850065)

Can't break some eggs without raping an omelette.

Re:question: (4, Funny)

pizza_milkshake (580452) | more than 5 years ago | (#27850117)

The worst design decision yet, which is saying something.

Re:question: (4, Funny)

Just Some Guy (3352) | more than 5 years ago | (#27850573)

Can you blame them for trying to escape?

Re:question: (0)

Anonymous Coward | more than 5 years ago | (#27851149)

Oh for fuck's sake, they're actually thinking of doing it. I was hoping I had gotten so stoned that I had given the year a miss and looped around to April Fool's Day.

A likely story (5, Insightful)

Anonymous Coward | more than 5 years ago | (#27849547)

As far as I can tell, PHP 6 is probably a long way off. End of 2009 at the very earliest. Consider this: PHP 5.3 introduced RC1 in March with the idea of 1-2 week intervals, and, here in May, we're still not at RC2.

Given that PHP 6 was "rumored" to be out at least a year ago. I can't decide if the title "An Early Look" is meant to be ironic, or is just a sad indicator of progress.

Despite that, I would say that three things have recently happened demonstrating the improvement in quality of PHP:
  1. End of Life of PHP 4
  2. Many important improvments in PHP 5.3
  3. Unicode in PHP 6

I would say that (1) and (2) easily are more important for the language than is (3). PHP 5.3's improvements should be a huge change: Namespaces (I know there's a huge amount of hate for this implementation: get over it. It's going to be very useful), Closures / Lambda Functions, and Late Static Bindings in particular make it hard to wait so long for PHP 5.3.

So, stop talking about PHP 6! Lets get PHP 5.3 out.

Re:A likely story (0)

Anonymous Coward | more than 5 years ago | (#27850403)

Yeah, let's forget about Unicode, because nobody in the world needs to represent glyphs other than A-Z... Oh, wait, yes almost everybody outside the US needs to do that.
There is no technical reason why Unicode isn't the default in ALL software today, but there are a lot of people in NA, who still haven't realized that there is a world outside their borders, so it is not likely to happen anytime soon.
Disclaimer: I live in the US, so I know some of these people first hand.

Re:A likely story (0)

Anonymous Coward | more than 5 years ago | (#27850509)

The technical reason would be: not caring about foreigners...

Disclamer: I live in the US, and I am one of these people.

Interoperability ? (1, Interesting)

heatseeker_around (1246024) | more than 5 years ago | (#27849581)

Nothing about migrations between 5&6 ? and 4&6 ? does it accept old crap code running under the V6 ?

Hope it handles Search/Replace better (1)

Jason Levine (196982) | more than 5 years ago | (#27849609)

I hope it handles search/replace better. I tried doing a search/replace on a 88MB large string and the stupid script crashed! ;-)

Seriously, though, if anyone knows of any good tactics for large-string searching/replacing, I'd be happy to hear them. My current attempt is multiple page loads in an iFrame while the user is presented with a "working on it..." message.

Re:Hope it handles Search/Replace better (3, Informative)

drpimp (900837) | more than 5 years ago | (#27849671)

Like any other computer science problem, break it into pieces (think Divide and Conquer). Loading 88MB file into memory is not going to work by default anyhow, unless you set the memory limit in PHP from the default you will get out of memory errors every time. I think even a find/replace in a Windows app like Notepad or Notepad++ will "work" but it will definitely be slow. When I used to search large logs I would use some sort of file splitter and search each file itself.

Re:Hope it handles Search/Replace better (3, Insightful)

Just Some Guy (3352) | more than 5 years ago | (#27851057)

Loading 88MB file into memory is not going to work by default anyhow, unless you set the memory limit in PHP from the default you will get out of memory errors every time. I think even a find/replace in a Windows app like Notepad or Notepad++ will "work" but it will definitely be slow. When I used to search large logs I would use some sort of file splitter and search each file itself.

And here the rest of us are grepping and sedding multi-gigabyte files without thinking twice. Seriously, what's your idea of a large file?

Re:Hope it handles Search/Replace better (1)

SethJohnson (112166) | more than 5 years ago | (#27849925)

Have PHP run a command-line SED or AWK script. Without more details of how your 88mb file is structured, I can't predict how effective this suggestion is.

Seth

Re:Hope it handles Search/Replace better (1)

Bigby (659157) | more than 5 years ago | (#27850793)

Assuming this 88MB string is in a file, you should never load the whole file. Open the file and read it chunk by chunk. As you read it chunk by chunk, do a search/replace on each chunk and write the replaced chunk to another file. You need to remember to catch the matches that span more than once chunk though.

The question should really be why you are dealing with an 88MB file in PHP...

Limited cleanup (4, Insightful)

Just Some Guy (3352) | more than 5 years ago | (#27849665)

clean-up of several functions

Does that include safe_quote_string_this_time_i_really_freaking_mean_it, or do_foo(needle, haystack) and foo_do(haystack, needle)? At least it gets namespaces after all this time, even if they're almost deliberately ugly.

Re:Limited cleanup (2, Insightful)

LWATCDR (28044) | more than 5 years ago | (#27849787)

All I want is for $foo[0] and $foo["0"] to not be the same reference.

Re:Limited cleanup (4, Funny)

Just Some Guy (3352) | more than 5 years ago | (#27849833)

But that might break something that two people found convenient in 1997 and therefore can never be repudiated.

Re:Limited cleanup (0)

Anonymous Coward | more than 5 years ago | (#27850025)

Because in PHP every variable is either a class object reference or a variant (basically just a string).

One of these things is not like the OOthers (5, Insightful)

Ukab the Great (87152) | more than 5 years ago | (#27849973)

One of these things just doesn't belong

python:

myArray.append(myvalue)

ruby:

myArray.push(myvalue)

objective-c:

[myArray addObject: myvalue]

smalltalk:

myArray add: myvalue

PHP:

array_push($myarray, $myvalue)

Re:One of these things is not like the OOthers (5, Informative)

ABasketOfPups (1004562) | more than 5 years ago | (#27850291)

Or...

PHP:
$myarray[] = $myvalue;

Re:One of these things is not like the OOthers (1)

edsousa (1201831) | more than 5 years ago | (#27850299)

$myarray[]=$myvalue

Re:One of these things is not like the OOthers (1)

Just Some Guy (3352) | more than 5 years ago | (#27850451)

Python: myArray.append(myvalue)

Well, you could do something like:

>>> a = [1,2,3]
>>> list.append(a, 4)
>>> a
[1, 2, 3, 4]

and squint until it looks like list_append, but that's kinda silly. And that $myarray[]=$myvalue; syntax? That should be taken out and shot.

Indeed it does not (2, Insightful)

SmallFurryCreature (593017) | more than 5 years ago | (#27850715)

Market share: PHP 50%, ASP 49%, rest perl.

When PHP and ASP don't totally dominate the job listings, please come back to me again. In the meantime I know which of the function calls pays for my food.

Oh and $array[] = $value;

Coding, you should learn it.

Re:One of these things is not like the OOthers (1)

VGPowerlord (621254) | more than 5 years ago | (#27851037)

Fun fact: arrays are not objects in PHP*. Not surprisingly, this means that they don't have properties or methods.

*Another poster already pointed out that PHP does have array objects, and having looked, array objects DO have an append method.

Re:Limited cleanup (1)

neoform (551705) | more than 5 years ago | (#27851169)

They should have used # instead of the backslash for namespaces, that way, what I type will coincide with what I wish I was doing to the asshat that came up with that namespace delimiter.

Re:Limited cleanup (1)

clone53421 (1310749) | more than 5 years ago | (#27851247)

Octothorpe?

My items to be fixed (3, Insightful)

Parker Lewis (999165) | more than 5 years ago | (#27849679)

My items to fix: - Remove the "goto" statement that will be introduced in 5.3 (WHY JESUS, WHY??); - Stardandize function names (current samples: str_replace, html_ entity_ decode, htmlentities, htmlspecialchars_decode); - Improve array speed (for simple arrays, use internally one simple C array/list - current days, any array is a map); - Insert optional configurations by project (and not by host); - Remove function alias; - Provide optional typing for functions and parameters, but in a simple and consistent way (no strange notations); - Remove old extensions, like PDF paid extensions (and please, insert any open and official PDF extension); - As any language, provide a way of store compiled regex, avoiding compile them all the simple regex call for the same task; - Provide legacy support for PHP5 application as separated download (or at least allow PHP6 and 5 in the same host - we suffer a lot to find PHP5 Hosting in the earlier times, due the impossibility of run PHP4 and 5 at the same host).

Re:My items to be fixed (1)

Parker Lewis (999165) | more than 5 years ago | (#27849715)

I forgot: a real Locale subsystem, not one relying in the O.S. like the current (that not works on Windows).

Re:My items to be fixed (2, Funny)

clone53421 (1310749) | more than 5 years ago | (#27850679)

You also forgot: <p>

Re:My items to be fixed (1)

Parker Lewis (999165) | more than 5 years ago | (#27850795)

Yeap, bad habit to post on sites that convert new line to HTML break line.

Re:My items to be fixed (1)

clone53421 (1310749) | more than 5 years ago | (#27850803)

Change your default post settings to "Plain old text" and it will.

Re:My items to be fixed (1)

Parker Lewis (999165) | more than 5 years ago | (#27851219)

Thanks! :)

Re:My items to be fixed (1, Insightful)

Anonymous Coward | more than 5 years ago | (#27850685)

  1. Remove the "goto" statement that will be introduced in 5.3 (WHY JESUS, WHY??);

    -1 It's a useful language construct with less overhead than exceptions. I'm going to overuse and misuse it out of spite for all those Dijkstra parrots who mindlessly repeat the mantra :-o

  2. Stardandize function names (current samples: str_replace, html_ entity_ decode, htmlentities, htmlspecialchars_decode);

    +1

  3. Improve array speed (for simple arrays, use internally one simple C array/list - current days, any array is a map);

    -1 Write an extension for carrays.

  4. Insert optional configurations by project (and not by host);

    -1 You can already do this via .htaccess sans security resourse limits which should be per host on shared hosting.

  5. Remove function alias;

    -1 Some of this is already done via namespaces, the problem was extensions like ming that defined rather generic aliases in the global namespace.

  6. Provide optional typing for functions and parameters, but in a simple and consistent way (no strange notations);

    -1 PHP already has type hints.

  7. Remove old extensions, like PDF paid extensions (and please, insert any open and official PDF extension);

    +1 Work to split off all but required bundled extensions into pecl begun some time back.

  8. As any language, provide a way of store compiled regex, avoiding compile them all the simple regex call for the same task;

    ? I think APC will cache the compiled regex from PCRE?

  9. Provide legacy support for PHP5 application as separated download (or at least allow PHP6 and 5 in the same host - we suffer a lot to find PHP5 Hosting in the earlier times, due the impossibility of run PHP4 and 5 at the same host).

    ? You can already do this with cgi, fcgi and there's workarounds (ie: proxy) for mod_php.

Re:My items to be fixed (2, Insightful)

mgkimsal2 (200677) | more than 5 years ago | (#27851033)


# Insert optional configurations by project (and not by host);

-1 You can already do this via .htaccess sans security resourse limits which should be per host on shared hosting.

.htaccess only works under Apache, and then only in the context of a web request. If I'm working PHP shell scripts, .htaccess is useless to me.

Re:My items to be fixed (0)

Anonymous Coward | more than 5 years ago | (#27851249)

WHY JESUS, WHY??

Hey, they've got a reputation to uphold.

They're actually trying to stem the transformation we've seen of PHP coders from "i-taught-myself-to-code-from-forums" and "monkey-with-keyboard" style to the "everything-I-write-should-involve-a-complete-class-hierarchy-and-the-ten-last-patterns-I've-read-about" style more commonly associated with Java programmers. They're planning to do this by inserting "temptations" in the language, for example the 'goto' statement, that they hope will bring back some of the wildly unstructured monolithic spaghetti code that has become PHP's trademark.

If 'goto' proves ineffective, they'll introduce 'come-from' in 5.4, and as a last measure in 5.5, the infamous 'altergoto', together with a new experimental feature for more structured programmers, 'altr_catch'.

Namespaces (4, Interesting)

Phroggy (441) | more than 5 years ago | (#27849713)

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?

<?php
echo "Hello $Foo\n";
?>

Re:Namespaces (2, Funny)

ari_j (90255) | more than 5 years ago | (#27849945)

It'll probably just print 90 copies of an error message that makes sense on the surface but gives no indication of what it actually means.

Re:Namespaces (1)

77Punker (673758) | more than 5 years ago | (#27850251)

Use {$Foo} instead. It's the proper way to put variables in a string.

Re:Namespaces (0)

Anonymous Coward | more than 5 years ago | (#27850271)

I imagine the output of that would be the same as "echo 'Hello ' . $Foo\n;" since, for objects, PHP takes a greedy approach and grabs everything it can. For example,

<?php
class a {
public $b = 'hello, world!';
public function __toString() {
return 'goodbye cruel world';
}
}

$a = new a();

echo "$a->b";
echo "\r\n<br />\r\n";
echo "{$a->b}";
echo "\r\n<br />\r\n";
echo "{$a}->b";
?>

The first and third echo print out the same thing. The last echo prints out something something different.

Re:Namespaces (3, Insightful)

edsousa (1201831) | more than 5 years ago | (#27850373)

Say that $Foo=3
It will print
Hello 3


Because the namespace begins with a backslash ('\foo\n') and when using it inside double quoted strings must be "\\foo\\n".

Re:Namespaces (0, Troll)

bigtrike (904535) | more than 5 years ago | (#27850989)

If it's like anything else half implemented in PHP (such as exceptions), it will most likely result in: Unknown Error At Line 0 of Unknown

And filing a ticket to ask that said error be made more descriptive will be angrily closed with a resolution of "that's just the way it is"

Well wouldn't you know (5, Insightful)

omuls are tasty (1321759) | more than 5 years ago | (#27850245)

In the finest tradition of PHP, they made Unicode behaviour dependent on a setting. Have these people learnt nothing from the past? magic_quotes anyone? Bleh. All languages have their warts, but the amount of bad design decisions in this one is just staggering.

New To This version (0)

Anonymous Coward | more than 5 years ago | (#27850443)

Now we've made it impossible for stupid people to turn on register_globals - instead if you try to turn it on you get the message ERROR(Id-10-T) -- PHP-RTFM.

Working Link (1)

pdragon04 (801577) | more than 5 years ago | (#27850449)

Link in original article is returning 404. I think this is it: http://www.ibm.com/developerworks/opensource/library/os-php-future/ [ibm.com]

Re:Working Link (1)

Burkin (1534829) | more than 5 years ago | (#27850533)

No, that isn't the link from the article. What you linked is a year old, the link from the article was published yesterday.

Re:Working Link (2, Funny)

VGPowerlord (621254) | more than 5 years ago | (#27851223)

I hate to say it, but this wouldn't be the first time on /. when an article was submitted with a link that was a year or more older and the article made it to the main page. Particularly since the article the GP linked to is a year old to the day.

I can only imagine the submitter/approver looked at the date, say May 6th, and went "OMG, that's today!!!111"

Pulled by IBM (1)

iliaal (889424) | more than 5 years ago | (#27850601)

The article got thankfully pulled by IBM already, to correct a number of in-accurate statements *hopefully*

New to this version (3, Informative)

KingPin27 (1290730) | more than 5 years ago | (#27850651)

they have actually turned off the register_globals feature (really this time it won't work). If you try to use it you get an error message that says RTFM (ERROR: ID-10-T)

Wow. Scintillating. (0)

Anonymous Coward | more than 5 years ago | (#27850979)

So the "major" new features of PHP6 are UTF-8 and Namespaces. With a horrible \ delimiter. Yawn.

C# and VB have had UTF-8 and Namespaces for many years. Meanwhile C# and VB in .NET 4.0 are getting dynamic keyword support, anonymous methods (VB), co- and contra-variance, automatic properties (VB), and "From" keyword list/dictionary initialization (VB) as soon as this year. And I'm not just crooning for Microsoft, either. Python has shown much more improvement than this over the years.

I was hoping after the poor OO implementation of PHP5 that PHP6 might incline me to develop in it again, but after seeing this, no thanks.

Lipstick on a Pig (0)

Anonymous Coward | more than 5 years ago | (#27851127)

Until they throw out ZE2 and redo a new ZE3 most or all of the features of php6 are going to feel hack-ish.

Classes are not a first-class data type, so you will never be able to do real casting:

$mouseEvent = (MouseEvent)$event;

I wish someone would port php6 over to parrot or python runtimes. I've contributed to extensions for both PHP and Python (qt, pygame) and Python's engine source code is 100 times easier to understand.

Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Create a Slashdot Account

Loading...