· 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
It is a poor judge who cannot award a prize.


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.0249 sec