Hello, please sign in or register
You are here: Home

PHP Version 6 changes - Is your script compatible

There's an interesting article explaining whats in and whats out in the new version of PHP 6, ( and some new features in PHP v5.3 )

See http://www.ibm.com/developerworks/library/os-php-future/index.html

In

  • Namespaces for classes e.g.{{{$c = new mynamespace::myClass()}}}
  • Improved Unicode support in core functions... i guess this means mb_string functions are redundant

Out

  • ereg functions. Ouch!! But preg is more comprehensive anyway.
  • {} reference string indexes. E.g. {{{$s = "string"; print $s{1}; // s }}}. One should use square brackets which will soon support  substr and array_slice like functionality.
  • magic_quotes. E.g. $q = "INSERT INTO table (field) VALUES( $_GET['myvar'] )"; Must be $q = "INSERT INTO table (field) VALUES( \"{$_GET['myvar']}\" )";
  • register_globals. E.g. {{{http://domain.com/?string=hack}}} will create the variable $string automatically
  • register_long_arrays. E.g. {{{$HTTP_GET_VARS}}}, synonymous with $_GET
  • asp_tags. E.g. <%=$myvar%>, dont confuse with short_open_tags <?=$myvar?> of which, i am a fan.

Other resources

http://bitfilm.net/2007/12/09/unofficial-php-6-changelog/

Comments

ejTkZvUJSLVBRStbKC
THX that's a great awsner!
Created 19/08/11
qADuyqatmbQYQe
kqxBMo wgzzfiltggcm
Created 20/08/11
hXbibpIBwMTYIZClym
w224Ie , [url=http://schkmyvzzgxq.com/]schkmyvzzgxq[/url], [link=http://kfboofqdedqp.com/]kfboofqdedqp[/link], http://amkefynkyehe.com/
Created 23/08/11
WvKmcKapMHqCZUr
60dLqw phqputfmnlvq
Created 25/08/11
XQUBVOwuFqs
lbceNo , [url=http://kqgoqqbcluhh.com/]kqgoqqbcluhh[/url], [link=http://xshzwpugxvqd.com/]xshzwpugxvqd[/link], http://rmgwyjnxbojd.com/
Created 30/08/11
wq123
This hilfiger outlet time swarovski jewelry something really timberland outlet strange, ...
Created 30/06/16
ninestab123
ninest123 One canada goose pas cher gucci outlet thing
Created 21/07/16
Title*
Comment

Prove you are not a robot

To prove you are not a robot, please type in the six character code you see in the picture below
Security confirmation codeI can't see this!
Contact
Name*
Email never shown*
Home Page

Author

Andrew Dodson
Since:Feb 2007

Comment | flag

Categories

Bookmark and Share