Re: I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 23, 2009 at 2:34 AM, Robert Cummings <robert@xxxxxxxxxxxxx> wrote:

> Revolutionary, no. Major changes for PHP, yes! Major shifts in development practices for PHP... it depends on who you are or where you work, but certainly some of these will mark changes in development for many people.

+1

http://cvs.php.net/viewvc.cgi/php-src/UPGRADING?revision=PHP_5_3

Depending on your output you may start getting a lot of errors,
warnings and deprecation messages. Not to mention, every error thrown
is overhead in the system, regardless if it is being displayed or
logged. (as Rasmus says, "write error free code")

Behavior changes that can affect people's code from either the "I
assume this is defaulted this way", behavior changes or deprecation
changes from what I can grok from that - quite a few that people
should probably be looking for ahead of time, and writing 5.3 safe
versions of their code, and ensuring they have the ini variables
defined to what they want that will be changing their defaults too...


- **namespace** and **goto** are now reserved keywords.

- **Closure** is now a reserved class. (Used by lambda and closure.)

- The array functions natsort(), natcasesort(), usort(), uasort(), uksort(),
  array_flip() and array_unique(), no longer accept objects passed as arguments.
  If you need to access their properties using an object, you will need to cast
  the objects to arrays first.

- The behaviour of functions with by-reference parameters called by value has
  changed. Where previously the function would accept the by-value argument, a
  warning is now emitted and all by-ref parameters are set to NULL.

- The magic methods __get(), __set(), __isset(), __unset() and __call() should
  always be public and can no longer be static. Method signatures are enforced.

- The __toString() magic method can no longer accept arguments.

- count() vs count_elements() handler resolution rules have changed. (This could
  potentially break custom PHP extensions.)

- The trailing / has been removed from SplFileInfo and other related directory
  classes.

- The new mysqlnd library necessitates using MySQL's newer 41 byte
password format.
  Continued use of the old 16 byte passwords will cause
mysql_connect() to produce
  the following error message: "mysqlnd cannot connect to MySQL 4.1+ using old
  authentication"  (perhaps an E_WARNING ?)

- define_syslog_variables() is deprecated.    (not sure if this will
throw any E_DEPRECATED or anything)

- All ereg functions are deprecated and emit E_DEPRECATED errors.
  Use PCRE (preg_*()) instead.

- The following ini directives will now emit an E_DEPRECATED warning
  upon startup if they are activated:

        - define_syslog_variables
        - register_globals
        - register_long_arrays
        - safe_mode
        - magic_quotes_gpc
        - magic_quotes_runtime
        - magic_quotes_sybase

Extensions moved out to PECL and actively maintained there

        - fdf
        - ming
        - ncurses

 c. with changed behaviour

        - datetime: date/timefunctions will no longer use the TZ environment
          variable to guess which timezone should be used.

        - hash: The SHA-224 hash algorithm is now supported.

        - oci8: Calling oci_close() on a persistent connection, or on a variable
          that references a persistent connection going out of scope, will now
          roll back any uncommitted transaction. You should explicitly commit or
          rollback as needed.
          Setting oci8.old_oci_close_semantics=On in php.ini gives the old
          behaviour.

        - session: Sessions will no longer store session-files in "/tmp" where
          open_basedir restrictions apply, unless "/tmp" is explicitly added to
          the list of allowed paths.

- zend_extension_debug and zend_extension_ts have been removed.
  Instead use the zend_extension directive to load all Zend Extensions.

- zend.ze1_compatibility_mode has been removed. If this ini directive is set
  to on, then an E_ERROR is emitted at startup.

- The default value of session.use_only_cookies has changed to "1"

Windows has some changes too, but I think only if you're running pre
Windows 2000 will it make a difference.


Sorry for re-hashing the entire thing but I think I picked out
everything that may conflict with existing code or assumptions on
existing code.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux