· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Migrating from PHP 5.2.x to PHP 5.3.x



1. Ãâó

2. What has changed in PHP 5.3.x


PHP 5.3.x ÀÇ ´ëºÎºÐÀÇ °³¼±»çÇ×Àº ±âÁ¸¿¡ Á¸ÀçÇÏ´Â Äڵ忡´Â ¾Æ¹« ¿µÇâÀ» ÁÖÁö ¾Ê´Â´Ù. ¸î°³ÀÇ È£È¯¼º ¹®Á¦¿Í »õ·Î¿î Ư¡µéÀÌ ÀÖÀ¸¹Ç·Î, ½Ç ¼­ºñ½ºÈ¯°æ¿¡¼­ÀÇ PHP ¹öÁ¯ º¯°æÀº ¹Ýµå½Ã ÄÚµå Å×½ºÆ®°¡ ¼±ÇàµÇ¾î¾ß ÇÑ´Ù.

ÀÌÀü PHP ¹öÁ¯ ¾÷µ¥ÀÌÆ®¿¡ ´ëÇÑ ¹®¼­´Â ¾Æ·¡ ¸µÅ©¿¡¼­ È®Àΰ¡´ÉÇÏ´Ù.
  • Upgrade Notes for PHP 5.2.x.
  • Upgrade Notes for PHP 5.1.x.
  • Migrating from PHP 4 to PHP 5.

3. Backward Incompatible Changes


´ëºÎºÐÀÇ PHP5 Äڵ尡 ¾Æ¹«·± º¯È­¾øÀÌ ÀÛµ¿µÇÁö¸¸, ¸î°¡Áö backward ȣȯ¼º ¹®Á¦´Â ÁÖ¸ñµÇ¾î¾ß ÇÑ´Ù:
  • PHP 5.3.x ¿Í ¿¬°üµÈ ¸ðµç extension ¿¡¼­ »õ·Î¿î internal parameter parsing API °¡ Àû¿ëµÇ¾ú´Ù. ÀÌ parameter parsing API ´Â ȣȯµÇÁö ¾Ê´Â ÆĶó¹ÌÅÍ°¡ ³Ñ¾î¿ÔÀ»¶§ NULL À» ¸®ÅÏÇÏ´Â ±â´ÉÀ» ÇÑ´Ù. ÀÌ ±ÔÄ¢¿¡´Â ¾à°£ÀÇ ¿¹¿Ü»óȲÀÌ Àִµ¥, get_class() ÀÇ °æ¿ì error ½Ã¿¡ FALSE ¸¦ ¸®ÅÏÇÑ´Ù.
  • clearstatcache() - ´õÀÌ»ó realpath cache ¸¦ µðÆúÆ®·Î »èÁ¦ÇÏÁö ¾Ê´Â´Ù.
  • realpath() - ÀÌÁ¦ ¿ÏÀüÈ÷ Ç÷¿Æû-µ¶¸³Àû(Platform-Independent)ÀÌ´Ù.
  • call_user_func() family - ÀÌÁ¦ parent Ŭ·¹½º¿¡¼­ È£ÃâÀ» ÇÏ´õ¶óµµ $this¸¦ Àü´ÞÇÑ´Ù.
  • ¹è¿­ function ÀÎ natsort(), natcasesort(), usort(), uasort(), uksort(), array_flip(), array_unique() ´Â ´õÀÌ»ó object°¡ argument ·Î Àü´ÞµÇ´Â°ÍÀ» Çã¿ëÇÏÁö ¾Ê´Â´Ù. object »ç¿ëÀ» À§Çؼ­´Â object ¸¦ array ·Î cast ÇØ¾ß ÇÑ´Ù.
  • called by value ¸¦ »ç¿ëÇÏ´Â function ÀÇ ÀÛµ¿ ¹æ½ÄÀÌ º¯°æµÇ¾ú´Ù. ÀÌÀü¿¡´Â by-value argument °¡ Çã¿ëµÇ¾úÁö¸¸ ÀÌÁ¦´Â fatal error °¡ ¹ß»ýµÈ´Ù. ÀÌÀüÀÇ ÄÚµå´Â function ÀÌ È£ÃâµÇ±â Àü¿¡ °ªÀ» º¯¼ö¿¡ ÇÒ´çÇϱâ À§ÇØ º¯°æÀ» ÇØ¾ß ÇÑ´Ù.
  • MySQL 4.1 ÀÇ »õ·Î¿î 41-byte password format ÀÇ »ç¿ëÀ» À§ÇØ »õ·Î¿î mysqlnd ¶óÀ̺귯¸®°¡ ÇÊ¿äÇÏ´Ù. ±âÁ¸ 16-byte passwords ÀÇ »ç¿ëÀº mysql_connect() °°Àº function ÀÇ ¿¡·¯¸¦ ¹ß»ý½Ãų °ÍÀÌ´Ù.
  • »õ·Î¿î mysqlnd ¶óÀ̺귯¸®´Â ±âÁ¸ libmysql ¶óÀ̺귯¸®¿Í °°ÀÌ mysql ¼³Á¤ ÆÄÀϵé(my.cnf/my.ini)À» ÀÐÁö ¾Ê´Â´Ù. ¸¸¾à ´ç½ÅÀÇ Äڵ尡 ¼³Á¤ ÆÄÀÏÀÇ ¼ÂÆÿ¡ ÀÇÁ¸ÇÏ°í ÀÖ´Ù¸é, ´ç½ÅÀº mysqli_options() function À¸·Î ¼³Á¤ÆÄÀÏÀ» ·ÎµåÇÒ ¼ö ÀÖ´Ù.
  • ¸¶Áö¸·¿¡ ºÙ´Â / (trailing /)°¡ SplFileInfo Ŭ·¹½º³ª ´Ù¸¥ µð·ºÅ丮 Ŭ·¹½ºµé¿¡¼­ Á¦°ÅµÇ¾ú´Ù.
  • __toString ¸ÅÁ÷¸Þ¼Òµå°¡ ´õÀÌ»ó arguments ·Î Çã¿ëµÇÁö ¾Ê´Â´Ù.
  • __get, __set, __isset, __unset, __call °°Àº ¸ÅÁ÷¸Þ¼ÒµåµéÀº ¹Ýµå½Ã public À̾î¾ß ÇÏ°í ´õÀÌ»ó static ÀÌ µÉ¼ö ¾ø´Ù. ÀÌÁ¦ Method signatures °¡ ½Ç½ÃµÈ´Ù.
  • __call ¸ÅÁ÷¸Þ¼Òµå°¡ ÀÌÁ¦ private ¿Í protected ¸Þ¼Òµå·Î Á¢±ÙµÇ¾î È£ÃâµÈ´Ù.

