I have php 5.2.11 on my server. Should I upgrade to the new PHP 5.3.2?
Any new features that could save my life?
Any suggestions?
The most remarkable thing is that 5.3 is faster. How much depends on your system and code, many say this is remarkable.
The migration guide http://php.net/migration53 contains changes and new features. I personally like closing / anonymous functions.
, 5.3. Lambdas , .
LSB, , , .
<?php class A { public static function who() { echo __CLASS__; } public static function test() { static::who(); // Here comes Late Static Bindings } } class B extends A { public static function who() { echo __CLASS__; } } B::test(); // "B"
AFAIK, PHP < 5.3
, , , , , 5.3 .
- , array_search, array_map, array_reduce .
array_search
array_map
array_reduce
changelog ' , .
PHP 5.3, , , PHP 5.3.
You can automate some of this testing with PHP 5.3. Compatibility codes with other rules - code that will not necessarily work 100%, but at least you no longer have to worry about a lot of problems.
Source: https://habr.com/ru/post/1749344/More articles:The number of arguments to the stored procedure PLS-00306 - oracleUninitialized content when trying to include ActionController :: UrlWriter in the model - ruby-on-railsObject declaration in Objective-C - objectReading UTF-8 XML and writing it to a file using Python - pythonЧто означает "char (* a) [12]" означает? - cHow to read javascript source code in html page - javascriptПоказывать индикатор выполнения во время загрузки галереи изображений на шаблоне django - jqueryпостоянное запоминающее устройство и память кучи - cA large number of pointers in the QGraphicsView structure and performance - c ++An effective way to maintain order in mySQL for a list of elements is inner-joinAll Articles