5 ms·
For a comprehensive list of new major language features, there is a wiki: https://wiki.php.net/rfc#implemented https://wiki.php.net/rfc#implemented One major f
by ihsw 13y ago
For a comprehensive list of new major language features, there is a wiki: https://wiki.php.net/rfc#implemented https://wiki.php.net/rfc#implemented
One major feature not listed on the submitted article is namespaces, which is fairly major and it's just starting to reach critical mass in terms of reach. Despite being probably the most major feature in the past five years, most users should be able to enjoy using namespaces to their heart's content (along with all the libraries that utilize it, for example Amazon's latest PHP SDK (which is thoroughly impressive)).
For reference, Python3 came out in 2008 and it's also just starting to reach critical mass in terms of library support (cough third-party Django libraries).
There is also a third-party committee[1][2] with the goal of establishing things like coding guidelines, logging interfaces, HTTP request/response interfaces, and so forth.
[1] http://www.php-fig.org/ http://www.php-fig.org/
[2] https://github.com/php-fig/fig-standards https://github.com/php-fig/fig-standards
- eevee 13y agoWhy is Python 3 relevant? Porting a large Python 2 library to Python 3 (or, more likely, to both 2 and 3) is a significant undertaking. Porting a PHP library to use namespaces would largely be a matter of adding global aliases for backwards-compatibility, surely?
- ihsw 13y agoPorting a library from non-namespaced to properly-namespaced code is fairly significant, and there should be little-to-no backwards incompat. issues between pre-php-5.3 and post-php-5.3. The difference is a fairly large undertaking both in code size and technical challenge.
- stephenr 13y agoI have to say I think the php fig is a joke, and I question the merits of anyone using it. Their own goals are a joke, much less the results. They never set out to "define the best way to do X". They set out to "find the most common way the most common frameworks do X". The results are equally questionable. Why would a "Framework Interop Group" need to care about shit like brace placement, indenting, or even file naming. Their file naming is a big wtf for me, as their "standard" is set out the way it is, to support faux namespaces in pre php 5.3. PHP 5.2 reached 'end-of-life' status 2 1/2 years ago. What gets me even more is the fucking hoops people constantly jump through to make ever more complex autoloaders for PHP. there is native support in php for autoloading class files, including namespaces. it takes one line of code to set it up. one function call. But that's not all: when these geniuses decided they wanted to implement a "reference" class loader, what did they call it? SplClassLoader. Because if enough idiots already follow your shitty "standards" they will think "ooh spl is in PHP this must be endorsed by them too!"?? Their logger interface is fucking laughable - who implements a logger, that has names exactly the same as syslog, and descriptions the same or similar to syslog, but ignores that syslog levels are INTEGERS and thus you can say quite easily "email be about errors below level x"
- porker 13y agoThe most-used logger implementation (Monolog) supports "email me errors below x", even though the log levels aren't integers (if you're right, haven't checked the internal code to verify)