Php v4.x.xx versijos supportingo pabaiga
Parašė ozzWANTED 2007 rugsėjo 21 14:09:56
Taigi, kam gal ir nežinoma, tačiau noriu pranešti, kad nuo š.m. gruodžio pabaigos oficiali php bendruomenė nebedarys bug fix'u Php v4 versijai, o nuo kitų metų rugpjūčio nebetaisys net ir major bugų. Tai galbūt kiek stebina turint omenyje tai, kad šiuo metu per 80 proc. internetinių php based web saitų stovi ant php4.x.xx. Beto yra tikrai ne viena dešimtis suderinamumo problemų tarp Php4 ir Php5, pvz.
Passed by Reference
This is an important change. In PHP4, everything was passed by value, including objects. This has changed in PHP5 -- all objects are now passed by reference.
PHP Code:
$joe = new Person();
$joe->sex = 'male';
$betty = $joe;
$betty->sex = 'female';
echo $joe->sex; // Will be 'female'
The above code fragment was common in PHP4. If you needed to duplicate an object, you simply copied it by assigning it to another variable. But in PHP5 you must use the new clone keyword.
Note that this also means you can stop using the reference operator (&). It was common practice to pass your objects around using the & operator to get around the annoying pass-by-value functionality in PHP4.
Negana to:
MySQL is supported with the only change being that MySQL support is no longer enabled by default in PHP 5. This essentially means that PHP doesn't include the --with-mysql option in the configure line so that you must now manually do this when compiling PHP. Windows users will edit php.ini and enable the php_mysql.dll DLL as in PHP 4 no such DLL existed, it was simply built into your Windows PHP binaries.
Dabar dar visiems useriams Mysql supportinimą reikės patiems įsijunginėt, ir greičiausiai pasiėmus kokį paprastą vps ar dds, hostingai nebus jų įjungę, tad tiems kas nemokės patys įsijungti, gausis papildomos išlaidos.
Kiti skirtumai: Ʋiūrėti čia
Pagrindiniai pakeitimai: Ʋiūrėti čia
Šiaip keista kad nutrauks bug fix'as, turint omenyje kad php yra opendev'as, manau tikrai tai neturėtų būti koks nors pernelyg sudėtingas darbas ištaisyti reportintus bugus, juolab kad dauguma jų kartosis ir su vėlesnėmis php versijomis... Galėjo bent jau iki Php v6 full stable versijos palaukti...
Php6 būsimų atnaujinimų sąrašą rasite "Plačiau" dalyje.
Šaltiniai: Ā©webdnd.com, Ā©php.net
Išplėstos naujienos
Taigi, kam gal ir nežinoma, tačiau noriu pranešti, kad nuo š.m. gruodžio pabaigos oficiali php bendruomenė nebedarys bug fix'u Php v4 versijai, o nuo kitų metų rugpjūčio nebetaisys net ir major bugų. Tai galbūt kiek stebina turint omenyje tai, kad šiuo metu per 80 proc. internetinių php based web saitų stovi ant php4.x.xx. Beto yra tikrai ne viena dešimtis suderinamumo problemų tarp Php4 ir Php5, pvz.
Passed by Reference
This is an important change. In PHP4, everything was passed by value, including objects. This has changed in PHP5 -- all objects are now passed by reference.
PHP Code:
$joe = new Person();
$joe->sex = 'male';
$betty = $joe;
$betty->sex = 'female';
echo $joe->sex; // Will be 'female'
The above code fragment was common in PHP4. If you needed to duplicate an object, you simply copied it by assigning it to another variable. But in PHP5 you must use the new clone keyword.
Note that this also means you can stop using the reference operator (&). It was common practice to pass your objects around using the & operator to get around the annoying pass-by-value functionality in PHP4.
Negana to:
MySQL is supported with the only change being that MySQL support is no longer enabled by default in PHP 5. This essentially means that PHP doesn't include the --with-mysql option in the configure line so that you must now manually do this when compiling PHP. Windows users will edit php.ini and enable the php_mysql.dll DLL as in PHP 4 no such DLL existed, it was simply built into your Windows PHP binaries.
Dabar dar visiems useriams Mysql supportinimą reikės patiems įsijunginėt, ir greičiausiai pasiėmus kokį paprastą vps ar dds, hostingai nebus jų įjungę, tad tiems kas nemokės patys įsijungti, gausis papildomos išlaidos.
Kiti skirtumai: Ʋiūrėti čia
Pagrindiniai pakeitimai: Ʋiūrėti čia
Šiaip keista kad nutrauks bug fix'as, turint omenyje kad php yra opendev'as, manau tikrai tai neturėtų būti koks nors pernelyg sudėtingas darbas ištaisyti reportintus bugus, juolab kad dauguma jų kartosis ir su vėlesnėmis php versijomis... Galėjo bent jau iki Php v6 full stable versijos palaukti...
Būsimi pakeitimai artėjančiame Php6:
PHP 6.0 looks to be an exciting release. Nothing is absolutely fixed yet, but it looks like it will see the demise of three of my pet peeves: register_globals, magic_quotes_gpc and safe_mode. The first was just a big security hole, the second messed with the data and made changing environments potentially nightmarish, while the third was a misnomer that nobody really understood, and provided a false sense of security. There's also quite a lot of work scheduled to do with Unicode. Here are some of the changes:
The register_globals, safe_mode and the various magic quotes options will be removed.
The ereg extension is removed, while the XMLReader, XMLWriter and Fileinfo extensions are added to the core, and by default are on.
Another addition I find particularly exciting is that APC (Alternative PHP Cache) will be added to the core, though will be off by default. APC can provide serious performance benefits.
All E_STRICT messages will be merged into E_ALL, another positive change that will encourage good programming practice.
ASP style <% tags will no longer be supported.
Addition of a new 64-bit integers. The current integer type remains as is, 32 or 64-bit dependent on the platform.
Use of foreach with multi-dimensional arrays, for example foreach($array as $k => list($a, $b)).
A new switch in php.ini will allow you to disable Unicode semantics (by default they will be on).
There will also be various string improvements related to Unicode.
The microtime() function will return the full floating point number, rather than microseconds unix_timestamp, as at present, probably making the function more readily useful for most people.
The {} notation for string indexes will no longer be supported, while the [] version will get added substr() and array_slice() functionality. Previously [] was deprecated, but most developers, including myself, seem to use [].
FastCGI will always be enabled for the CGI SAPI, and will not be able to be disabled.
The ancient HTTP_*_VARS globals will no longer be supported. Everyone should have had more than enough time to remove any traces of these.
var will alias public. var was permitted with PHP4 classes, but in PHP 5 this raised a warning. In PHP 6 var will simply be an alias for public, so no warning is necessary.
The ze1 compatibility mode, which tried to retain PHP 4 behaviour but had some bugs, will be removed.
Dynamic functions will no longer be permitted to be called with static syntax.
Šaltiniai: Ā©webdnd.com, Ā©phpbuilder.com, Ā©php.net