Deprecated features in PHP 5.3.x
PHP 5.3 à»ÅÕè¹ÍÐäúéÒ§ (php version 5.3.x)
ÊÇÑÊ´Õ¤ÃѺ ªèǧ¹ÕéµéͧÃǺÃÇÁ¢éÍÁÙÅÊÓËÃѺ·Ó§Ò¹ àŶ×ÍâÍ¡ÒÊà¢Õ¹à»ç¹º·¤ÇÒÁàÍÒäÇéãËéËÅÒÂæ·èÒ¹ä´éÍèÒ¹¡Ñ¹ ·Õè¨ÃÔ§áÅéÇÊèǹ¹ÕéÁÕ¤¹à¢Õ¹äÇé¤è͹¢éÒ§¨ÐàÂÍФÃѺ Åͧ search ´Ù¡ç¹èÒ¨Ðà¨ÍàÂÍÐÍÂÙèàËÁ×͹¡Ñ¹¤ÃѺ áÅФÓ͸ԺÒ¡ç¨Ðä¡Åéæà¤Õ§¡Ñ¹ à¾ÃÒзÕèÁÒ¡çÁÒ¨Ò¡ php.net àËÁ×͹¡Ñ¹à¡×ͺ·Ñé§ËÁ´¤ÃѺ ºÒ§·Õè¡çä» copy à¢ÒÁÒµèÍæ¡Ñ¹ä» ÊÓËÃѺº·¤ÇÒÁã¹ siammodify ¹ÕéËÒ¡¼Ùéã´ copy 仪èǵԴÅÔ駤ì¡ÅѺ´éǹФÃѺ
php function ºÒ§µÑÇ·Õè¨Ð¶Ù¡µÑ´ÍÍ¡ä»ã¹ php version 5.3
- call_user_method()
- call_user_method_array()
- defin_syslog_variables()
- dl()
- ereg()
- ereg_replace()
- eregi()
- eregi_replace()
- set_magic_quotes_runtime()
- session_register()
- session_unregister()
- session_is_register()
- set_socket_blocking()
- split()
- spliti()
- sql_regcase()
- mysql_db_query()
- mysql_escape_string()
µÑÇÍÂèÒ§
erigi() become => preg_match(‘/theregex/i’) or => preg_match(‘#theregex#i’)
ereg_replace become => preg_replace(‘/theregex/’) or => preg_replace(‘#theregex#’)
function ·Õè¶Ù¡µÑ´Í͡仼ÁÇèÒ¹èÒ¨ÐÊ觼šÃзºµèÍâ»Ãá¡ÃÁËÅÒÂæâ»Ãá¡ÃÁ¤ÃѺà¹×èͧ´éǺҧ function ¤è͹¢éÒ§à»ç¹·Õè¹ÔÂÁµÃ§Êèǹ¹Õé¡ç¤§µéͧäÅèæ»ÃѺ¡Ñ¹áËÅФÃѺ àªè¹¾Ç¡ ereg µèÒ§æáÅÐ split ÃÇÁä»¶Ö§ mysql_db_query ·ÕèàÇÅÒ¼Áá¡Ðâ»Ãá¡ÃÁºÒ§µÑÇ¡çÁÑ¡¨Ðà¨ÍÍÂÙèºèÍÂæ¤ÃѺ
áÅÐÊÓËÃѺàÃ×èͧ¤Ø³ÊÁºÑµÔ¨ÐÁÕ¡ÒáàÅÔ¡ºÒ§ÍÂèÒ§ «Ö觤سÊÁºÑµÔ·Õè¶Ù¡Â¡àÅÔ¡ ¤×Í
- ¡ÒÃÊ觤èÒẺ reference ( Assigning the return value of new by reference is now deprecated. )
- Call-time pass-by-reference is now deprecated.
ÊÓËÃѺ function Deprecated features in PHP 5.3.x ÊÒÁÒöÍèÒ¹à¾ÔèÁàµÔÁä´é·Õè¹Õè¹Ð¤ÃѺ
http://th.php.net/manual/en/migration53.deprecated.php
¹Í¡¨Ò¡¨ÐµÑ´ function ºÒ§µÑÇÍÍ¡ä»áÅéÇÊÓËÃѺºÒ§ function ¡çÁÕ¡ÒÃà¾ÔèÁ Parameters à¢éÒÁҴѧ¹Ñé¹àÃÒÍÒ¨¨Ð¨Óà»ç¹µéͧä»ãÊè Parameters ãËé¡Ñº function àËÅèÒ¹Ñé¹ãËé¶Ù¡µéͧµÒÁ´éǤÃѺ
ÃÒª×è͵ÑÇÍÂèÒ§ function ·ÕèÁÕ¡ÒÃà¾ÔèÁ Parameters à¢éÒÁÒ
- clearstatcache() – Added clear_realpath_cache and filename.
- copy() - Added a stream context parameter, context.
- fgetcsv() – Added escape.
- ini_get_all() – Added details.
- nl2br() – Added is_xhtml.
- parse_ini_file() – Added scanner_mode.
- round() - Added mode.
- stream_context_create() – Added params.
- strstr() and stristr() – Added before_needle.
function ·ÕèÁÕ¡ÒÃà¾ÔèÁ Parameters à¢éÒÁÒËÃ×ÍÁÕ¡ÒûÃѺà»ÅÕè¹ÊÒÁÒö´Ùà¾ÔèÁàµÔÁä´é¨Ò¡ÅÔ駤ì¹Õé¤ÃѺ
http://th.php.net/manual/en/migration53.parameters.php
Seagull Framework
¼Á¢ÍàÍè¶֧µÑÇ seagull framework ÊÑ¡¹Ô´¹Ð¤ÃѺ ÊÓËÃѺ seagull framework ã¹ version à¡èÒæ¨ÐÁÕàÃÕ¡ãªé function ¾Ç¡ call_user ºÒ§µÑǤÃѺ ã¹Êèǹ¹Õéà·èÒ·ÕèËÒ´ÙÁÕ¡ÒÃá¨é§ÍÍ¡ÁÒ áÅзҧ·ÕÁ§Ò¹ à¢Ò¡çä´é·Ó¡Òà fix bug ä»àÃÕºÃéÍÂáÅéÇ »ÑËÒ¨Ðà¨Í»ÃÐÁÒ³
SectionMgr, NavigationDAO::addSection áÅÐ NavigationDAO::updateSection
â´Â·Ó¡ÒûÃѺà»ÅÕè¹à»ç¹
return call_user_func_array(array($delegate, $methodName),$parameters);
ÊÓËÃѺ seagull ËÒ¡ÁÕ¢éͼԴ¾ÅÒ´»ÃСÒÃã´¡çµéͧ¢ÍÍÀÑ´éǹФÃѺ
áÅÐã¹Êèǹ¢Í§ php.ini ¡ç¨ÐÁÕ¡ÒáàÅÔ¡ºÒ§ÍÂèÒ§Í͡令ÃѺ µÑÇã˹¼Á͸ԺÒÂä´é¨ÐªèÇÂ͸ԺÒ¤ÃèÒÇæäÇéãËé¹Ð¤ÃѺ
- register_globals á»ÅÇèÒ¡ÒÃà¢Õ¹ÃѺ¤èÒµÑÇá»Ã¨Ðµéͧà»ÅÕè¹ä»ãªé ( $_REQUEST, $_GET, $_POST, $_SESSION, $_SERVER ) à·èÒ¹Ñ鹤ÃѺ
- define_syslog_variables
- register_long_arrays
- safe_mode
- magic_quotes_gpc
- magic_quotes_runtime
- magic_quotes_sysbase
ÊÓËÃѺàÃ×èͧ Changes to INI file handling ÊÒÁÒöÍèÒ¹à¾ÔèÁàµÔÁä´é·Õè¹Õé¹Ð¤ÃѺ
http://th.php.net/manual/en/migration53.ini.php
¢Í¹Í¡àÃ×èͧÍÕ¡¹Ô´¹Ö§¹Ð¤ÃѺ
¾Í´Õ¼Áä´éà¨ÍËÅÒÂæàÇçºà¢Õ¹º·¤ÇÒÁà¡ÕèÂǡѺ PHP 5.3 ˹éÒµÒà¹×éÍËÒ¡ç¤ÅéÒÂæ¡Ñ¹ áµè¼ÁªÍº¨Ø´·Õè͸ԺÒÂÊÑ鹿áµèà¢éÒã¨ä´é¤×Í
# ereg, eregi, ereg_replace, eregi_replace à»ÅÕè¹ä»ãªéµÃСÙÅ perl compatible regular expressions (preg*)
# split à»ÅÕè¹ä»ãªé preg_split á·¹
# mysql_db_query à»ÅÕè¹ä»ãªé mysql_select_db áÅéǵÒÁ´éÇ mysql_query
# mysql_escape_string à»ÅÕè¹ä»ãªé mysql_real_escape_string
# register_globals à»ÅÕè¹ä»ãªé Built-in global variables ($_REQUEST, $_GET, $_POST, $_SESSION, $_SERVER)
# session_register, session_is_register, session_unregister à»ÅÕè¹ä»ãªé $_SESSION
à¾Õ§á¤è¨Ø´¹Õé¡çªèÇÂÊÃØ»¨Ø´ÊӤѷÕèàÃÒãªé¡Ñ¹ºèÍÂæä´éÁÒ¡·Õà´ÕÂǤÃѺ
¨Ò¡·Ñé§ËÁ´¹Õé·èÒ¹ÊÒÁÒöÍèÒ¹à¾ÔèÁàµÔÁä´é·ÕèÅÔ駤ìàËÅèÒ¹Õé¹Ð¤ÃѺ
What has changed in PHP 5.3.x
http://th.php.net/manual/en/migration53.changes.php
Backward Incompatible Changes in PHP 5.3.x
http://th.php.net/manual/en/migration53.incompatible.php
New features in PHP 5.3.x
http://th.php.net/manual/en/migration53.new-features.php
Changes made to Windows support in PHP 5.3.x
http://th.php.net/manual/en/migration53.windows.php
Changes in SAPI modules in PHP 5.3.x
http://th.php.net/manual/en/migration53.sapi.php
Undeprecated features in PHP 5.3.x
http://th.php.net/manual/en/migration53.undeprecated.php
New Functions in PHP 5.3.x
- array_replace() – Replaces elements from passed arrays into one array.
- array_replace_recursive() – Recursively replaces elements from passed arrays into one array.
- class_alias() – Creates an alias for a user defined class.
- forward_static_call() – Call a user function from a method context.
- forward_static_call_array() – Call a user function from a method context, with the arguments contained in an array.
- gc_collect_cycles() – Forces collection of any existing garbage cycles.
- gc_disable() – Deactivates the circular reference collector.
- gc_enable() – Activates the circular reference collector.
- gc_enabled() – Returns the status of the circular reference collector.
- get_called_class() – Return the name of the class a static method is called in.
- gethostname() – Return the current host name for the local machine.
- header_remove() – Removes an HTTP header previously set using the header() function.
- lcfirst() – Make a string’s first character lowercase.
- parse_ini_string() – Parse a configuration string.
- quoted_printable_encode() – Convert an 8 bit string to a quoted-printable string.
New Functions in PHP 5.3.x
http://th.php.net/manual/en/migration53.functions.php
New stream wrappers in PHP 5.3.x
http://th.php.net/manual/en/migration53.new-stream-wrappers.php
New stream filters in PHP 5.3.x
http://th.php.net/manual/en/migration53.new-stream-filters.php
New Class Constants in PHP 5.3.x
http://th.php.net/manual/en/migration53.class-constants.php
New Methods in PHP 5.3.x
http://th.php.net/manual/en/migration53.methods.php
New Extensions in PHP 5.3.x
http://th.php.net/manual/en/migration53.new-extensions.php
Removed Extensions in PHP 5.3.x
http://th.php.net/manual/en/migration53.removed-extensions.php
Other changes to extensions in PHP 5.3.x
http://th.php.net/manual/en/migration53.extensions-other.php
New Classes in PHP 5.3.x
http://th.php.net/manual/en/migration53.classes.php
New Global Constants in PHP 5.3.x
http://th.php.net/manual/en/migration53.global-constants.php
Other changes in PHP 5.3.x
http://th.php.net/manual/en/migration53.other.php
¼ÁËÇѧÇèÒº·¤ÇÒÁ¹èÒ¨Ðà»ç¹»ÃÐ⪹ìá¡èã¤ÃËÅÒÂæ¤¹¹Ð¤ÃѺ áÅÐ ËÒ¡·èÒ¹ã´àÍÒ·º¤ÇÒÁ·Õè¼Áà¢Õ¹¹Õéä»ãªé§Ò¹ ªèÇÂ¡ÃØ³ÒãÊèÅÔ駤ì¡ÅѺÁÒÂѧàÇ纼Á´éǹФÃѺ áÅÐËÒ¡Áըشã˹·Õè¼Ô´ËÃ×Íà¾Õé¹仡çµéͧ¢ÍÍÀÑ´éǹФÃѺ áÅÐá¨é§ÁÒä´é¤ÃѺ·Ò§¼Á¨Ðä´éá¡éä¢ãËé¶Ù¡µéͧ ¢Íº¤Ø³¤ÃѺ
à¹×èͧ¨Ò¡ php 5.3 ä´éÁÕ¡ÒáàÅÔ¡ Function ·Õèãªé¡Ñ¹ ËÅÒ function ¶Ù¡Â¡àÅÔ¡, ¡ÒõÑ駤èÒ ã¹ INI, ¡àÅÔ¡ Extensions ËÅÒÂÍÂèÒ§
ÁÒ´Ù Function ·Õè¶Ù¡ãªé§Ò¹ºèÍÂæ áÅéǶ١¡àÅÔ¡ä» (¼Á¡µÑÇÍÂèÒ§ à¾×èÍãËéàËç¹ ¤ÇÒÁà´×Í´Ãé͹¶éÒ¤Ô´¨ÐÍѾ php à»ç¹ 5.3 )
੾ÒÐàÃ×èͧ Session , ¡Ñº function regular expression ¡ç·ÓãËéâ»Ãá¡ÃàÁÍÃì PHP »èǹ¡Ñ¹ä´éàÂÍзÕà´ÕÂÇ àŤÃѺ ÊÓËÃѺ¤¹·ÕèäÁèä´éà¢Õ¹â¤é´äÇéÊÓËÃѺ php 5.3 ¡µÑÇÍÂèÒ§àªè¹ Function
- session_register() ÊÓËÃѺ php 4.3 ¤¹·Õè¨Ðãªé §Ò¹ session ÁÑ¡¨Ð¤Øé¹¡Ñº ¿Ñ§¡ìªÑè¹Õé áµè ¶éÒÍѾÁÒ 5.3 session_register à¤éÒá¹Ð¹ÓãËéãªé $_SESSION «Öè§à»ç¹¡ÒÃãªé§Ò¹ session ¼èÒ¹ µÑÇá»Å superglobal á·¹ ¨ÐàËç¹ÇèÒ·ÓãËéÊÒÁÒö·Ó§Ò¹ä´éÊдǡ¢Öé¹
- Function ã¹µÃСÙÅ ereg ·Ñé§ËÅÒ §Ò¹¹ÕéÂØè§Ë¹èͤÃѺ à¾ÃÒÐ ¡ÒÃàªç¤¢éͤÇÒÁà»ÃÕºà·Õº String ¤é¹ËÒ String àÃÒÁÑ¡¨Ðãªé ereg à¤éÒ¡çá¹Ð¹ÓãËéËѹä»ãªé preg á·¹ áµèáµèÅÐ function äÁèãªèÇèÒ à»ÅÕ蹪×èÍáÅéǨÐãªéä´é¹Ð¤ÃѺ ÁѹäÁèµÃ§ä»µÃ§ÁÒ¢¹Ò´¹Ñé¹
- Function ·Õèà¡ÕèÂǡѺ mysql àªè¹ mysql_db_query ÊÓËÃѺ¤¹·ÕèªÍºà¢Õ¹ Ẻ·Ò§ÅÑ´¤×Í Ãѹ¤ÓÊÑè§ SQL â´Â àÅ×Í¡ °Ò¹¢éÍÙÅä»ã¹µÑÇ ¡çµéͧà»ÅÕè¹ ÁÒ ãªé ¿Ñ§¡ìªÑè¹ àÅ×Í¡°Ò¹¢éÍÁÙÅ¡è͹ áÅéǤèÍ Ãѹ¤ÓÊÑè§ sql
ÍÕ¡¿Ñ§¡ìªÑè¹·Õè˹ѡ͡ ÍÕ¡ÍÂèÒ§¤×Í mysql_escape_string µéͧà»ÅÕè¹ÁÒãªé mysql_real_escape_string á·¹
¹Í¡¨Ò¡¹Õé áÅéÇ ¡Ò÷Õè php 5.3 ¡àÅÔ¡ Extensions ºÒ§µÑÇä» ·ÓãËé ¡ÅØèÁ¢Í§ function ¹Ñ鹿ËÅÒÂä»·Ñé§¡ÅØèÁ
ÈÖ¡ÉÒ¢éÍÁÙÅà¾ÔèÁàµÔÁ·Õè http://us.php.net/manual/en/migration53.deprecated.php
http://www.mindphp.com/%E0%B8%9A%E0%B8%97%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1/66-server-hosting/2237-web-server-hosting-php-5.3.html