´ÙÀ½ Å°¿öµåµéÀº ÀÌÁ¦ ¿¹¾àµÇ¾úÀ¸¸ç function, class, names ¿¡ »ç¿ëµÉ ¼ö ¾ø´Ù.
  • goto
  • namespace

4. New features


PHP 5.3.0 ´Â ±¤¹üÀ§ÇÑ »õ·Î¿î ±â´ÉµéÀ» Á¦°øÇÑ´Ù:
  • namespace ÀÌ Áö¿øµÈ´Ù.
  • Late Static Binding ÀÌ Áö¿øµÈ´Ù.
  • jump labels (limited goto) ÀÌ Áö¿øµÈ´Ù.
  • native Closures (Lambda/Anonoymous functions) ÀÌ Áö¿øµÈ´Ù.
  • »õ·Î¿î µÎ°³ÀÇ ¸ÅÁ÷¸Þ¼Òµå(__callStatic, __invoke)°¡ Ãß°¡µÇ¾ú´Ù.
  • Heredoc ¹®¹ý°ú ºñ½ÁÇÏÁö¸¸ single quotesÀ» »ç¿ëÇÏ´Â Nowdoc ¹®¹ýÀÌ ÀÌÁ¦ Áö¿øµÈ´Ù.
  • static variables¿Í Ŭ·¡½ºÀÇ properties/constants¸¦ ÃʱâÈ­ ÇÒ¶§ Heredocs »ç¿ëÀÌ °¡´ÉÇØÁ³´Ù.
  • Nowdoc ¹®¹ýÀ» º¸¿ÏÇϱâ À§ÇØ Heredocs´Â double quotes¸¦ »ç¿ëÇؼ­ ¼±¾ðµÇ¾î¾ß ÇÒ °ÍÀÌ´Ù.
  • const Å°¿öµå¸¦ »ç¿ëÇؼ­ Constants°¡ Ŭ·¹½º ¹Û¿¡¼­ ¼±¾ðµÇ´Â°ÍÀÌ °¡´ÉÇØÁ³´Ù.
  • »ïÇ׿¬»êÀÚÀÇ ´ÜÃà Çü½ÄÀÌ »ý¼ºµÇ¾ú´Ù: ?:.
  • HTTP stream wrapper°¡ ÀÌÁ¦ 200, 399ÀÇ »óÅÂÄڵ带 ¼º°øÇÑ °æ¿ì·Î ¿©±ä´Ù.
  • static methods¿¡ ´ëÇÑ µ¿Àû Á¢±ÙÀÌ °¡´ÉÇØÁ³´Ù.
  • ¿¹¿Ü¸¦ nestµÉ ¼ö ÀÖ´Ù.
  • garbage collector°¡ Ãß°¡µÇ¾ú°í µðÆúÆ®·Î enabled µÈ´Ù.


5. Changes made to Windows support


Changes to the Windows releases:

  • The minimum Windows version is now Windows 2000; Windows 98, ME, and NT4 are no longer supported.
  • Windows binaries now target i586 and later. i386 and i486 are not supported.
  • There is now experimental support for x64 versions of PHP on Windows.
  • There is now compiler support for Visual C++ 9 (VC9), using Visual Studio 2008. Snapshots and releases will now also be available for VC9. Old binaries using VC6 are still supported and released in the line with VC9.
  • The PDO_OCI php_pdo_oci8.dll library (for use with Oracle version 8 client libraries) is no longer being built. Instead, use php_pdo_oci.dll (note no '8') with Oracle 10 or 11 client libraries. Connection to other database versions is still supported.
  • For the OCI8 extension, a new library php_oci8_11g.dll is available in addition to php_oci8.dll. Only one can be enabled at any time. Use php_oci8.dll with Oracle 10.2 client libraries. Use php_oci8_11g.dll with Oracle 11 client libraries. Connection to other database versions is still supported.

Windows support has been added for the following functions:

  • checkdnsrr()
  • dns_get_record()
  • fnmatch()
  • getmxrr()
  • getopt()
  • imagecolorclosesthwb()
  • inet_ntop()
  • inet_pton()
  • link()
  • linkinfo()
  • mcrypt_create_iv()
  • readlink()
  • socket_create_pair() - This function was previously available on Windows, but was disabled as of PHP 4.3.0 due to a bug.
  • stream_socket_pair()
  • symlink()
  • time_nanosleep()
  • time_sleep_until()

Other changes:

  • Improved portability of the stat(), touch(), filemtime(), filesize() functions, and other related functions (100% portable for the available data).
  • It is now possible to create hard links on Windows using the link() function, and symbolic links using the symlink() function. Hard links are available as of Windows 2000, and symbolic links as of Windows Vista.
  • The Windows version of PHP now exposes a set of constants prefixed PHP_WINDOWS_*. A list of these constants and their usage can be found at Predefined Constants.

6. Changes in SAPI modules


SAPI ¸ðµâÀÇ º¯È­´Â ´ÙÀ½°ú °°´Ù:
  • litespeed ¶ó´Â »õ·Î¿î SAPI ¸ðµâÀÌ »ç¿ë°¡´ÉÇØÁ³´Ù.
  • CGI SAPI ¾È¿¡¼­ FastCGI Áö¿øÀÌ Ç×»ó È°¼ºÈ­µÇ°í ºñÈ°¼ºÈ­°¡ ºÒ°¡ÇÏ´Ù.
  • »õ·Î¿î CGI SAPI ¿É¼Ç -T °¡ ½ºÅ©¸³Æ®ÀÇ ¹Ýº¹ÀûÀÎ ½ÇÇà ½Ã°£(repeated execution time) ÃøÁ¤¿¡ »ç¿ëµÉ ¼ö ÀÖ´Ù.
  • »ç¿ëÀÚÁ¤ÀÇ php.ini ÆÄÀÏÀÇ .htaccess-style ¸¦ À§ÇÑ CGI/FastCGI °¡ Áö¿øµÈ´Ù.
  • dl() function Àº µðÆúÆ®·Î ºñÈ°¼ºÈ­µÇ°í CLI,CGI, embed SAPIs ¿¡¼­¸¸ »ç¿ë°¡´ÉÇÏ´Ù.

7. Deprecated features in PHP 5.3.x


PHP 5.3.0 ´Â µÎ°¡Áö »õ·Î¿î ¿¡·¯ ·¹º§(E_DEPRECATED, E_USER_DEPRECATED)À» ¼Ò°³ÇÑ´Ù.

E_DEPRECATED ¿¡·¯ ·¹º§Àº deprecateµÈ function³ª featureÀ» À§ÇØ »ç¿ëµÈ´Ù. E_USER_DEPRECATED ·¹º§Àº E_USER_ERROR³ª E_USER_WARNINGó·³ »ç¿ëÀÚ ÄÚµå¾È¿¡¼­ deprecated features¸¦ °¡¸®Å°±â À§ÇØ »ç¿ëµÈ´Ù.

´ÙÀ½Àº deprecateµÈ INI Áö½ÃÀÚ ¸®½ºÆ®ÀÌ´Ù. ¸®½ºÆ®¿¡ ¼ÓÇÑ INI Áö½ÃÀÚ¸¦ »ç¿ëÇϸé E_DEPRECATED ¿¡·¯¸¦ ¹ß»ý½Ãų °ÍÀÌ´Ù:
  • define_syslog_variables
  • register_globals
  • register_long_arrays
  • safe_mode
  • magic_quotes_gpc
  • magic_quotes_runtime
  • magic_quotes_sybase
  • Comments starting with '#' are now deprecated in .INI files.

´ÙÀ½Àº DeprecateµÈ functionsÀÌ´Ù:
  • call_user_method() (use call_user_func() instead)
  • call_user_method_array() (use call_user_func_array() instead)
  • define_syslog_variables()
  • dl()
  • ereg() (use preg_match() instead)
  • ereg_replace() (use preg_replace() instead)
  • eregi() (use preg_match() with the 'i' modifier instead)
  • eregi_replace() (use preg_replace() with the 'i' modifier instead)
  • set_magic_quotes_runtime() and its alias, magic_quotes_runtime()
  • session_register() (use the $_SESSION superglobal instead)
  • session_unregister() (use the $_SESSION superglobal instead)
  • session_is_registered() (use the $_SESSION superglobal instead)
  • set_socket_blocking() (use stream_set_blocking() instead)
  • split() (use preg_split() instead)
  • spliti() (use preg_split() with the 'i' modifier instead)
  • sql_regcase()
  • mysql_db_query() (use mysql_select_db() and mysql_query() instead)
  • mysql_escape_string() (use mysql_real_escape_string() instead)
  • Passing locale category names as strings is now deprecated. Use the LC_* family of constants instead.
  • The is_dst parameter to mktime(). Use the new timezone handling functions instead.


´ÙÀ½Àº DeprecateµÈ featureÀÌ´Ù:
  • Assigning the return value of new by reference is now deprecated.
  • Call-time pass-by-reference is now deprecated.
  • The use of {} to access string offsets is deprecated. Use [] instead.

8. Undeprecated features in PHP 5.3.x


is_a() function Àº »ç¶÷µéÀÇ ¿äû¿¡ ÀÇÇØ deprecate µÇÁö ¾Ê¾Ò´Ù. E_STRICT ¿¡·¯´Â ´õÀÌ»ó ³ª¿ÀÁö ¾Ê´Â´Ù. (it will no longer issue an E_STRICT error.)

9. New Parameters


¸î °³ÀÇ functionÀÌ PHP 5.3 ¿¡¼­ »õ·Î ³ª¿Ô´Ù:

PHP Core:
  • clearstatcache() - clear_realpath_cache ¿Í filename ÀÌ Ãß°¡‰ç´Ù.
  • copy() - stream context parameter, context °¡ Ãß°¡‰ç´Ù.
  • fgetcsv() - escape °¡ Ãß°¡‰ç´Ù.
  • ini_get_all() - details °¡ Ãß°¡‰ç´Ù.
  • mail() function ÀÌ º¸³½ email ¿¡ ´ëÇؼ­ ·Î±× ±â´ÉÀ» Áö¿øÇÑ´Ù. (´Ü mail() functionÀ» ÀÌ¿ëÇØ º¸³»Áø ¸ÞÀÏ¿¡¸¸ Àû¿ëµÈ´Ù.)
  • nl2br() - is_xhtml ÀÌ Ãß°¡‰ç´Ù.
  • parse_ini_file() - scanner_mode °¡ Ãß°¡‰ç´Ù.
  • round() - mode °¡ Ãß°¡‰ç´Ù.
  • stream_context_create() - params °¡ Ãß°¡‰ç´Ù.
  • strstr() ¿Í stristr() - before_needle ÀÌ Ãß°¡‰ç´Ù.

