Pregateste-ti codul de PHP6

Pregateste-ti codul de PHP6

O lista cu modificarile care apar in PHP6 a fost pregatita de http://blog.tuvinh.com/one-minute-with-php6/.

1. FILE_BINARY and FILE_TEXT constants available for use with filesystem functions.
2. register_globals will be gone.
3. magic_quotes will also disappear.
4. $HTTP_*_VARS has been removed, in favour for $_GET, $_POST, etc.
5. ereg() no longer available in core PHP6.
6. Initiating objects with the reference operator (& new Object()) will generate E_STRICT error.
7. E_STRICT error messages are included in E_ALL errors.
8. {} for string offsets no longer available.
9. [] un-deprecated for accessing characters in a string.
10. ASP-style tags can no longer be used.
11. Better Unicode Support.
12. var will be an alias of public, and raises E_STRICT warning.
13. Support for 64 bit integers.
14. 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).
15. zend.ze1_compatibility_mode removed.
16. safe_mode is being removed.
17. Freetype1 and GD1 support removed.
18. dl() is only enabled when a SAPI layers registers it explicitly.
19. Support for dynamic break levels removed.
20. XMLReader and XMLWriter will be in the core distribution.
21. mime_magic removed from the core.
22. Fileinfo moved to the core.
23. ext/soap on by default.
24. foreach supports multi-dimensional arrays: foreach($a as $b => list($c, $d))
25. microtime() will return as float by default.
26. opcode cache included in core distribution, but turned off by default.
27. flags parameter available for file_get_contents().
28. before_needle parameter added to strstr() – allows strstr() to return part of haystack before occurence of the needle.
29. namespace, import, and goto become reserved words.

Share this post

Lasă un răspuns

Adresa ta de email nu va fi publicată. Câmpurile obligatorii sunt marcate cu *

Acest sit folosește Akismet pentru a reduce spamul. Află cum sunt procesate datele comentariilor tale.