Unofficial PHP6 Changelog

I Like It!

Hey there! Welcome to Making the Web - my personal blog about website development. Feel free to subscribe to my RSS feed to keep up with the latest. Alternatively, subscribe by email. Hope you enjoy this article!

Note: The following list may contain some inaccuracies.

To the best of my knowledge, the following things are changing as of PHP6:

  • FILE_BINARY and FILE_TEXT constants available for use with filesystem functions.
  • register_globals will be gone.
  • magic_quotes will also disappear.
  • $HTTP_*_VARS has been removed, in favour for $_GET, $_POST, etc.
  • ereg() no longer available in core PHP6.
  • Initiating objects with the reference operator (& new Object()) will generate E_STRICT error.
  • E_STRICT error messages are included in E_ALL errors.
  • {} for string offsets no longer available.
  • [] un-deprecated for accessing characters in a string.

  • ASP-style tags can no longer be used.
  • Better Unicode Support.
  • var will be an alias of public, and raises E_STRICT warning.
  • Support for 64 bit integers.
  • With ternary operator, the "true" expression is no longer required - this can be done: $a = $s ?: 'b'; (Not clear yet exactly how this will work).
  • zend.ze1_compatibility_mode removed.
  • safe_mode is being removed.
  • Freetype1 and GD1 support removed.
  • dl() is only enabled when a SAPI layers registers it explicitly.
  • Support for dynamic break levels removed.
  • XMLReader and XMLWriter will be in the core distribution.
  • mime_magic removed from the core.
  • Fileinfo moved to the core.
  • ext/soap on by default.
  • foreach supports multi-dimensional arrays: foreach($a as $b => list($c, $d))
  • microtime() will return as float by default.
  • opcode cache included in core distribution, but turned off by default.
  • flags parameter available for file_get_contents().
  • before_needle parameter added to strstr() - allows strstr() to return part of haystack before occurence of the needle.
  • namespace, import, and goto become reserved words.

I will be adding more to this list as I become aware of changes in PHP6, and proposals become confirmed.

12 Comments »

  1. Making the web » Becoming PHP 6 Compatible Said,

    December 9, 2007 @ 2:19 pm

    […] You may also want to read the Unofficial PHP 6 Changelog. […]

  2. Ovidiu C. Said,

    December 10, 2007 @ 7:55 am

    I'm not 1000‰ sure, but I think $a = $s ?: 'b' works something like this:

    if ($s) {
    $a = $s;
    } else {
    $a = 'b';
    }

  3. Brendon Said,

    December 10, 2007 @ 8:01 am

    I did think that but the PHP 6 minutes say:

    // Evaluates to $_GET['foo'] if it's not set (with a notice) or false. It
    // evaluates to 42 if $_GET['foo'] evaluates to true.
    $foo = $_GET['foo'] ?: 42;

    // Evaluates to "true" if $blå equals 42 and it evaluates to 54 otherwise.
    $blå = $blå == 42 ?: 54;

    I'm probably missing something pretty obvious, but to me it is contradictive.

  4. links for 2007-12-13 « Bijay Rungta’s Weblog Said,

    December 13, 2007 @ 12:34 am

    […] Making the web » Unofficial PHP 6 Changelog (tags: php php6 changelog compatibility) […]

  5. JD Said,

    December 14, 2007 @ 10:35 pm

    Any word on the much-needed improvements to the object/class situation?

  6. Scriptor Said,

    December 16, 2007 @ 11:33 pm

    With the above changes, I really don't see how the next version merits to be called 'PHP 6'. Mostly it's just old, dangerous, and obsolete baggage getting removed. Most of those changes could be done in some future PHP 5 release, if it wasn't for the backlog of developers and code still using to-be-deprecated features.
    How about some actual new syntax features? It could stir the waters a bit. One thing I'd like is the ability to add functions to an object/class dynamically, a bit closer to prototypal programming, but it'd be quite handy. Also, it'd be pretty cool to see the blocks in Smalltalk and Ruby being implemented.
    How many PHP developers actually have fun coding in PHP? I keep hearing about how it's simple. But it's only a superficial simplicity. Zend needs to figure out that they had better find another way to improve PHP than by adding new classes and functions.

  7. Becoming PHP 6 Compatible - .: Aptechite's Forum :. Said,

    December 18, 2007 @ 6:38 pm

    […] PHP 6 Compatible You may also want to read the Unofficial PHP 6 Changelog. If you want to make use of PHP 6 when it comes, you're going to have to write your new scripts so […]

  8. PHP6 Unofficial Changelog « Explore Open Source Technology Said,

    January 2, 2008 @ 1:44 pm

    […] PHP6 Unofficial Changelog You may also want to read the Unofficial PHP 6 Changelog. […]

  9. RAM Said,

    January 10, 2008 @ 11:55 am

    Scriptor,

    We all must remember that PHP 6 hasn't been released yet, and is only available from snaps.php.net or via CVS.

    Perhaps when PHP 6 releases a beta or pre-release version would your claim hold water.

  10. T.J. Said,

    January 31, 2008 @ 6:11 am

    The only real 'new' features are the 'shorthand' ternary operators (redundant sounding eh?) and the ability to use list() in a foreach statement (finally). I agree with the above, where is some enhanced language features?

  11. .k Said,

    April 17, 2008 @ 1:55 pm

    "Better Unicode Support" is very dissapointing…
    should be "full unicode support".

  12. n-blue | PHP 6 Said,

    May 11, 2008 @ 4:43 am

    […] Unofficial PHP6 Changelog […]

RSS feed for comments on this post · TrackBack URI

Text Link Ads

Leave a Comment

Making the Web | Chalvedon School and Sixth Form College | Messenger History | GCSE(WIKI): Simple bitesize revision for secondary school, KS4 students. | Encrypt files for free - high-grade encryption
Who's Populating The Web?