json:
  • json_encode() - options ÀÌ Ãß°¡‰ç´Ù..
  • json_decode() - depth °¡ Ãß°¡‰ç´Ù.

Streams:
  • stram_select(), stream_set_blocking(), stream_set_timeout(), stream_set_write_buffer() ÀÌ user-space stream wrapper ¿Í ÇÔ²² ÀÛµ¿ÇÑ´Ù.

sybase_ct:
  • sybase_connect() - new °¡ Ãß°¡‰ç´Ù.


»õ·Î¿î method parameters °¡ PHP 5.3.0 ¹öÀü¿¡¼­ Ãß°¡µÇ¾ú´Ù:

PHP Core:

  • Exception::__construct - previous °¡ Ãß°¡‰ç´Ù.

10. New Functions


PHP 5.3 ¸î°¡Áö »õ·Î¿î functionsÀÌ µîÀåÇß´Ù:

PHP Core:
  • array_replace() - ³Ñ°Ü¹ÞÀº ¹è¿­ÀÇ °ªµéÀ» »õ·Î¿î ¹è¿­¿¡ ³Ö´Â´Ù.
  • array_replace_recursive() - Àç±ÍÀûÀ¸·Î ³Ñ°Ü¹ÞÀº ¹è¿­ÀÇ °ªµéÀ» »õ·Î¿î ¹è¿­¿¡ ³Ö´Â´Ù.
  • class_alias() - »ç¿ëÀÚ Á¤ÀÇ Å¬·¡½º¿¡ ´ëÇÑ alias ¸¦ »ý¼ºÇÑ´Ù.
  • forward_static_call() - method context ·ÎºÎÅÍ »ç¿ëÀÚ function À» È£ÃâÇÑ´Ù.
  • forward_static_call_array() - method context ·ÎºÎÅÍ ¹è¿­À» Æ÷ÇÔÇÑ argument ¿Í ÇÔ²² »ç¿ëÀÚ function À» È£ÃâÇÑ´Ù.
  • gc_collect_cycles() - Forces collection of any existing garbage cycles.
  • gc_disable() - circular reference collector ¸¦ ºñÈ°¼ºÈ­ÇÑ´Ù.
  • gc_enable() - circular reference collector À» È°¼ºÈ­ÇÑ´Ù.
  • gc_enabled() - circular reference collector ÀÇ »óŸ¦ ¸®ÅÏÇÑ´Ù.
  • get_called_class() - Return the name of the class a static method is called in.
  • gethostname() - local machine ¿¡ ¼³Á¤µÈ hostname À» ¸®ÅÏÇÑ´Ù..
  • header_remove() - header() function À¸·Î ¼³Á¤µÈ HTTP header¸¦ Á¦°ÅÇÑ´Ù.
  • lcfirst() - string ÀÇ Ã¹¹ø° character ¸¦ ¼Ò¹®ÀÚ·Î ¹Ù²Û´Ù.
  • parse_ini_string() - configuration string À» ÆĽÌÇÑ´Ù.
  • quoted_printable_encode() - 8 bit string À» quoted-printable string À¸·Î º¯È¯ÇÑ´Ù.
  • str_getcsv() - CSV string À» ¹è¿­·Î ÆĽÌÇÑ´Ù.
  • stream_context_set_default() - µðÆúÆ® stream context ¸¦ ¼³Á¤ÇÑ´Ù.
  • stream_supports_lock() - ¸¸¾à stream supports °¡ Àá°ÜÀÖ´Ù¸é TRUE ¸¦ ¸®ÅÏÇÑ´Ù.
  • stream_context_get_params() - stream context ·ÎºÎÅÍ parameter ¸¦ °Ë»öÇÑ´Ù.
  • streamWrapper::stream_cast() - underlying stream resource ¸¦ °Ë»öÇÑ´Ù.
  • streamWrapper::stream_set_option() - stream options À» ¹Ù²Û´Ù.

Date/Time:
  • date_add() - DateTime object¿¡ days, months, years, hours, minutes, seconds ´ÜÀ§ÀÇ °ªÀ» ´õÇÑ´Ù.
  • date_create_from_format() - ÀԷ¹ÞÀº format À¸·Î Çü½ÄÀ» °®Ãá »õ·Î¿î DateTime object ¸¦ ¸®ÅÏÇÑ´Ù.
  • date_diff() - µÎ°³ÀÇ DateTime objects Â÷À̸¦ ¸®ÅÏÇÑ´Ù.
  • date_get_last_errors() - ¸¶Áö¸· date/time waring °ú error ¸¦ ¸®ÅÏÇÑ´Ù.
  • date_parse_from_format() - ÀԷ¹ÞÀº ³¯Â¥¿¡ ´ëÇÑ Á¤º¸¸¦ ¾ò´Â´Ù.
  • date_sub() - DateTime object ·ÎºÎÅÍ days, months, years, hours, minutes, seconds ´ÜÀ§ÀÇ °ªÀ» »«´Ù.
  • timezone_version_get() - timezonedb ÀÇ ¹öÀüÀ» ¸®ÅÏÇÑ´Ù..

GMP:
  • gmp_testbit() - bit °¡ ¼ÂÆõǾú´ÂÁö Å×½ºÆ®ÇÑ´Ù.

Hash:
  • hash_copy() - hashing context ¸¦ º¹»çÇÑ´Ù..

IMAP:
  • imap_gc() - IMAP cache ¸¦ ºñ¿î´Ù.
  • imap_utf8_to_mutf7() - UTF-8 string À» modified UTF-7 ·Î encode ÇÑ´Ù.
  • imap_mutf7_to_utf8() - modified UTF-7 string À» UTF-8 ·Î decode ÇÑ´Ù.

