tags:

views:

37

answers:

1

I recently saw this as the very first line of some PHP scripts in some framework, it said that it is added in because PHP 6 will support it. I am curious if anyone knows anything about this? If it does support it when PHP 6 comes out will it be optional? Any benefits of using it vs not using it?

declare(ENCODING = 'utf-8');
+1  A: 

PHP 6 main focus is for unicode support. So would you need to declare a pages encoding? Not unless you have to.

It will be optional, you can set the encoding specifically using declare or through an ini setting. I do not see any benefit using one over the other.

Anthony Forloney