![]() |
![]() |
|
Current Projects: PHP on XP Guide — NFO Viewer — Easy Reflections — Photon Storm — HotWire — FileGlider
Wednesday, November 23. 2005Prepare for PHP 6Comments
Display comments as
(Linear | Threaded)
Wow! This is going to be awesome! I hope that PHP 6 will be made, and there wont be a update for a loooooooong time...
#1
on
2005-11-24 00:55
PHP6 is going to be a maintainance realease. Nothing new but the unicode support (which is enough, though). I wonder when the lack of real references will be fixed up, that's the real pain in the butt.
#1.1
on
2006-08-10 06:43
I think PHP 4 will be around for a long while yet, or at least until development stops on it and people are forced to upgrade.
Wow
#2
on
2005-11-24 22:14
Magic Quotes GPC will be removed
I wonder how php6 will behave without it, will it be like Magic_quotes_gpc off or on?
For it to make any sense removing it, I would say it will have to now act as if it's always turned off. The whole point I believe is to "not mess with the data" (i.e. by auto-quoting it) which is what MQ does at the moment, and causes a lot of problems for newcomers as a result.
As a developper i'd really like to be able to type int in a function lets say
getuser(int $ID)
and therefore have it auto converted to an int instead of doing
a settype();
This would make it easier to write database scripts with ints.
also one thing that really ticks me is the
$foo[]="patato";
foreach($foo as $value)
send an error.
I think its not auto converted to array because of some legacy way to check the 0 value of a string but auto convert is all i have to say.
the "goto" i think is jsut dangerous. I mean just that everyone will jump on that publicly is that really worth the really uncommon times when this is usefull? I mean it'll just lead to so many bad uses.
What i would like and I know this might not be "the php way" is overloading of functions. i understand maybe not with the types
getUser(int $ID)
getUser(string $name)
but atleast with # of elements.
getUser($arg1)
getUser($arg1,$arg2)
the case where there is more arguments than any of those goes to the biggest one.
But good job everyone.
#4
on
2005-11-25 18:19
Hi Steph - you can cast to an int using (int), i.e.:
$string = "123";
$int = (int) $string;
var_dump($int);
Or did you mean something else?
Also, your foreach code works fine here!
re: GOTO - they won't actually be adding the command at all, just the ability to break to a label (which would have to be non-nested and further down the script), so it's not quite as bad as the spaghetti code that a real 'goto' function would create :)
Function overloading would be useful, I agree. You can sort of emulate it with variable function parameters, but it isn't the same thing!
this:
$foo[]="patato";
foreach($foo as $value)
breaks if zend optimizer is on for the server. It works ok if zend isn't enabled.
PHP6 has some interesting ideas.. Thanks for the report!
I agree totally it would be fantastic to be able to overload the class __constructor function (even if only with different numbers of parameter)
#4.2
on
2007-07-08 17:33
Well, you could do overloading now too, as in
function func1($var1, $var2 = 'uninit', $var3 = 'uninit')
{
if($var2 != 'uninit') doWhatever();
if($var3 != 'uninit') doSTElse();
}
#4.3
on
2008-05-19 19:01
First, nice article. Very well formulated!
I wish to the PHP Gods that they would take some kind of consideration to the mail() function and enforce the mail be sent from a user instead of the apache (nobody typically) user. This way hosts can track down SPAM and take appropriate action on who sent the mail instead of grep'ng through log files and trying find out who the hell sent them.
It was proven by php_suexec that it can be done, why won't the PHP group try to do something about it? php_suexec has proven to be a complete nightmare to run on a shared environment, but it would be nice if the user's space executing the script would have some kind of tie back to the actual user.
Just my $0.0.2.
At the moment the onus is on the web host to implement some kind of spam checking system. I think if the PHP group are going to make PHP more 'web host' friendly then there are quite a few different things they could do, this certainly being one of them.
It would be nice to see some movement towards having a framework built into the language. I've come from a Delphi environment. Certain things are built in - TObject, TApplication, TDataModule, TEvent, TMessage, etc.
I would like to see this sort of thing as the start point. Many of the frameworks I see for PHP assume that PHP will ONLY be used for web development. If PHP support a framework that was input method agnostic, then we could start building apps that where GUI, WEB, CLI all with the same code.
For a lot of non PHP developers, PHP is seen JUST as a web scripting language, whereas their language can also do GUI, CLI, etc. They already have a strong OOP model to work from.
I like PHP. I like it a LOT. I already use it instead of .BAT/.VBS and a lot of .C/.C++ stuff for CLI scripting. Simply because I can re-use code INSTANTLY across all the development platforms, no need to recompile and fix 1 file and all platforms benefit from the fix.
Having said that, this would also make PHP something quite different to what it is now. And that may not be a good thing.
Some things I would like to see changed is that sessions should be COMPLETELY within userland and be an object. At the moment, if you use a OOP DB based session, you don't get the control over closing the session OR the db in the right order. If (using Delphi ideas), a TSession object was available (sure it would be a singleton), you could attach it to your TApplication and TDataModule objects and when TApplication was destroyed, it would go through it's children and destroy them. A completely ordered and structured shutdown. Currently it seems more like a bailout - first come first dies - no order, no control -get it wrong and you don't even know!
Whilst some of the clean up going on is commendable (register_globals, safe_mode - bye bye), there isn't anything MAJOR. Just some stuff which should have gone a while ago. Tinkering rather than advancing.
#6
on
2005-11-28 08:45
There is a very definite disparity between traditional application level languages (Delphi being a good example) and those orientated for the web, but I do feel this is a legacy problem rather than a language structure one. PHP could easily have an internal framework for us all to extend, and maybe that is what Zend is moving towards now? But until it exists (in an 'official' capacity) people will continue rolling their own. There are a few movements to take PHP to the desktop, Winbinder and PHP GTK being two that spring to mind, but the whole architecture of PHP doesn't lend itself to creating desktop apps very well at the moment, whereas that is exactly what Delphi was built for.
I agree that 6 doesn't appear to be a major leap over 5 right now, but for me at least 5 (and specifically 5.1 with PDO) was a really major leap over 4, a big enough leap to keep momentum going for a while. Right now 6 appears to be something of a 'clean slate' version, and from this clean slate who knows what new directions it may grow?
To be honest, I think that would be a very bad move. Any time you require a framework you alienating developers (for example me... You can pry CakePHP from my cold dead hands... especially to replace it with zend... BLEH.)
The addition of stuff like phpGTK is awesome, and I am very interested in it, especially when Webkit is brought into the picture... But they should remain as build options.
If I had my wishes when it comes to php, I'd beg for operator overloading. s'all.
Yes. 4=>5.1 +PDO is MAJOR in terms of OOP DB.
And 6 is sounding very much like a clean slate.
And yes, winbinder and GTK are both options, but it would be nice if there was a platform-agnostic method for GUI development. Maybe just something as simple as adding event handling and messaging would be enough.
The main issues I have with both winbinder and GTK is that winbinder is windows only and GTK doesn't look like a windows on windows or mac on mac or x-windows. It has a proprietary "smell".
Very exciting times though!
#7
on
2005-11-28 14:25
A number of issues raised here are not final yet. The {} [] issue is likely to turn into the decision that current behavior will not change. The labeled break that's presented here will most likely not be done with the "break" keyword. It is still being discussed, but "goto" and "jump" are among keywords being considered.
#8
on
2005-11-28 17:55
Yes absolutely, these are moving goalposts so to speak, which is why the article starts with "I'd just like to make one thing very clear: what you read here (or in the original minutes) are in no way the 'fully 100% decided' end results / changes that we'll see in PHP6.".
Finally it happened. Thanks Lord.
#9
on
2005-11-28 17:58
Thanks for taking the time to boil the minutes down and post the information. Very interesting.
I like to see default FastCGI module like SAPI. and more efficient cache module like eAccelerator.
#11
on
2005-12-28 09:12
I have (for some time now) started my new projects to be only php5 compatible, and eventually porting the php5 OO code to php6 should not be much of a problem.
The speed advantage by using Zend Engine 2 (php5) is absolutely amazing, compared to php4.
Again, it's only the super-slow acceptance of php5 and php5.1 by major web hosting companies that is slowing down the adoption of php5 and, especially, php5.1. From a Linux/Unix perspective, the adoption process should surely speed up if permanent teams could be assigned to the php project to create packages for all the major Linux distributions as soon as a new php version is made available.
If I don't compile the latest sources myself, I usually have to wait about 3 months+ for binary packages to appear, and about 8 months+ for SOME of the hosting companies to adopt the new version.
Strangely enough, this never seems to be the case with php4! You will probably always find the latest-and-greatest php4 version on your host. THAT is what is hindering php5+'s progress so much, to spite the fact that it is so much superior to php4!
#12
on
2006-01-17 07:22
That there would be a very slow adoption of PHP5 was obvious and inevitable, not least because PHP5 is not fully back compatible with PHP4, and almost certain to cause problems and broken scripts for hosting customers. With some reluctance as it is a shame, but with the benefit of experience, from the word go we were advising customers looking to protect their scripts and achieve maximum market penetration to stay with PHP4 for a good 18 months if looking to produce applications for any type of end user.
The relative willingness for hosts to upgrade to newer PHP 4 releases is also hardly surprising or strange at all, although not always prudent. An ideal way for a host to manage the change to 5 would be not to blindly rollover from 4 to 5, but to augment their servers with PHP 5 so as to offer both 4 and 5, offer a default mapping of common php extensions to either PHP 4 or 5 on a per customer basis, and support explicit .php4 and .php5 suffixes. Nice idea, but how many hosts in the $5 a month shared hosting market are going to make that type of effort for their customers? Probably not that many we suspect.
Well, this year finaly PHP4 support will stop and no new fixed will be relased after sommer since a bug was found wich only can be fixed in php 5.2+ So, coders who are still not familiar with PHP5 will have to learn how to upgrade the code, the PHP6 will come.
Terrific Blog you have. Peace Out.
TreeFrog
#13
on
2006-02-22 04:03
I think Steph (#4) was talking about type-hinting for types other than Object or array. Yeah, that would be nice. But "variant" types are also good too ;-)
#14
on
2006-02-28 00:58
I think type hinting should be allowed.
But then this really does change the nature of PHP of being loosely typed.
Take ...
Having to make sure that someone didn't do ...
This doesn't cause any errors at the moment.
An issue though ...
PHP _is_ primarily for the web.
Web user input is ALL plaintext or file_uploads.
A field asking for the day of the month on which the user was born COULD easily accept the value of 'RQ'.
Sure it is stupid and it teaches us we have to have the startpoint of all user data as being junk.
The only issue with type hinting is the fact that you would have to convert the value BEFORE calling the function.
I think it would be nice to have the type hinting for documentation purposes, but to not, at this stage, enfore them.
Thanks for taking the time to go through the minutes. Some very interesting and good ideas there. I personally can't wait untill PHP 6, even if it does mean I need to change a few things.
Kewl blog you got goin on up here.
Peace, JiggyWittit
#16
on
2006-03-06 07:46
Wow I just made a web search about php6, I didn't knew that it will come :)
Good news
I think they should rename functions to a standard naming convention. Maybe have an option or special filename extension for old files (.php5) and allow old function names as well.
#18
on
2006-09-10 18:59
How do dates prior then 1970 handled on windows system by default
#19
on
2006-10-05 19:18
i'm glad that they kill Magic Quotes
It was an admin nightmare to switch it on/off for every site that needed it or didn't need it
No strict typing yet. PHP is dying.
#21
on
2006-11-15 09:54
Strict typing is not always necessary.
There are moves to have type hints for scalars in PHP6. It is on the todo (I think).
I personally would love the option of enforcing types on my methods which are part of a library for other developers.
The problem is that user data comes in text. You have to do SOME conversion to specific types.
And what happens at runtime when the types are wrong? Do you fall back to loose type? Or do you have an enforcement mechanism or what.
A lot of this goes away though if you use the input filtering techniques available.
Get the data into the correct type as soon as your script starts (a Poka-Yoke sort of thing). From there on, either the data is valid and in the right type OR it is invalid and must be reentered.
As for PHP dying, well, as a ZCE and someone gainfully employed to sit in my goldfish bowl all day long writing applications using PHP, I would have to say you are talking out your arse! ;-)
Strict type checking may be good for banking, aviation or military systems where handing in an int instead of a double could cause you some grief, but for most systems it's overkill.
What is really good in PHP5 is the inclusion of interfaces, parameter interface hinting and the instanceof operator.
You can do whatever typing you want, and it means you rarely access scalar data which isn't encapsulated, so you probably aren't going to get a value you don't expect, or you can plan ahead for it happening.
You can also then declare 'base' interfaces you expect for behaviour and grow behaviour onto them, scaling the level of the interface to match the operation which you would like to perform with the implementation.
#21.2
on
2007-07-19 15:45
Yeah right - non-strict typing is what makes PHP so neat and practical! So if anyone is dying.... it's not PHP.... :)
I would have liked to see the introduction of overriding constructors and functions. But maybe I am stuck in my Java ways, just like I still don't see the benefit to having __construct() as the constructor method rather than simply using the class name.
I wonder if Zend will finally ditch the mysql_* functions and force mysqli connections (?)
There does seem to be some good cleaning up done, but for those already using best programming practices in PHP5, will most likely not notice any differences or major benefits.
The constructor is __construct because people change code all the time and refactor. It's an unnecessary chore. __construct has a specific purpose just like __get, __set, __sleep, and __wake have specific purposes.
Why no just make mysql_ functions be aliased to mysqli_?
#22.1
on
2007-09-18 19:57
Get the data into the correct type as soon as your script starts (a Poka-Yoke sort of thing). From there on, either the data is valid and in the right type OR it is invalid and must be reentered.
As for PHP dying, well, as a ZCE and someone gainfully employed to sit in my goldfish bowl all day long writing applications using PHP, I would have to say you are talking out your arse!
Lets not forget about mysqlnd!!!!
Mysql Native Driver will replace libmysql all together.
http://www.google.com/search?q=mysqnd
PLEASE IMPLIMENT GETTER / SETTER METHODS but if you're going to do it, make it done how C# does it.
private $__dbpass1 = "password_search_dataonly";
private $__dbpass2 = "password_to_insert_data";
public $dbpass
{
get{ if($this->usertype == 1)
return $__dbpass1;
else
return $__dbpass2;
}//end get
set{}
}//end $dbpass
#25
on
2007-01-12 04:36
It's already possbile:
public function __get ( $var ) { }
public function __set ( $var, $content ) { }
public function __call ( $function, $arguments ) { }
#25.1
on
2007-05-09 17:08
Hmm. Not quite. These magic methods are to deal with NON defined properties/methods.
You can't define a property as read-only (i.e. no setter).
Effectively you have to use the magic methods with a huge switch statement to see if the parameter/method being asked for exists. The __call method is particularly useless. If the method doesn't exist, why has it been called and how are you going to deal with it. Sure I understand you could be using this to bypass a protected method from an external call, but that's about it.
By having discrete setters and getters you can add accessibility to the properties/methods of a class. Currently we have visibility (public, protected, private). With accessibility we would also have read/write, read-only and write-only (though write-only is probably pretty useless, it is a by-product of accessibility).
The other advantage of having a proper definition is that auto-documenting tools can correctly read the definition and report it as such. The runtime engine can automatically trap write access to a read-only property, etc. All good stuff.
And I think you could now start dealing with event triggering in a more natural way. When PHP extends WELL beyond web/cli environments into the GTK/GUI environments, having this sort of flexibility is really nice. Sure you could do it all in the magic methods. In fact with them, you don't actually need to have a public interface at all! But that is then absolutely useless to anyone OUTSIDE of the class - no reflection, no auto-documentors, etc.
--- and relax ---
This is a bit of a bug bear for me. I've come from 2 other OOP languages and these facilities existed and I would REALLY like them to be part of PHP as standard.
It looks like the same amount of code to me between the two methods, just a different syntax, and the php approach can actually cut down on the coding time by allowing getter functions to operate easily between member variables of the object, and to proxy the calls to a, say, internal ArrayObject in a very efficient manner.
I also think that the ability to use __call as a proxy implementation is excellent.
I'm back coding some PHP4 at the moment and keep coming up with instances where using proxies to perform polymorphism would be invaluable, so am itching to get back to 5 and get into 6.
#25.1.1.1
on
2007-08-01 22:18
$foo = $_GET['foo'] ?: 42;
(i.e. if foo is true, $foo will equal 42).
Does anyone else read it as:
if foo is false, $foo will equal 42?
#26
on
2007-01-16 03:06
that's exactly what i just wanted to reply - if foo is false, $foo will equal 42, not when it's true. the syntax is
BOOLEAN ? statement-if-true : statement-if-false;
ciao
Make the function/method names CONSISTENT! Take PHP 6 as an opportunity to fix this problem. Start it afresh, we are ready to relearn and put effort to make PHP better. Make the function/method names consistent. PLEASE FOR FUCK'S SAKE!
#27
on
2007-03-24 14:17
Hi.
The URLs sent in the email notifying us of new comments are incorrect.
e.g. http://www.corephp.co.uk/archives/19-Prepare-for-PHP-6.html#822
There is no name="822", but there is a name="c822" and if you amend the URL to ...
http://www.corephp.co.uk/archives/19-Prepare-for-PHP-6.html#c822
the link works.
***I think they should rename functions to a standard naming convention. Maybe have an option or special filename extension for old files (.php5) and allow old function names as well.****
i just wonder.... what about some functions that can call native .dll or .so functions? i guess that will make an impact, just a suggestion :)
#31
on
2007-04-17 07:41
There is. Sort of. http://pecl.php.net/package/ffi
I'm not really sure how far along this is or anything, but this was an answer I got some time back when I thought exactly the same thing for the GSoC.
It's probably just me, but I can't help feeling that we'd all be much better off if the PHP Group abandoned their aspirations for PHP 6, and concentrated on wrapping up PHP 5 and letting it mature gracefully. By all means address the most dire things such as the naming inconsistencies with function name aliases and a few other features plus a documentation rewrite, but do this under the banner of PHP 5, and then let the other shortcomings and quirks be accepted as part of PHP and leave it at that. After 10 years or so, job done!
With no more tinkering to the language allowed, concentration can be firmly focussed on fixing the remaining bugs and security flaws, and not just those that were added afresh with the last release, and hosts and developers alike can breath a sigh of relief that there's not going to be a further upgrade hurdle to deal with. The caching tools can also be made more reliable, and with no more changes to the virtual machine, less maintainance is required for those too.
With stability finally in the PHP camp, hosts that have put off updating to PHP 5 so far will catch up and do so, more developers will switch over to PHP 5, and those that love PHP will continue to use it to their hearts content, and those that don't will use Ruby.
Module development will still be allowed, and modules added or updated as necessary.
PHP would remain successful and popular for some time to come, possibly more so from a level of stability that had always eluded it thus far, and it would benefit from the increased market confidence that a mature and stable language and environment attracts. It would be maintained as necessary by a cutdown PHP Group, and those that depart can be released to move onto pastures new.
Unfortunately I fear that the temptation to tinker is too great, and no doubt some people are already thinking of what they want to add to PHP 7,. This is inevitable given the heritage of the language.
Given that PHP 6 will almost certainly be a given, let's hope for stability, less of a temptation to tinker and make mindless changes to the language that only give grief. We've all seen with the likes of Michael Jackson what happens when the desire for perfection is pursued mindlessly and long after enough is enough. PHP needs to be left alone to mature gracefully, and not receive the constant attentions of the software equivalent of the plastic surgeon.
#32
on
2007-07-09 20:16
I agree and disagree on several fronts. First, I don't believe PHP is an "unstable" language by any stretch of the imagination. And the large number of very high profile sites using it to service millions of requests per day only act as evidence of this.
The problem with the PHP 5 adoption rate has precious little to do with stability and everything to do with the web hosts. Developers will not shift to something they cannot deploy easily, or create apps in languages that only have a tiny potential market because the web hosts are largely ignoring it. If they create the same problem for web hosts in moving to PHP 6 then we'll see even more fragmentation, and PHP support will continue to decline.
Freezing the language will not benefit it in the long run, there are features missing from 5 that are essential (decent overloading, full type hint support, namespaces, etc). What they have to do is make sure that PHP 6 is fully compatible with anything written for PHP 5 - and if they don't they're only going to keep ringing the death toll.
#1 "And the large number of very high profile sites using it to service millions of requests per day only act as evidence of this."
#2 "there are features missing from 5 that are essential (decent overloading, full type hint support, namespaces, etc)."
It's tempting to believe #2, but if #2 were true then we might not have '#1.
You're right in that PHP is generally stable, but that said, take a look at any snapshot section of the PHP change log and you'll find a handful of crash reports and other bug fixes of various levels of severity, and some of these come about as a result of tinkering in previous recent revisions.
In fact, "decent overloading", "full type hint" and "namespaces" aren't essential. Of course some of those might be nice, and strict typing if anything would be my own personal number one, but none of these are essential. There are more basic flaws in the language that could be tidied up to good effect, but the language is what it is, and even in its current state, it's perfectly useful as evidenced by the large number of PHP creations out there. How maintainable much of the codebase of PHP applications will prove to be over time when original developers leave and new ones come into the fold and have to deal with uncommented and poorly designed code is unknown, (take CakePHP as an example of a nice framework but totally uncommented and presenting a huge maintainabiliity problem as a result), but PHP 5 has enough concepts to make it possible to develop maintainable code that should have longevity.
I do agree that there are some features that might be nice to have, but freezing the language, tidying up the rough edges such as addressing inconsistency in the libraries, and putting effort into some other aspects of PHP and php.net to make it a more rounded and complete offering might benefit PHP and those who use it in the longer term.
Whatever happens though, it's still my own favourite web language :)
#32.1.1
on
2007-07-10 00:53
We have #1 because PHP is so versatile they are capable of adding in whatever they feel is lacking :) The rest of us 'mere mortals' have to live with whatever the PHP group give us. Yahoo for one may use PHP extensively, but they sure as hell use a very customised version of it, with plenty of Yahoo specific modules loaded.
The maintainability of the codebases out there has nothing to do with PHP as a language in my opinion - documentation (or lack thereof!) and poorly designed code is something that plagues all languages, because it's a human created "error" / lack of foresight / time. I have reams of source code from my Atari ST and Spectrum that I wrote a few decades ago, and I sure as hell couldn't tell you what a lot of it does because I didn't think I needed to comment it at the time :) But the system I recently built for a major movie studio has more lines of comments than it does code. I guess people just prioritise based on their time commitments.
PHP5 made the right move re: OO, it really sorted out a lot of OO issues that PHP4 had, and some of the things I mentioned previously will go to completing that move. As it stands it's 80% there, but the remaining 20% is just as important. I would love for them to not move all of those to PHP 6 though, I'd like to see the changes in PHP 5 because it's just finishing what was already started.
The main reason they want PHP6 to be a 'new' release is most likely the Unicode support in the core. I imagine this is going to create hundreds of new bugs, especially given how complex a change it is. But all we can do is trust they do a good job of it, and if our skills allow, help them do so.
"The maintainability of the codebases out there has nothing to do with PHP as a language in my opinion"
You're quite correct. As a kid at school I was churning out tons of machine code writing rom modules for the BBC micro, and not so long after wrote a complete multitasking OS in assembler, and even though they were very low level and sizable, they probably *would* still be vaguely understandable because I had to comment the code and make it highly modular just to keep track of what I'd written from one day to the next, never mind 20 years later if I ever went back to them :)
The changes in PHP 6 should be less dramatic than for PHP 5, but I still see trouble ahead if things change too much. Only time will tell.
#32.1.1.1.1
on
2007-07-10 10:12
ifsetor isn't too difficult. After reading the article i hacked it out.
function ifsetor()
{
$numargs = func_num_args();
$i = 0;
while($i < $numargs)
{
$current_arg = func_get_arg($i);
//var_dump($current_arg);
if(is_bool($current_arg) && $current_arg == true)
{
return $current_arg;
}
else if(!empty($current_arg))
{
return $current_arg;
}
$i++;
}
return false;
}
Goto
No 'goto' command will be added, but the break keyword will be extended with a static label - so you could do 'break foo' and it'll jump to the label foo: in your code.
-
Hrmm, seems dangerous in my opinion, as what about doing a switch(true)?
ifsetor()
It looks like we won't be seeing this one, which is a shame. But instead the ?: operator will have the 'middle parameter' requirement dropped, which means you'd be able to do something like this: "$foo = $_GET['foo'] ?: 42;" (i.e. if foo is true, $foo will equal 42). This should save some code, but I personally don't think it is as 'readable' as ifsetor would have been.
-
This also seems inconsistant, as in some languages "$foo = $_GET['foo'] ?: 42;" would mean use 42 if not the get is not true, as there is the : present. As it would make sense "$foo = $bool ? $if_true : $if_false;" so if you just want true use "$foo = $bool ? $if_true;" if you just want false "$foo = $bool : $if_false;" or at least have it like so "$foo = $bool ? : $if_false;" or "$foo = $bool ? $if_true : ;". So to summarize, "$foo = $bool ?: $if_true;" is misleading as the $if_true value is where the $if_true value would be if it was extended. So I strongly disagree with this as it is too ambiguous.
Somthing PHP relly lack is possibility for complying the code like java does (or as .dll). There might be many reasons why this ability does not exists but it would be awesome.
#35
on
2007-08-03 17:27
The ability to compile might not be a built in feature but there are bytecompilers out there in the community. You just have to look.
#35.1
on
2007-09-07 15:23
A nice move. But if you ask me: the team is simply fixing the shortcomings of PHP 5, and shuffles some functionality in and out of modules, with barely a noticeable new feature to the language itself.
#36
on
2007-08-07 10:33
Full unicode support atlast !!
yay...will switch instantly..just provide good unicode implementation :)
just look at c#..it's got perfect support for unicode.
unicode..the only thing that can make php 6 _exciting_ :)
#37
on
2007-08-08 21:22
Maybe the wrong forum but:
Could PHP7 have multiple inheritance enabled for those who wish to do it?
That would be the best thing - to have a responsive language with multiple inheritance.
#38
on
2007-08-09 23:08
Looks great! I like E_STRICT being merged into E_ALL and magic GPC and all those horrible features removed. However, I want real references. Pointers, please.
Looking forward to 64-bit ints as well.
And yeah, native Unicode = win.
Why do you need pointers for PHP? References relate to something, whereas pointers just point somewhere and potentially nowhere.
I think the folks on the PHP team should make a decision about whether or not their language is procedural or object oriented. Namespaces would not only make sense for PHP but I would also heavily suggest to them that they help developers foster code maintainability in their projects, such as allowing classes to be defined one per file without blowing the memory limit for script execution on multiple require calls.
The PHP language also lacks a database transparency layer (and I don't want to get into talking about PEAR, I've never been fond with the way they construct their class library) to aid developers in making database access more seamless when switching from data provider to data provider.
And please for the love of all that is holy, let me finally be able to declare a variable with a type. Not declaring types doesn't allow my "program" or script to reserve the memory required for all of the data it needs to contain. It just sort of does whatever it wants to with respect to memory and often times not to well.
At any rate, I'm glad they're still moving forward but they need to make some choices about the language itself and not just keep piling stuff into it with no real direction.
#40
on
2007-09-11 08:54
Just wondering what version of PHP you're using?
Check out PDO/SDO if you are 5+
If you have any script that blows the limit then you may have these problems:
If it's before 5:
always use the & when creating or using references to objects. i.e
$foo =& new Bar();.
Do not use foreach when you have an array of objects
Return a reference from the called function.
If you have an object with a parent reference implement a Dump method rather than trolling through recursive print_r when debugging.
Otherwise > 5 you seem to have some real issues with memory management - this is what Garbace Collection is about. GC happens in most languages now, it's automatic.
A Scalar type takes a fixed amount of space, an object is a reference so there is no duplication of space other than that taken up by the reference. If your script is blowing out memory on your server then you have some server configuration problems I think.
As for typing. When do you ever see a naked value? In one instance, which I believe should be called by 'getSafe()' which is the interface between the source and the internal implementation, unless you're knee-deep in the guts of the manipulation. Otherwise you are dealing with interfaces to objects and understand what the contracts are.
#40.1
on
2007-09-12 23:23
I just hope PHP will become more low level. I can see MANY advantages in memory allocation for custom types (like in C) and even bit or byte control. This would lead to an explossion of fast and reliable opensource code.
I'm especialy thinking about streams and networking (even fast encryption) with sockets.
Until then, I'll wait :D
#41
on
2008-03-01 18:55
PHP 6 will have some features that i always wanted PHP to have.
I think that another good addition it would be "operator overloading".
I have found a library in PECL about that and i just hoped to be included in PHP6, but i guess i have to wait for PHP7 :p.
#42
on
2008-03-18 00:13
I'm Argentina, on here we are using PHP4.
#43
on
2008-04-18 14:41
Support for PHP4 will officially stop on 2008/08/08. Though I suspect many people will still be offering support.
#43.1
on
2008-05-17 12:40
Any ideas of when PHP6 will be going public. I've noticed its listed in the manual, but no release of yet.
I am really looking forward for PHP 6 regarding unicode feature , I am eager to learn how to create universal websites using PHP 6.
I don't know when php 6 will be official release date?
I'm looking forward to APC being integrated into the core. It's still not there in the snapshots. Big shame there is no multi-inheritance though.
I liked those changes.
The only thing that i'm worry about is the "goto". I don't think it's gonna help anyone.
#46
on
2009-01-20 11:47
"Support for PHP4 will officially stop on 2008/08/08." I do not think, that we need support for PHP4 - it works fine!
I wonder if Zend will finally ditch the mysql_* functions and force mysqli connections (?)
I will really will love to see functions like str_open,str_pos etc. in stead of fopen,strpos etc. and the earlier functions becoming aliases.
#49
on
2009-04-13 08:06
What is the point in making this a major relaese. It isn;t sufficiently different from PHP5 to be anythig more than PHP 5.4.
Anyone serious about OO coding is crying out to a whole raft of proper OO features and we are being ignored.
Doing the job right "Just isnt the PHP way" is not an excuse, never was, never will be.
Sweet, im looking forward to php6, although php5.3 will implement a lot of things i need pretty soon, which is cool.
Looking forward to PHP6. Code written in the right way is more exciting to work with.
I have some old websites I wrote 10 years ago that are awful but still work. Nice to know they are still going but now I HAVE to go and re-write them when my host updates. Oh man that sucks!
I do hate it when there is no choice for backward compatibility. I don't care about those sites, they work just fine so why do I /have/ to change them?
bah! I'm busy enough these days with other things! That's why I've not rewritten them yet!!
#53
on
2009-07-30 00:23
The author does not allow comments to this entry
|
My AS3 Blog
Photon Storm Great PHP links
C7Y PHP Podcast CorePHP is hosted by |
We're putting a lot of thought in at the moment for our transition from PHP 4 to PHP 5. We're not the only ones waiting for the 'tipping point'... Harry Feucks from SitePoint says we have to wait for John, and I concur. Here is what John (phpever
Tracked: Dec 07, 23:30
??????????? ???????-???????? ?? ??????????? ???????? ????????????? ??? ????? ???????? ?????? PHP 4.3.x/4.4.x, ???? ????????? ???????? ????????? ????? ?????? PHP, ? ???, ????? ??????? ?? ????, ????? ????? ?????? PHP 5.1. ? ??? ???????????? ??? ????????????
Tracked: Dec 11, 10:24