JSON:
  • json_last_error() - ¸¶Áö¸·À¸·Î ¹ß»ýÇÑ JSON error À» ¸®ÅÏÇÑ´Ù.

MySQL Improved:

  • mysqli_fetch_all() - ¸ðµç °á°ú rows ¸¦ fetch ÇÑ´Ù.
  • mysqli_get_connection_stats() - Ŭ¶óÀ̾ðÆ® ¿¬°á¿¡ ´ëÇÑ Åë°è¸¦ ¸®ÅÏÇÑ´Ù.
  • mysqli_poll() - Poll ¿¬°áÀ» ÇÑ´Ù.
  • mysqli_reap_async_query() - async query ·ÎºÎÅÍ °á°ú¸¦ ¾ò´Â´Ù.

OpenSSL:
  • openssl_random_pseudo_bytes() - ƯÁ¤ ±æÀÌÀÇ string À» pseudo-random bytes ·Î ä¿ö¼­ ¸®ÅÏÇÑ´Ù.

PCNTL:
  • pcntl_signal_dispatch() - pending signals ¸¦ À§ÇØ signal handler ¸¦ È£ÃâÇÑ´Ù.
  • pcntl_sigprocmask() - blocked signalÀ» ¼³Á¤ÇÏ°í °Ë»ö(retrieve)ÇÑ´Ù.
  • pcntl_sigtimedwait() - timeout À» °¡Áö°í signal À» ±â´Ù¸°´Ù.
  • pcntl_sigwaitinfo() - signal À» ±â´Ù¸°´Ù.

PCRE:
  • preg_filter() - Á¤±ÔÇ¥Çö½Ä °Ë»ö°ú ±³Ã¼¸¦ ½ÇÇàÇÏ°í ÆÐÅÏ°ú ¸ÅĪµÈ °á°ú¸¸À» ¸®ÅÏÇÑ´Ù.

Semaphore:
  • msg_queue_exists() - message queue°¡ Á¸ÀçÇÏ´ÂÁö È®ÀÎÇÑ´Ù.
  • shm_has_var() - shared memory segment ¾È¿¡ ƯÁ¤ Å°°¡ Á¸ÀçÇÏ´ÂÁö È®ÀÎÇÑ´Ù.

´ÙÀ½ functionµéÀº natively ÇÏ°Ô ±¸ÇöµÇ¾úÀ¸¹Ç·Î, PHP°¡ ½ÇÇàµÇ´Â ¸ðµç ¿î¿µÃ¼Á¦¿¡¼­ »ç¿ë°¡´ÉÇϵµ·Ï ¸¸µé¾î¶ó:
  • acosh()
  • asinh()
  • atanh()
  • expm1()
  • log1p()

11. New stream wrappers


´ÙÀ½ stream wrappers °¡ 5.3.0 ¹öÀü¿¡¼­ µîÀåÇÑ´Ù:
  • glob://
  • phar://

12. New stream filters


´ÙÀ½ stream filters °¡ 5.3.0 ¹öÀü¿¡¼­ µîÀåÇÑ´Ù:
  • dechunk (reverses HTTP chunked encoding)
  • The bz2.decompress filter °¡ concatenation ¿¡ Áö¿øµÈ´Ù.

13. New Class Constants


¸î°³ÀÇ »õ·Î¿î Ŭ·¡½º constants °¡ 5.3.0 ¹öÀü¿¡¼­ µîÀåÇÑ´Ù:

PDO_FIREBIRD:
  • PDO::FB_ATTR_DATE_FORMAT - dates ¸¦ À§ÇÑ format À» ¼³Á¤ÇÑ´Ù.
  • PDO::FB_ATTR_TIME_FORMAT - time ¸¦ À§ÇÑ format À» ¼³Á¤ÇÑ´Ù.
  • PDO::FB_ATTR_TIMESTAMP_FORMAT - timestamps ¸¦ À§ÇÑ format À» ¼³Á¤ÇÑ´Ù.

14. New Methods


¸î°³ÀÇ »õ·Î¿î methods °¡ 5.3.0 ¹öÀü¿¡¼­ µîÀåÇÑ´Ù:

Date/Time:
  • DateTime::date_add() - DateTime object¿¡ days, months, years, hours, minutes, seconds ´ÜÀ§ÀÇ °ªÀ» ´õÇÑ´Ù.
  • DateTime::date_create_from_format() - ÀԷ¹ÞÀº format À¸·Î Çü½ÄÀ» °®Ãá »õ·Î¿î DateTime object ¸¦ ¸®ÅÏÇÑ´Ù.
  • DateTime::date_diff() - µÎ°³ÀÇ DateTime objects Â÷À̸¦ ¸®ÅÏÇÑ´Ù.
  • DateTime::date_get_last_errors() - ¸¶Áö¸· date/time waring °ú error ¸¦ ¸®ÅÏÇÑ´Ù.
  • DateTime::date_sub() - DateTime object ·ÎºÎÅÍ days, months, years, hours, minutes, seconds ´ÜÀ§ÀÇ °ªÀ» »«´Ù.

Exception:
  • Exception::getPrevious() - ÀÌÀü exception À» °Ë»öÇÑ´Ù.

DOM:
  • DOMNode::getLineNo() - ÆĽÌÇÑ node ÀÇ line number ¸¦ ¾ò´Â´Ù.

PDO_FIREBIRD:
  • PDO::setAttribute() - attribute ¸¦ ¼³Á¤ÇÑ´Ù..

Reflection:
  • ReflectionClass::getNamespaceName - Returns the name of namespace where this class is defined.
  • ReflectionClass::getShortName - Returns the short name of this class (without namespace part).
  • ReflectionClass::inNamespace - Returns whether this class is defined in a namespace.
  • ReflectionFunction::getNamespaceName - Returns the name of namespace where this function is defined.
  • ReflectionFunction::getShortName - Returns the short name of the function (without namespace part).
  • ReflectionFunction::inNamespace - Returns whether this function is defined in a namespace.
  • ReflectionProperty::setAccessible - Sets whether non-public properties request can be requested.

