TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

New Features in PHP 5.6

70 pointsby gulbrandrover 11 years ago

8 comments

asnyderover 11 years ago
I really like the ...$param syntax. When we first created NOLOH (<a href="http://www.noloh.com" rel="nofollow">http:&#x2F;&#x2F;www.noloh.com</a>) back in 2005 we decided on $dotdotdot as a syntactic salt, but this is obviously much nicer. Also, by ref ... is really really nice. Very few cases where it&#x27;s necessary, but having that is a pretty big deal.<p>Since PHP 5.3, PHP has gotten some really nice features, they&#x27;ve definitely been doing a pretty good job over the past few years.
agumonkeyover 11 years ago
Sure PHP had a lot of catch-up to do, but they&#x27;re really on a fast pace these days.
评论 #7079217 未加载
评论 #7077507 未加载
评论 #7077489 未加载
foldorover 11 years ago
I&#x27;m liking the variadic functions syntax. It&#x27;s definitely better than requiring all extra parameters to be sent as arrays. Even if that&#x27;s how they end up in the function.
评论 #7078517 未加载
coldteaover 11 years ago
The arguments in the linked email of some <i>Ilia Alshanetsky</i> regarding the shorthand array syntax are incredibly dense...
dhoulbover 11 years ago
Would REEEEEEALLY like to see readonly properties in classes.<p>They had a proposal a while ago to add getter and setter function support, which would be cool and would&#x27;ve allowed it (with some function overhead), but is probably a bit OTT for PHP.<p>readonly properties would allow you to make truly solid classes. You&#x27;d be able to lock them down from outside interference.<p>Methods could trust that property values hadn&#x27;t been tampered with from outside, while still providing a way for outside code to read those values extremely quickly, without function overhead.<p>I think it&#x27;s an awesome idea, especially since the getter&#x2F;setter proposal failed. It&#x27;s very PHPy, and it strikes a nice middle ground between fully public properties and private ones.<p>External code really shouldn&#x27;t be able to mess with my class&#x27;s internal properties anyway, it violates separation of concerns.
评论 #7078286 未加载
评论 #7078368 未加载
评论 #7078270 未加载
leeoniyaover 11 years ago
i would love to see them make an explicit BC break and fix everything listed at <a href="http://phpsadness.com/" rel="nofollow">http:&#x2F;&#x2F;phpsadness.com&#x2F;</a>
评论 #7077323 未加载
评论 #7077895 未加载
评论 #7077666 未加载
poobrainsover 11 years ago
Any word on when all functions will be UTF-8 safe?
评论 #7077708 未加载
semerdaover 11 years ago
Does anyone else here find the PHP namespace format horrible and unlike the standard dot notation?
评论 #7079315 未加载