SPL:
  • SplObjectStorage::addAll() - Add all elements from another SplObjectStorage object.
  • SplObjectStorage::removeAll() - Remove all elements from another SplObjectStorage object.

XSL:
  • XSLTProcessor::setProfiling() - profiling Ãâ·Â ÆÄÀÏÀ» ¼³Á¤ÇÑ´Ù.

15. New Extensions


´ÙÀ½ÀÇ »õ·Î¿î extensions À» PHP 5.3.0 ¿¡¼­´Â µðÆúÆ®·Î »ç¿ë°¡´ÉÇÏ´Ù:
  • Enchant - ´Ù¾çÇÑ spelling ¶óÀ̺귯¸® À§ÀÇ Ãß»ó layer.
  • Fileinfo - ¾ø¾îÁø Mimetype extension ¸¦ À§ÇÑ ´ëü extension À¸·Î full BC ¸¦ Áö¿øÇÑ´Ù.
  • INTL - ±¹Á¦È­ extension ÀÌ´Ù. INTL Àº ICU ¶óÀ̺귯¸®¸¦ wrapper ÇÏ°í ÀÖ´Ù.
  • Phar - PHP-Archive ÆÄÀÏÀÇ ±¸Çö.
  • SQLite3 - SQLite version 3 databases ¸¦ Áö¿øÇÑ´Ù.

PHP ÀÇ »õ·Î¿î ÄÚ¾î ¶óÀ̺귯¸®ÀÎ mysqlnd ´Â libmysql ÀÇ ´ëü ¶óÀ̺귯¸®ÀÌ´Ù. mysqlnd ´Â ½Ã½ºÅÛ¿¡ libmysql ÀÌ ¾øÀ» ¶§ mysql, mysqli, PDO_MySQL extensions ¸¦ ºôµåÇϱâ À§ÇØ »ç¿ëµÉ °ÍÀÌ´Ù. mysqlnd ´Â libmysql ÀÌ Á¸ÀçÇÒ ¶§µµ libmysql À» ´ë½ÅÇÏ¿© »ç¿ëµÉ °ÍÀÌ´Ù. ¼º´É»óÀÇ ÀÌÀ¯·Î mysqlnd ´Â ¸ðµç PHP ¿¡¼­ »ç¿ëÇÏ±æ ±ÇÀåÇÑ´Ù.

16. Removed Extensions


¾Æ·¡ÀÇ extension µéÀº PECL ·Î À̵¿µÇ¾ú°í ´õÀÌ»ó PHP distribution ÀÇ ÀϺΰ¡ ¾Æ´Ï´Ù. PECL ÆÐÅ°Áö¿¡¼­ ÀÌ extension µéÀÌ »ç¿ëÀÚµéÀÇ ¿ä±¸¿¡ µû¶ó »õ·Î »ý¼ºµÉ °ÍÀÌ´Ù.
  • dbase - No longer maintained
  • fbsql - No longer maintained
  • fdf - Maintained
  • ming - Maintained
  • msql - No longer maintained
  • ncurses - Maintained
  • sybase - Discontinued; sybase_ct extension À» ´ë½Å »ç¿ëÇ϶ó.
  • mhash - Discontinued; hash extension À» ´ë½Å »ç¿ëÇ϶ó. hash extension Àº mhash ¿¡ ´ëÇؼ­ fully compatibility ¸¦ °¡Áø´Ù. mhash ¸¦ »ç¿ëÇÏ°í ÀÖ´Â ¸ðµç ¾îÇø®ÄÉÀ̼ÇÀÌ ±×´ë·Î ÀÛµ¿µÉ °ÍÀÌ´Ù.

17. Other changes to extensions



´ÙÀ½ extension µéÀÌ ºôµå ¼³Á¤(build configuration) ¿¡¼­ È°¼ºÈ­µÉ ¼ö ÀÖ´Ù.
  • PCRE
  • Reflection
  • SPL

extension µ¿ÀÛÀÇ º¯È­¿Í »õ·Î¿î ±â´Éµé:
  • Date and Time - TZ environment variable À» ´õÀÌ»ó timezone À» ÃßÃøÇϴµ¥ »ç¿ëÇÒ ¼ö ¾ø´Ù.
  • cURL - cURL ÀÌ ÀÌÁ¦ SSH ¸¦ Áö¿øÇÑ´Ù.
  • Network - dns_check_record() ´Â ÀÌÁ¦ TXT elements ¸¦ Æ÷ÇÔÇÑ extra "entries" À妽º¸¦ ¸®ÅÏÇÑ´Ù.
  • Hash - SHA-224 ¿Í salsa hash ¾Ë°í¸®ÁòÀÌ Áö¿øµÈ´Ù.
  • mbstring - CP850 encoding ÀÌ Áö¿øµÈ´Ù.
  • OCI8 - A call to oci_close() on a persistent connection, or a variable referencing a persistent connection going out of scope, will now roll back any uncommitted transaction. To avoid unexpected behavior, explicitly issue a commit or roll back as needed. The old behavior can be enabled with the INI directive oci8.old_oci_close_semantics. Database Resident Connection Pooling (DRCP) and Fast Application Notification (FAN) are now supported. Oracle External Authentication is now supported . The oci_bind_by_name() function now supports SQLT_AFC (aka the CHAR datatype).
  • OpenSSL - OpenSSL digest ¿Í cipher functions ÀÌ ÀÌÁ¦ Áö¿øµÈ´Ù. DSA, RSA, DH Å°ÀÇ internal values ¿¡ ´ëÇÑ Á¢±Ùµµ °¡´ÉÇØ Á³´Ù.
  • Session - open_basedir Á¦ÇÑÀÌ Àû¿ëµÇ¸é session µéÀº ´õÀÌ»ó /tmp ¹ØÀÇ session-files ¿¡ ÀúÀåµÇÁö ¾Ê´Â´Ù.
  • SOAP - Now supports sending user supplied HTTP headers.
  • MySQLi °¡ ÀÌÁ¦ hostname ¾Õ¿¡ "p:" ¸¦ ºÙÀÓÀ¸·Î½á Áö¼ÓÀûÀÎ ¿¬°á(persistent connections)À» Áö¿øÇÑ´Ù.
  • Image Processing and GD - gd_info() À¸·ÎºÎÅÍ ¸®ÅϵǴ "JPG Support" À妽º°¡ "JPEG Support" ·Î ¹Ù²ï´Ù.

18. New Classes


´ÙÀ½ Ŭ·¡½ºµéÀÌ PHP 5.3.0 ¹öÀü¿¡¼­ µîÀåÇÑ´Ù:

Date/Time:
  • DateInterval
  • DatePeriod

Phar:
  • Phar
  • PharData
  • PharException
  • PharFileInfo

SPL:
  • FilesystemIterator
  • GlobIterator
  • MultipleIterator
  • RecursiveTreeIterator
  • SplDoublyLinkedList
  • SplFixedArray
  • SplHeap
  • SplMaxHeap
  • SplMinHeap
  • SplPriorityQueue
  • SplQueue
  • SplStack

19. New Global Constants


PHP Core:
  • DIR
  • NAMESPACE
  • E_DEPRECATED
  • E_USER_DEPRECATED
  • INI_SCANNER_NORMAL
  • INI_SCANNER_RAW
  • PHP_MAXPATHLEN
  • PHP_WINDOWS_NT_DOMAIN_CONTROLLER
  • PHP_WINDOWS_NT_SERVER
  • PHP_WINDOWS_NT_WORKSTATION
  • PHP_WINDOWS_VERSION_BUILD
  • PHP_WINDOWS_VERSION_MAJOR
  • PHP_WINDOWS_VERSION_MINOR
  • PHP_WINDOWS_VERSION_PLATFORM
  • PHP_WINDOWS_VERSION_PRODUCTTYPE
  • PHP_WINDOWS_VERSION_SP_MAJOR
  • PHP_WINDOWS_VERSION_SP_MINOR
  • PHP_WINDOWS_VERSION_SUITEMASK

cURL:
  • CURLOPT_PROGRESSFUNCTION

GD:
  • IMG_FILTER_PIXELATE

JSON:
  • JSON_ERROR_CTRL_CHAR
  • JSON_ERROR_DEPTH
  • JSON_ERROR_NONE
  • JSON_ERROR_STATE_MISMATCH
  • JSON_ERROR_SYNTAX
  • JSON_FORCE_OBJECT
  • JSON_HEX_TAG
  • JSON_HEX_AMP
  • JSON_HEX_APOS
  • JSON_HEX_QUOT

LDAP:
  • LDAP_OPT_NETWORK_TIMEOUT

libxml:
  • LIBXML_LOADED_VERSION

PCRE:
  • PREG_BAD_UTF8_OFFSET_ERROR

PCNTL:
  • BUS_ADRALN
  • BUS_ADRERR
  • BUS_OBJERR
  • CLD_CONTIUNED
  • CLD_DUMPED
  • CLD_EXITED
  • CLD_KILLED
  • CLD_STOPPED
  • CLD_TRAPPED
  • FPE_FLTDIV
  • FPE_FLTINV
  • FPE_FLTOVF
  • FPE_FLTRES
  • FPE_FLTSUB
  • FPE_FLTUND
  • FPE_INTDIV
  • FPE_INTOVF
  • ILL_BADSTK
  • ILL_COPROC
  • ILL_ILLADR
  • ILL_ILLOPC
  • ILL_ILLOPN
  • ILL_ILLTRP
  • ILL_PRVOPC
  • ILL_PRVREG
  • POLL_ERR
  • POLL_HUP
  • POLL_IN
  • POLL_MSG
  • POLL_OUT
  • POLL_PRI
  • SEGV_ACCERR
  • SEGV_MAPERR
  • SI_ASYNCIO
  • SI_KERNEL
  • SI_MESGQ
  • SI_NOINFO
  • SI_QUEUE
  • SI_SIGIO
  • SI_TIMER
  • SI_TKILL
  • SI_USER
  • SIG_BLOCK
  • SIG_SETMASK
  • SIG_UNBLOCK
  • TRAP_BRKPT
  • TRAP_TRACE

20. Changes to INI file handling


PHP 5.3.0 ¿¡¼­´Â INI ÆÄÀÏ ÆĽÌÀÌ °³¼±µÇ¾ú°í ¸î°³ÀÇ »õ·Î¿î ¹®¹ýÀÌ Ãß°¡µÇ¾ú´Ù.
  • standard php.ini ÆÄÀÏÀÌ re-organized µÇ°í °³¸íµÇ¾ú´Ù. php.ini-development ´Â °³¹ßȯ°æÀ» À§ÇÑ ¼³Á¤À» °¡Áö°í php.ini-production Àº production ȯ°æÀ» À§ÇÑ ¼³Á¤À» °¡Áø´Ù.
  • µÎ°³ÀÇ Æ¯º°ÇÑ ±¸¿ª¿¡ ´ëÇÑ Áö¿øÀ» Çϴµ¥ PATH=/opt/httpd/www.example.com/ ¿Í HOST=www.example.com ÀÌ´Ù. ÀÌ ±¸¿ª¿¡ Æ÷ÇÔµÈ Áö½ÃÀÚ set Àº »ç¿ëÀÚ Á¤ÀÇ INI ÆÄÀÏ¿¡ ÀÇÇؼ­ override ¼ö ¾ø´Ù. runtime ½Ã¿¡µµ ºÒ°¡ÇÏ´Ù.
  • zend_extension_debug ¿Í zend_extension_ts Á¦°ÅµÇ¾ú´Ù. ¸ðµç Zend Extension ·Îµå¸¦ À§Çؼ­´Â zend_extension Áö½ÃÀÚ°¡ »ç¿ëµÈ´Ù.
  • zend.ze1_compatibility_mode °¡ Á¦°ÅµÇ¾ú´Ù. ¸¸¾à INI Áö½ÃÀÚ°¡ On À¸·Î ¼³Á¤µÇ¾î ÀÖ´Ù¸é, ½ÃÀ۽à E_ERROR°¡ ¹ß»ýÇÒ °ÍÀÌ´Ù.
  • It is now possible to use the full path to load modules using the "extension" directive.
  • "ini-variables" ÀÌ ÀÌÁ¦ ¸ðµç php.ini ÆÄÀÏ ¾È¿¡¼­ »ç¿ëµÉ ¼ö ÀÖ´Ù.
  • Runtime tightening of open_basedir restrictions is now possible.
  • INI ¿É¼Ç ¹è¿­¿¡¼­ alphanumeric ¶Ç´Â variable À妽º »ç¿ëÀÌ °¡´ÉÇÏ´Ù.
  • get_cfg_var() is now able to return "array" INI options.
  • »õ·Î¿î Áö½ÃÀÚÀÎ mail.add_x_header °¡ Ãß°¡µÇ¾ú´Ù.
  • »õ·Î¿î Áö½ÃÀÚÀÎ user_ini.filename °¡ Ãß°¡µÇ¾ú´Ù.
  • »õ·Î¿î Áö½ÃÀÚÀÎ user_ini.cache_ttl °¡ Ãß°¡µÇ¾ú´Ù.
  • »õ·Î¿î Áö½ÃÀÚÀÎ exit_on_timeout °¡ Ãß°¡µÇ¾ú´Ù.
  • open_basedir is now PHP_INI_ALL

´ÙÀ½ÀÇ ini Áö½ÃÀÚ°¡ »õ·Ó°Ô Ãß°¡µÇ¾ú´Ù:
  • »õ·Î¿î .htaccess-style user INI file mechanism À» À§ÇÑ user_ini.filename ¿Í user_ini.cache_ttl °¡ Ãß°¡µÇ¾ú´Ù.
  • Added mbstring.http_output_conv_mimetype. This directive specifies the regex pattern of content types for which mb_output_handler() is activated.
  • Added request_order °¡ Ãß°¡µÇ¾ú´Ù. $_REQUEST ¿¡¼­ »ç¿ëµÉ external variables ÄÁÆ®·ÑÀÌ Çã¿ëµÈ´Ù.

´ÙÀ½ ini Áö½ÃÀÚ°¡ »õ·Î¿î µðÆúÆ® °ªÀ» °¡Áø´Ù:
  • session.use_only_cookies °¡ ÀÌÁ¦ µðÆúÆ® "1(È°¼ºÈ­)" ·Î ¼³Á¤µÈ´Ù.
  • oci8.default_prefetch ÀÌ "10" ¿¡¼­ "100" À¸·Î º¯°æµÇ¾ú´Ù.

21. Other changes


  • SplFileInfo::getpathinfo() - path name ¿¡ ´ëÇÑ Á¤º¸¸¦ ¸®ÅÏÇÑ´Ù.
  • SplObjectStorage - ArrayAccess ¸¦ Áö¿øÇÑ´Ù. SplObjectStorage ÀÇ object ¿Í °áÇÕµÈ Á¤º¸ÀÇ ÀúÀåµµ °¡´ÉÇØÁ³´Ù.
  • In the GD extension, there is now pixelation support available through the imagefilter() function.
  • var_dump() ÀÇ °á°ú°¡ private object properties ¸¦ Æ÷ÇÔÇÑ´Ù.
  • session_start() - session startup À» ½ÇÆÐÇßÀ»¶§ FALSE À» ¸®ÅÏÇÑ´Ù.
  • property_exists() - method_exist() ¿Í °°ÀÌ property ¿¡ ´ëÇÑ Á¢±Ù ÀÇÁ¸¼ºÀ» È®ÀÎÇÑ´Ù.
  • Stream wrappers - include_path ¸¦ ÅëÇÑ »ç¿ëÀÌ °¡´ÉÇÏ´Ù.
  • The initial parameter for array_reduce() can now be of any type.
  • µð·ºÅ丮 function ÀÎ opendir(), scandir(), dir() °¡ µðÆúÆ® stream context ¿¡¼­ »ç¿ë °¡´ÉÇÏ´Ù.
  • crypt() now has Blowfish and extended DES support, and crypt() features are now 100% portable. PHP has its own internal crypt implementation which drops into place when support for crypt or crypt_r is not found.
  • getopt() - ¸ðµç Ç÷¿Æû¿¡ ´ëÇØ "long options" ÀÌ Çã¿ëµÈ´Ù. optional values ¿Í ºÐ¸®±âÈ£(=) »ç¿ëÀÇ Áö¿øµÈ´Ù.
  • fopen() - O_NONBLOCK À¸·Î open() ½Ã½ºÅÛ ÄÝÀ» È£ÃâÇÒ ¼ö ÀÖ´Â »õ·Î¿î ¿É¼Ç (n) À» °¡Áø´Ù. À©µµ¿ì¿¡¼­´Â »ç¿ëÇÒ ¼ö ¾ø´Ù.
  • getimagesize() - icon files (.ico) À» Áö¿øÇÑ´Ù..

ID
Password
Join
Enjoy your life; be pleasant and gay, like the birds in May.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2011-06-01 12:28:02
Processing time 0.0269 sec