PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LCOV - code coverage report
Current view: top level - ext/intl - php_intl.c (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 62 64 96.9 %
Date: 2016-07-19 Functions: 7 7 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | PHP Version 7                                                        |
       4             :    +----------------------------------------------------------------------+
       5             :    | This source file is subject to version 3.01 of the PHP license,      |
       6             :    | that is bundled with this package in the file LICENSE, and is        |
       7             :    | available through the world-wide-web at the following url:           |
       8             :    | http://www.php.net/license/3_01.txt                                  |
       9             :    | If you did not receive a copy of the PHP license and are unable to   |
      10             :    | obtain it through the world-wide-web, please send a note to          |
      11             :    | license@php.net so we can mail you a copy immediately.               |
      12             :    +----------------------------------------------------------------------+
      13             :    | Authors: Vadim Savchuk <vsavchuk@productengine.com>                  |
      14             :    |          Dmitry Lakhtyuk <dlakhtyuk@productengine.com>               |
      15             :    |          Stanislav Malyshev <stas@zend.com>                          |
      16             :    |          Kirti Velankar <kirtig@yahoo-inc.com>                         |
      17             :    +----------------------------------------------------------------------+
      18             :  */
      19             : 
      20             : #ifdef HAVE_CONFIG_H
      21             : #include "config.h"
      22             : #endif
      23             : 
      24             : 
      25             : #include "php_intl.h"
      26             : #include "intl_error.h"
      27             : #include "collator/collator_class.h"
      28             : #include "collator/collator.h"
      29             : #include "collator/collator_attr.h"
      30             : #include "collator/collator_compare.h"
      31             : #include "collator/collator_sort.h"
      32             : #include "collator/collator_convert.h"
      33             : #include "collator/collator_locale.h"
      34             : #include "collator/collator_create.h"
      35             : #include "collator/collator_error.h"
      36             : 
      37             : #include "converter/converter.h"
      38             : 
      39             : #include "formatter/formatter.h"
      40             : #include "formatter/formatter_class.h"
      41             : #include "formatter/formatter_attr.h"
      42             : #include "formatter/formatter_format.h"
      43             : #include "formatter/formatter_main.h"
      44             : #include "formatter/formatter_parse.h"
      45             : 
      46             : #include "grapheme/grapheme.h"
      47             : 
      48             : #include "msgformat/msgformat.h"
      49             : #include "msgformat/msgformat_class.h"
      50             : #include "msgformat/msgformat_attr.h"
      51             : #include "msgformat/msgformat_format.h"
      52             : #include "msgformat/msgformat_parse.h"
      53             : 
      54             : #include "normalizer/normalizer.h"
      55             : #include "normalizer/normalizer_class.h"
      56             : #include "normalizer/normalizer_normalize.h"
      57             : 
      58             : #include "locale/locale.h"
      59             : #include "locale/locale_class.h"
      60             : #include "locale/locale_methods.h"
      61             : 
      62             : #include "dateformat/dateformat.h"
      63             : #include "dateformat/dateformat_class.h"
      64             : #include "dateformat/dateformat_attr.h"
      65             : #include "dateformat/dateformat_attrcpp.h"
      66             : #include "dateformat/dateformat_format.h"
      67             : #include "dateformat/dateformat_format_object.h"
      68             : #include "dateformat/dateformat_parse.h"
      69             : #include "dateformat/dateformat_data.h"
      70             : 
      71             : #include "resourcebundle/resourcebundle_class.h"
      72             : 
      73             : #include "transliterator/transliterator.h"
      74             : #include "transliterator/transliterator_class.h"
      75             : #include "transliterator/transliterator_methods.h"
      76             : 
      77             : #include "timezone/timezone_class.h"
      78             : #include "timezone/timezone_methods.h"
      79             : 
      80             : #include "calendar/calendar_class.h"
      81             : #include "calendar/calendar_methods.h"
      82             : #include "calendar/gregoriancalendar_methods.h"
      83             : 
      84             : #include "breakiterator/breakiterator_class.h"
      85             : #include "breakiterator/breakiterator_iterators.h"
      86             : 
      87             : #include "idn/idn.h"
      88             : #include "uchar/uchar.h"
      89             : 
      90             : #if U_ICU_VERSION_MAJOR_NUM * 1000 + U_ICU_VERSION_MINOR_NUM >= 4002
      91             : # include "spoofchecker/spoofchecker_class.h"
      92             : # include "spoofchecker/spoofchecker.h"
      93             : # include "spoofchecker/spoofchecker_create.h"
      94             : # include "spoofchecker/spoofchecker_main.h"
      95             : #endif
      96             : 
      97             : #include "msgformat/msgformat.h"
      98             : #include "common/common_error.h"
      99             : #include "common/common_enum.h"
     100             : 
     101             : #include <unicode/uloc.h>
     102             : #include <unicode/uclean.h>
     103             : #include <ext/standard/info.h>
     104             : 
     105             : #include "php_ini.h"
     106             : #define INTL_MODULE_VERSION PHP_INTL_VERSION
     107             : 
     108             : /*
     109             :  * locale_get_default has a conflict since ICU also has
     110             :  * a function with the same  name
     111             :  * in fact ICU appends the version no. to it also
     112             :  * Hence the following undef for ICU version
     113             :  * Same true for the locale_set_default function
     114             : */
     115             : #undef locale_get_default
     116             : #undef locale_set_default
     117             : 
     118             : ZEND_DECLARE_MODULE_GLOBALS( intl )
     119             : 
     120         168 : const char *intl_locale_get_default( void )
     121             : {
     122         168 :         if( INTL_G(default_locale) == NULL ) {
     123          16 :                 return uloc_getDefault();
     124             :         }
     125         152 :         return INTL_G(default_locale);
     126             : }
     127             : 
     128             : /* {{{ Arguments info */
     129             : ZEND_BEGIN_ARG_INFO_EX(collator_static_0_args, 0, 0, 0)
     130             : ZEND_END_ARG_INFO()
     131             : 
     132             : ZEND_BEGIN_ARG_INFO_EX(collator_static_1_arg, 0, 0, 1)
     133             :         ZEND_ARG_INFO(0, arg1)
     134             : ZEND_END_ARG_INFO()
     135             : 
     136             : ZEND_BEGIN_ARG_INFO_EX(collator_0_args, 0, 0, 1)
     137             :         ZEND_ARG_OBJ_INFO(0, object, Collator, 0)
     138             : ZEND_END_ARG_INFO()
     139             : 
     140             : ZEND_BEGIN_ARG_INFO_EX(collator_1_arg, 0, 0, 2)
     141             :         ZEND_ARG_OBJ_INFO(0, object, Collator, 0)
     142             :         ZEND_ARG_INFO(0, arg1)
     143             : ZEND_END_ARG_INFO()
     144             : 
     145             : ZEND_BEGIN_ARG_INFO_EX(collator_2_args, 0, 0, 3)
     146             :         ZEND_ARG_OBJ_INFO(0, object, Collator, 0)
     147             :         ZEND_ARG_INFO(0, arg1)
     148             :         ZEND_ARG_INFO(0, arg2)
     149             : ZEND_END_ARG_INFO()
     150             : 
     151             : ZEND_BEGIN_ARG_INFO_EX(collator_sort_args, 0, 0, 2)
     152             :         ZEND_ARG_OBJ_INFO(0, object, Collator, 0)
     153             :         ZEND_ARG_ARRAY_INFO(1, arr, 0)
     154             :         ZEND_ARG_INFO(0, sort_flags)
     155             : ZEND_END_ARG_INFO()
     156             : 
     157             : ZEND_BEGIN_ARG_INFO_EX(numfmt_parse_arginfo, 0, 0, 2)
     158             :         ZEND_ARG_INFO(0, formatter)
     159             :         ZEND_ARG_INFO(0, string)
     160             :         ZEND_ARG_INFO(0, type)
     161             :         ZEND_ARG_INFO(1, position)
     162             : ZEND_END_ARG_INFO()
     163             : 
     164             : ZEND_BEGIN_ARG_INFO_EX(numfmt_parse_currency_arginfo, 0, 0, 3)
     165             :         ZEND_ARG_INFO(0, formatter)
     166             :         ZEND_ARG_INFO(0, string)
     167             :         ZEND_ARG_INFO(1, currency)
     168             :         ZEND_ARG_INFO(1, position)
     169             : ZEND_END_ARG_INFO()
     170             : 
     171             : ZEND_BEGIN_ARG_INFO_EX(locale_0_args, 0, 0, 0)
     172             : ZEND_END_ARG_INFO()
     173             : 
     174             : ZEND_BEGIN_ARG_INFO_EX(locale_1_arg, 0, 0, 1)
     175             :         ZEND_ARG_INFO(0, arg1)
     176             : ZEND_END_ARG_INFO()
     177             : 
     178             : ZEND_BEGIN_ARG_INFO_EX(locale_2_args, 0, 0, 2)
     179             :         ZEND_ARG_INFO(0, arg1)
     180             :         ZEND_ARG_INFO(0, arg2)
     181             : ZEND_END_ARG_INFO()
     182             : 
     183             : ZEND_BEGIN_ARG_INFO_EX(locale_3_args, 0, 0, 3)
     184             :         ZEND_ARG_INFO(0, arg1)
     185             :         ZEND_ARG_INFO(0, arg2)
     186             :         ZEND_ARG_INFO(0, arg3)
     187             : ZEND_END_ARG_INFO()
     188             : 
     189             : ZEND_BEGIN_ARG_INFO_EX(locale_4_args, 0, 0, 4)
     190             :         ZEND_ARG_INFO(0, arg1)
     191             :         ZEND_ARG_INFO(0, arg2)
     192             :         ZEND_ARG_INFO(0, arg3)
     193             :         ZEND_ARG_INFO(0, arg4)
     194             : ZEND_END_ARG_INFO()
     195             : 
     196             : #define intl_0_args collator_static_0_args
     197             : #define intl_1_arg collator_static_1_arg
     198             : 
     199             : ZEND_BEGIN_ARG_INFO_EX(normalizer_args, 0, 0, 1)
     200             :         ZEND_ARG_INFO(0, input)
     201             :         ZEND_ARG_INFO(0, form)
     202             : ZEND_END_ARG_INFO()
     203             : 
     204             : ZEND_BEGIN_ARG_INFO_EX(grapheme_1_arg, 0, 0, 1)
     205             :         ZEND_ARG_INFO(0, string)
     206             : ZEND_END_ARG_INFO()
     207             : 
     208             : ZEND_BEGIN_ARG_INFO_EX(grapheme_search_args, 0, 0, 2)
     209             :         ZEND_ARG_INFO(0, haystack)
     210             :         ZEND_ARG_INFO(0, needle)
     211             :         ZEND_ARG_INFO(0, offset)
     212             : ZEND_END_ARG_INFO()
     213             : 
     214             : ZEND_BEGIN_ARG_INFO_EX(grapheme_substr_args, 0, 0, 2)
     215             :         ZEND_ARG_INFO(0, string)
     216             :         ZEND_ARG_INFO(0, start)
     217             :         ZEND_ARG_INFO(0, length)
     218             : ZEND_END_ARG_INFO()
     219             : 
     220             : ZEND_BEGIN_ARG_INFO_EX(grapheme_strstr_args, 0, 0, 2)
     221             :         ZEND_ARG_INFO(0, haystack)
     222             :         ZEND_ARG_INFO(0, needle)
     223             :         ZEND_ARG_INFO(0, before_needle)
     224             : ZEND_END_ARG_INFO()
     225             : 
     226             : ZEND_BEGIN_ARG_INFO_EX(grapheme_extract_args, 0, 0, 2)
     227             :         ZEND_ARG_INFO(0, arg1)
     228             :         ZEND_ARG_INFO(0, arg2)
     229             :         ZEND_ARG_INFO(0, arg3)
     230             :         ZEND_ARG_INFO(0, arg4)
     231             :         ZEND_ARG_INFO(1, arg5)  /* 1 = pass by reference */
     232             : ZEND_END_ARG_INFO()
     233             : 
     234             : ZEND_BEGIN_ARG_INFO_EX(datefmt_parse_args, 0, 0, 2)
     235             :         ZEND_ARG_INFO(0, formatter)
     236             :         ZEND_ARG_INFO(0, string)
     237             :         ZEND_ARG_INFO(1, position)
     238             : ZEND_END_ARG_INFO()
     239             : 
     240             : ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_create, 0, 0, 2)
     241             :         ZEND_ARG_INFO(0, locale)
     242             :         ZEND_ARG_INFO(0, style)
     243             :         ZEND_ARG_INFO(0, pattern)
     244             : ZEND_END_ARG_INFO()
     245             : 
     246             : ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_get_error_code, 0, 0, 1)
     247             :         ZEND_ARG_INFO(0, nf)
     248             : ZEND_END_ARG_INFO()
     249             : 
     250             : ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_format, 0, 0, 2)
     251             :         ZEND_ARG_INFO(0, nf)
     252             :         ZEND_ARG_INFO(0, num)
     253             :         ZEND_ARG_INFO(0, type)
     254             : ZEND_END_ARG_INFO()
     255             : 
     256             : ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_format_currency, 0, 0, 3)
     257             :         ZEND_ARG_INFO(0, nf)
     258             :         ZEND_ARG_INFO(0, num)
     259             :         ZEND_ARG_INFO(0, currency)
     260             : ZEND_END_ARG_INFO()
     261             : 
     262             : ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_get_attribute, 0, 0, 2)
     263             :         ZEND_ARG_INFO(0, nf)
     264             :         ZEND_ARG_INFO(0, attr)
     265             : ZEND_END_ARG_INFO()
     266             : 
     267             : ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_set_attribute, 0, 0, 3)
     268             :         ZEND_ARG_INFO(0, nf)
     269             :         ZEND_ARG_INFO(0, attr)
     270             :         ZEND_ARG_INFO(0, value)
     271             : ZEND_END_ARG_INFO()
     272             : 
     273             : ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_set_symbol, 0, 0, 3)
     274             :         ZEND_ARG_INFO(0, nf)
     275             :         ZEND_ARG_INFO(0, attr)
     276             :         ZEND_ARG_INFO(0, symbol)
     277             : ZEND_END_ARG_INFO()
     278             : 
     279             : ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_set_pattern, 0, 0, 2)
     280             :         ZEND_ARG_INFO(0, nf)
     281             :         ZEND_ARG_INFO(0, pattern)
     282             : ZEND_END_ARG_INFO()
     283             : 
     284             : ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_get_locale, 0, 0, 1)
     285             :         ZEND_ARG_INFO(0, nf)
     286             :         ZEND_ARG_INFO(0, type)
     287             : ZEND_END_ARG_INFO()
     288             : 
     289             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_create, 0, 0, 2)
     290             :         ZEND_ARG_INFO(0, locale)
     291             :         ZEND_ARG_INFO(0, pattern)
     292             : ZEND_END_ARG_INFO()
     293             : 
     294             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_get_error_code, 0, 0, 1)
     295             :         ZEND_ARG_INFO(0, nf)
     296             : ZEND_END_ARG_INFO()
     297             : 
     298             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_get_error_message, 0, 0, 1)
     299             :         ZEND_ARG_INFO(0, coll)
     300             : ZEND_END_ARG_INFO()
     301             : 
     302             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_format, 0, 0, 2)
     303             :         ZEND_ARG_INFO(0, nf)
     304             :         ZEND_ARG_INFO(0, args)
     305             : ZEND_END_ARG_INFO()
     306             : 
     307             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_format_message, 0, 0, 3)
     308             :         ZEND_ARG_INFO(0, locale)
     309             :         ZEND_ARG_INFO(0, pattern)
     310             :         ZEND_ARG_INFO(0, args)
     311             : ZEND_END_ARG_INFO()
     312             : 
     313             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_parse, 0, 0, 2)
     314             :         ZEND_ARG_INFO(0, nf)
     315             :         ZEND_ARG_INFO(0, source)
     316             : ZEND_END_ARG_INFO()
     317             : 
     318             : ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_parse_message, 0, 0, 3)
     319             :         ZEND_ARG_INFO(0, locale)
     320             :         ZEND_ARG_INFO(0, pattern)
     321             :         ZEND_ARG_INFO(0, source)
     322             : ZEND_END_ARG_INFO()
     323             : 
     324             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_set_pattern, 0, 0, 2)
     325             :         ZEND_ARG_INFO(0, mf)
     326             :         ZEND_ARG_INFO(0, pattern)
     327             : ZEND_END_ARG_INFO()
     328             : 
     329             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_get_locale, 0, 0, 1)
     330             :         ZEND_ARG_INFO(0, mf)
     331             : ZEND_END_ARG_INFO()
     332             : 
     333             : ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_set_pattern, 0, 0, 2)
     334             :         ZEND_ARG_INFO(0, mf)
     335             :         ZEND_ARG_INFO(0, pattern)
     336             : ZEND_END_ARG_INFO()
     337             : 
     338             : ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_set_timezone, 0, 0, 2)
     339             :         ZEND_ARG_INFO(0, mf)
     340             :         ZEND_ARG_INFO(0, timezone)
     341             : ZEND_END_ARG_INFO()
     342             : 
     343             : ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_set_calendar, 0, 0, 2)
     344             :         ZEND_ARG_INFO(0, mf)
     345             :         ZEND_ARG_INFO(0, calendar)
     346             : ZEND_END_ARG_INFO()
     347             : 
     348             : ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_format, 0, 0, 0)
     349             :         ZEND_ARG_INFO(0, args)
     350             :         ZEND_ARG_INFO(0, array)
     351             : ZEND_END_ARG_INFO()
     352             : 
     353             : ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_format_object, 0, 0, 1)
     354             :         ZEND_ARG_INFO(0, object)
     355             :         ZEND_ARG_INFO(0, format)
     356             :         ZEND_ARG_INFO(0, locale)
     357             : ZEND_END_ARG_INFO()
     358             : 
     359             : 
     360             : ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_create, 0, 0, 3)
     361             :         ZEND_ARG_INFO(0, locale)
     362             :         ZEND_ARG_INFO(0, date_type)
     363             :         ZEND_ARG_INFO(0, time_type)
     364             :         ZEND_ARG_INFO(0, timezone_str)
     365             :         ZEND_ARG_INFO(0, calendar)
     366             :         ZEND_ARG_INFO(0, pattern)
     367             : ZEND_END_ARG_INFO()
     368             : 
     369             : ZEND_BEGIN_ARG_INFO_EX(arginfo_idn_to_ascii, 0, 0, 1)
     370             :         ZEND_ARG_INFO(0, domain)
     371             :         ZEND_ARG_INFO(0, option)
     372             :         ZEND_ARG_INFO(0, variant)
     373             :         ZEND_ARG_INFO(1, idn_info)
     374             : ZEND_END_ARG_INFO()
     375             : 
     376             : ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_create_proc, 0, 0, 2 )
     377             :         ZEND_ARG_INFO( 0, locale )
     378             :         ZEND_ARG_INFO( 0, bundlename )
     379             :         ZEND_ARG_INFO( 0, fallback )
     380             : ZEND_END_ARG_INFO()
     381             : 
     382             : ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_get_proc, 0, 0, 2 )
     383             :     ZEND_ARG_INFO( 0, bundle )
     384             :         ZEND_ARG_INFO( 0, index )
     385             :         ZEND_ARG_INFO( 0, fallback )
     386             : ZEND_END_ARG_INFO()
     387             : 
     388             : ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_count_proc, 0, 0, 1 )
     389             :   ZEND_ARG_INFO( 0, bundle )
     390             : ZEND_END_ARG_INFO()
     391             : 
     392             : ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_locales_proc, 0, 0, 1 )
     393             :         ZEND_ARG_INFO( 0, bundlename )
     394             : ZEND_END_ARG_INFO()
     395             : 
     396             : ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_get_error_code_proc, 0, 0, 1 )
     397             :   ZEND_ARG_INFO( 0, bundle )
     398             : ZEND_END_ARG_INFO()
     399             : 
     400             : ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_get_error_message_proc, 0, 0, 1 )
     401             :   ZEND_ARG_INFO( 0, bundle )
     402             : ZEND_END_ARG_INFO()
     403             : 
     404             : ZEND_BEGIN_ARG_INFO_EX( arginfo_transliterator_void, 0, 0, 0 )
     405             : ZEND_END_ARG_INFO()
     406             : 
     407             : ZEND_BEGIN_ARG_INFO_EX( arginfo_transliterator_create, 0, 0, 1 )
     408             :         ZEND_ARG_INFO( 0, id )
     409             :         ZEND_ARG_INFO( 0, direction )
     410             : ZEND_END_ARG_INFO()
     411             : 
     412             : ZEND_BEGIN_ARG_INFO_EX( arginfo_transliterator_create_from_rules, 0, 0, 1 )
     413             :         ZEND_ARG_INFO( 0, rules )
     414             :         ZEND_ARG_INFO( 0, direction )
     415             : ZEND_END_ARG_INFO()
     416             : 
     417             : ZEND_BEGIN_ARG_INFO_EX( arginfo_transliterator_create_inverse, 0, 0, 1 )
     418             :         ZEND_ARG_OBJ_INFO( 0, orig_trans, Transliterator, 0 )
     419             : ZEND_END_ARG_INFO()
     420             : 
     421             : ZEND_BEGIN_ARG_INFO_EX( arginfo_transliterator_transliterate, 0, 0, 2 )
     422             :         ZEND_ARG_INFO( 0, trans )
     423             :         ZEND_ARG_INFO( 0, subject )
     424             :         ZEND_ARG_INFO( 0, start )
     425             :         ZEND_ARG_INFO( 0, end )
     426             : ZEND_END_ARG_INFO()
     427             : 
     428             : ZEND_BEGIN_ARG_INFO_EX( arginfo_transliterator_error, 0, 0, 1 )
     429             :         ZEND_ARG_OBJ_INFO( 0, trans, Transliterator, 0 )
     430             : ZEND_END_ARG_INFO()
     431             : 
     432             : ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_idarg_static, 0, 0, 1 )
     433             :         ZEND_ARG_INFO( 0, zoneId )
     434             : ZEND_END_ARG_INFO()
     435             : 
     436             : ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_from_date_time_zone, 0, 0, 1 )
     437             :         ZEND_ARG_OBJ_INFO( 0, dateTimeZone, DateTimeZone, 0 )
     438             : ZEND_END_ARG_INFO()
     439             : 
     440             : ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_create_enumeration, 0, 0, 0 )
     441             :         ZEND_ARG_INFO( 0, countryOrRawOffset )
     442             : ZEND_END_ARG_INFO()
     443             : 
     444             : ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_create_time_zone_id_enumeration, 0, 0, 1 )
     445             :         ZEND_ARG_INFO( 0, zoneType )
     446             :         ZEND_ARG_INFO( 0, region )
     447             :         ZEND_ARG_INFO( 0, rawOffset )
     448             : ZEND_END_ARG_INFO()
     449             : 
     450             : ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_get_canonical_id, 0, 0, 1 )
     451             :         ZEND_ARG_INFO( 0, zoneId )
     452             :         ZEND_ARG_INFO( 1, isSystemID )
     453             : ZEND_END_ARG_INFO()
     454             : 
     455             : ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_get_equivalent_id, 0, 0, 2 )
     456             :         ZEND_ARG_INFO( 0, zoneId )
     457             :         ZEND_ARG_INFO( 0, index )
     458             : ZEND_END_ARG_INFO()
     459             : 
     460             : ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_get_offset, 0, 0, 5 )
     461             :         ZEND_ARG_OBJ_INFO( 0, timeZone, IntlTimeZone, 0 )
     462             :         ZEND_ARG_INFO( 0, date )
     463             :         ZEND_ARG_INFO( 0, local )
     464             :         ZEND_ARG_INFO( 1, rawOffset )
     465             :         ZEND_ARG_INFO( 1, dstOffset )
     466             : ZEND_END_ARG_INFO()
     467             : 
     468             : ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_has_same_rules, 0, 0, 1 )
     469             :         ZEND_ARG_OBJ_INFO( 0, timeZone, IntlTimeZone, 0 )
     470             :         ZEND_ARG_OBJ_INFO( 0, otherTimeZone, IntlTimeZone, 0 )
     471             : ZEND_END_ARG_INFO()
     472             : 
     473             : ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_get_display_name, 0, 0, 1 )
     474             :         ZEND_ARG_OBJ_INFO( 0, timeZone, IntlTimeZone, 0 )
     475             :         ZEND_ARG_INFO( 0, isDaylight )
     476             :         ZEND_ARG_INFO( 0, style )
     477             :         ZEND_ARG_INFO( 0, locale )
     478             : ZEND_END_ARG_INFO()
     479             : 
     480             : ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_only_tz, 0, 0, 1 )
     481             :         ZEND_ARG_OBJ_INFO( 0, timeZone, IntlTimeZone, 0 )
     482             : ZEND_END_ARG_INFO()
     483             : 
     484             : ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_void, 0, 0, 0 )
     485             : ZEND_END_ARG_INFO()
     486             : 
     487             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_create_instance, 0, 0, 0 )
     488             :         ZEND_ARG_INFO( 0, timeZone )
     489             :         ZEND_ARG_INFO( 0, locale )
     490             : ZEND_END_ARG_INFO()
     491             : 
     492             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_only_cal, 0, 0, 1 )
     493             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     494             : ZEND_END_ARG_INFO()
     495             : 
     496             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_void, 0, 0, 0 )
     497             : ZEND_END_ARG_INFO()
     498             : 
     499             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_field, 0, 0, 2 )
     500             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     501             :         ZEND_ARG_INFO( 0, field )
     502             : ZEND_END_ARG_INFO()
     503             : 
     504             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_dow, 0, 0, 2 )
     505             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     506             :         ZEND_ARG_INFO( 0, dayOfWeek )
     507             : ZEND_END_ARG_INFO()
     508             : 
     509             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_other_cal, 0, 0, 2 )
     510             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     511             :         ZEND_ARG_OBJ_INFO( 0, otherCalendar, IntlCalendar, 0 )
     512             : ZEND_END_ARG_INFO()
     513             : 
     514             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_date, 0, 0, 2 )
     515             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     516             :         ZEND_ARG_INFO( 0, date )
     517             : ZEND_END_ARG_INFO()
     518             : 
     519             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_date_optional, 0, 0, 1 )
     520             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     521             :         ZEND_ARG_INFO( 0, date )
     522             : ZEND_END_ARG_INFO()
     523             : 
     524             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_get_keyword_values_for_locale, 0, 0, 3)
     525             :         ZEND_ARG_INFO( 0, key )
     526             :         ZEND_ARG_INFO( 0, locale )
     527             :         ZEND_ARG_INFO( 0, commonlyUsed )
     528             : ZEND_END_ARG_INFO()
     529             : 
     530             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_add, 0, 0, 3 )
     531             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     532             :         ZEND_ARG_INFO( 0, field )
     533             :         ZEND_ARG_INFO( 0, amount )
     534             : ZEND_END_ARG_INFO()
     535             : 
     536             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_set_time_zone, 0, 0, 2 )
     537             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     538             :         ZEND_ARG_INFO( 0, timeZone )
     539             : ZEND_END_ARG_INFO()
     540             : 
     541             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_set, 0, 0, 3 )
     542             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     543             :         ZEND_ARG_INFO( 0, fieldOrYear )
     544             :         ZEND_ARG_INFO( 0, valueOrMonth )
     545             :         ZEND_ARG_INFO( 0, dayOfMonth )
     546             :         ZEND_ARG_INFO( 0, hour )
     547             :         ZEND_ARG_INFO( 0, minute )
     548             :         ZEND_ARG_INFO( 0, second )
     549             : ZEND_END_ARG_INFO()
     550             : 
     551             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_roll, 0, 0, 2 )
     552             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     553             :         ZEND_ARG_INFO( 0, field )
     554             :         ZEND_ARG_INFO( 0, amountOrUpOrDown )
     555             : ZEND_END_ARG_INFO()
     556             : 
     557             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_clear, 0, 0, 1 )
     558             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     559             :         ZEND_ARG_INFO( 0, field )
     560             : ZEND_END_ARG_INFO()
     561             : 
     562             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_field_difference, 0, 0, 3 )
     563             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     564             :         ZEND_ARG_INFO( 0, when )
     565             :         ZEND_ARG_INFO( 0, field )
     566             : ZEND_END_ARG_INFO()
     567             : 
     568             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_get_locale, 0, 0, 2 )
     569             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     570             :         ZEND_ARG_INFO( 0, localeType )
     571             : ZEND_END_ARG_INFO()
     572             : 
     573             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_set_lenient, 0, 0, 2 )
     574             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     575             :         ZEND_ARG_INFO( 0, isLenient )
     576             : ZEND_END_ARG_INFO()
     577             : 
     578             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_set_minimal_days_in_first_week, 0, 0, 2 )
     579             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     580             :         ZEND_ARG_INFO( 0, numberOfDays )
     581             : ZEND_END_ARG_INFO()
     582             : 
     583             : ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_from_date_time, 0, 0, 1)
     584             :         ZEND_ARG_INFO(0, dateTime)
     585             : ZEND_END_ARG_INFO()
     586             : 
     587             : ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_wall_time_option, 0, 0, 2 )
     588             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
     589             :         ZEND_ARG_INFO( 0, wallTimeOption )
     590             : ZEND_END_ARG_INFO()
     591             : 
     592             : /* Gregorian Calendar */
     593             : ZEND_BEGIN_ARG_INFO_EX( ainfo_gregcal_create_instance, 0, 0, 0 )
     594             :         ZEND_ARG_INFO(0, timeZoneOrYear)
     595             :         ZEND_ARG_INFO(0, localeOrMonth)
     596             :         ZEND_ARG_INFO(0, dayOfMonth)
     597             :         ZEND_ARG_INFO(0, hour)
     598             :         ZEND_ARG_INFO(0, minute)
     599             :         ZEND_ARG_INFO(0, second)
     600             : ZEND_END_ARG_INFO()
     601             : 
     602             : ZEND_BEGIN_ARG_INFO_EX( ainfo_gregcal_is_leap_year, 0, 0, 2 )
     603             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlGregorianCalendar, 0 )
     604             :         ZEND_ARG_INFO( 0, year )
     605             : ZEND_END_ARG_INFO()
     606             : 
     607             : ZEND_BEGIN_ARG_INFO_EX( ainfo_gregcal_only_gregcal, 0, 0, 1 )
     608             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlGregorianCalendar, 0 )
     609             : ZEND_END_ARG_INFO()
     610             : 
     611             : ZEND_BEGIN_ARG_INFO_EX( ainfo_gregcal_set_gregorian_change, 0, 0, 2 )
     612             :         ZEND_ARG_OBJ_INFO( 0, calendar, IntlGregorianCalendar, 0 )
     613             :         ZEND_ARG_INFO( 0, date )
     614             : ZEND_END_ARG_INFO()
     615             : 
     616             : /* }}} */
     617             : 
     618             : /* {{{ intl_functions
     619             :  *
     620             :  * Every user visible function must have an entry in intl_functions[].
     621             :  */
     622             : zend_function_entry intl_functions[] = {
     623             : 
     624             :         /* collator functions */
     625             :         PHP_FE( collator_create, collator_static_1_arg )
     626             :         PHP_FE( collator_compare, collator_2_args )
     627             :         PHP_FE( collator_get_attribute, collator_1_arg )
     628             :         PHP_FE( collator_set_attribute, collator_2_args )
     629             :         PHP_FE( collator_get_strength, collator_0_args )
     630             :         PHP_FE( collator_set_strength, collator_1_arg )
     631             :         PHP_FE( collator_sort, collator_sort_args )
     632             :         PHP_FE( collator_sort_with_sort_keys, collator_sort_args )
     633             :         PHP_FE( collator_asort, collator_sort_args )
     634             :         PHP_FE( collator_get_locale, collator_1_arg )
     635             :         PHP_FE( collator_get_error_code, collator_0_args )
     636             :         PHP_FE( collator_get_error_message, collator_0_args )
     637             :         PHP_FE( collator_get_sort_key, collator_2_args )
     638             : 
     639             :         /* formatter functions */
     640             :         PHP_FE( numfmt_create, arginfo_numfmt_create )
     641             :         PHP_FE( numfmt_format, arginfo_numfmt_format )
     642             :         PHP_FE( numfmt_parse, numfmt_parse_arginfo )
     643             :         PHP_FE( numfmt_format_currency, arginfo_numfmt_format_currency )
     644             :         PHP_FE( numfmt_parse_currency, numfmt_parse_currency_arginfo )
     645             :         PHP_FE( numfmt_set_attribute, arginfo_numfmt_set_attribute )
     646             :         PHP_FE( numfmt_get_attribute, arginfo_numfmt_get_attribute )
     647             :         PHP_FE( numfmt_set_text_attribute, arginfo_numfmt_set_attribute )
     648             :         PHP_FE( numfmt_get_text_attribute, arginfo_numfmt_get_attribute )
     649             :         PHP_FE( numfmt_set_symbol, arginfo_numfmt_set_symbol )
     650             :         PHP_FE( numfmt_get_symbol, arginfo_numfmt_get_attribute )
     651             :         PHP_FE( numfmt_set_pattern, arginfo_numfmt_set_pattern )
     652             :         PHP_FE( numfmt_get_pattern, arginfo_numfmt_get_error_code )
     653             :         PHP_FE( numfmt_get_locale, arginfo_numfmt_get_locale )
     654             :         PHP_FE( numfmt_get_error_code, arginfo_numfmt_get_error_code )
     655             :         PHP_FE( numfmt_get_error_message, arginfo_numfmt_get_error_code )
     656             : 
     657             :         /* normalizer functions */
     658             :         PHP_FE( normalizer_normalize, normalizer_args )
     659             :         PHP_FE( normalizer_is_normalized, normalizer_args )
     660             : 
     661             :         /* Locale functions */
     662             :         PHP_NAMED_FE( locale_get_default, zif_locale_get_default, locale_0_args )
     663             :         PHP_NAMED_FE( locale_set_default, zif_locale_set_default, locale_1_arg )
     664             :         PHP_FE( locale_get_primary_language, locale_1_arg )
     665             :         PHP_FE( locale_get_script, locale_1_arg )
     666             :         PHP_FE( locale_get_region, locale_1_arg )
     667             :         PHP_FE( locale_get_keywords, locale_1_arg )
     668             :         PHP_FE( locale_get_display_script, locale_2_args )
     669             :         PHP_FE( locale_get_display_region, locale_2_args )
     670             :         PHP_FE( locale_get_display_name, locale_2_args )
     671             :         PHP_FE( locale_get_display_language, locale_2_args)
     672             :         PHP_FE( locale_get_display_variant, locale_2_args )
     673             :         PHP_FE( locale_compose, locale_1_arg )
     674             :         PHP_FE( locale_parse, locale_1_arg )
     675             :         PHP_FE( locale_get_all_variants, locale_1_arg )
     676             :         PHP_FE( locale_filter_matches, locale_3_args )
     677             :         PHP_FE( locale_canonicalize, locale_1_arg )
     678             :         PHP_FE( locale_lookup, locale_4_args )
     679             :         PHP_FE( locale_accept_from_http, locale_1_arg )
     680             : 
     681             :         /* MessageFormatter functions */
     682             :         PHP_FE( msgfmt_create, arginfo_msgfmt_create )
     683             :         PHP_FE( msgfmt_format, arginfo_msgfmt_format )
     684             :         PHP_FE( msgfmt_format_message, arginfo_msgfmt_format_message )
     685             :         PHP_FE( msgfmt_parse, arginfo_msgfmt_parse )
     686             :         PHP_FE( msgfmt_parse_message, arginfo_numfmt_parse_message )
     687             :         PHP_FE( msgfmt_set_pattern, arginfo_msgfmt_set_pattern )
     688             :         PHP_FE( msgfmt_get_pattern, arginfo_msgfmt_get_locale )
     689             :         PHP_FE( msgfmt_get_locale, arginfo_msgfmt_get_locale )
     690             :         PHP_FE( msgfmt_get_error_code, arginfo_msgfmt_get_error_code )
     691             :         PHP_FE( msgfmt_get_error_message, arginfo_msgfmt_get_error_message )
     692             : 
     693             :         /* IntlDateFormatter functions */
     694             :         PHP_FE( datefmt_create, arginfo_datefmt_create )
     695             :         PHP_FE( datefmt_get_datetype, arginfo_msgfmt_get_locale )
     696             :         PHP_FE( datefmt_get_timetype, arginfo_msgfmt_get_locale )
     697             :         PHP_FE( datefmt_get_calendar, arginfo_msgfmt_get_locale )
     698             :         PHP_FE( datefmt_get_calendar_object, arginfo_msgfmt_get_locale )
     699             :         PHP_FE( datefmt_set_calendar, arginfo_datefmt_set_calendar )
     700             :         PHP_FE( datefmt_get_locale, arginfo_msgfmt_get_locale )
     701             :         PHP_FE( datefmt_get_timezone_id, arginfo_msgfmt_get_locale )
     702             :         PHP_FE( datefmt_get_timezone, arginfo_msgfmt_get_locale )
     703             :         PHP_FE( datefmt_set_timezone, arginfo_datefmt_set_timezone )
     704             :         PHP_FE( datefmt_get_pattern, arginfo_msgfmt_get_locale )
     705             :         PHP_FE( datefmt_set_pattern, arginfo_datefmt_set_pattern )
     706             :         PHP_FE( datefmt_is_lenient, arginfo_msgfmt_get_locale )
     707             :         PHP_FE( datefmt_set_lenient, arginfo_msgfmt_get_locale )
     708             :         PHP_FE( datefmt_format, arginfo_datefmt_format )
     709             :         PHP_FE( datefmt_format_object, arginfo_datefmt_format_object )
     710             :         PHP_FE( datefmt_parse, datefmt_parse_args )
     711             :         PHP_FE( datefmt_localtime , datefmt_parse_args )
     712             :         PHP_FE( datefmt_get_error_code, arginfo_msgfmt_get_error_code )
     713             :         PHP_FE( datefmt_get_error_message, arginfo_msgfmt_get_error_message )
     714             : 
     715             :         /* grapheme functions */
     716             :         PHP_FE( grapheme_strlen, grapheme_1_arg )
     717             :         PHP_FE( grapheme_strpos, grapheme_search_args )
     718             :         PHP_FE( grapheme_stripos, grapheme_search_args )
     719             :         PHP_FE( grapheme_strrpos, grapheme_search_args )
     720             :         PHP_FE( grapheme_strripos, grapheme_search_args )
     721             :         PHP_FE( grapheme_substr, grapheme_substr_args )
     722             :         PHP_FE( grapheme_strstr, grapheme_strstr_args )
     723             :         PHP_FE( grapheme_stristr, grapheme_strstr_args )
     724             :         PHP_FE( grapheme_extract, grapheme_extract_args )
     725             : 
     726             :         /* IDN functions */
     727             :         PHP_FE( idn_to_ascii, arginfo_idn_to_ascii)
     728             :         PHP_FE( idn_to_utf8, arginfo_idn_to_ascii)
     729             : 
     730             :         /* ResourceBundle functions */
     731             :         PHP_FE( resourcebundle_create, arginfo_resourcebundle_create_proc )
     732             :         PHP_FE( resourcebundle_get, arginfo_resourcebundle_get_proc )
     733             :         PHP_FE( resourcebundle_count, arginfo_resourcebundle_count_proc )
     734             :         PHP_FE( resourcebundle_locales, arginfo_resourcebundle_locales_proc )
     735             :         PHP_FE( resourcebundle_get_error_code, arginfo_resourcebundle_get_error_code_proc )
     736             :         PHP_FE( resourcebundle_get_error_message, arginfo_resourcebundle_get_error_message_proc )
     737             : 
     738             :         /* Transliterator functions */
     739             :         PHP_FE( transliterator_create, arginfo_transliterator_create )
     740             :         PHP_FE( transliterator_create_from_rules, arginfo_transliterator_create_from_rules )
     741             :         PHP_FE( transliterator_list_ids, arginfo_transliterator_void )
     742             :         PHP_FE( transliterator_create_inverse, arginfo_transliterator_create_inverse)
     743             :         PHP_FE( transliterator_transliterate, arginfo_transliterator_transliterate )
     744             :         PHP_FE( transliterator_get_error_code, arginfo_transliterator_error )
     745             :         PHP_FE( transliterator_get_error_message, arginfo_transliterator_error )
     746             : 
     747             :         /* TimeZone functions */
     748             :         PHP_FE( intltz_create_time_zone, arginfo_tz_idarg_static )
     749             :         PHP_FE( intltz_from_date_time_zone, arginfo_tz_from_date_time_zone )
     750             :         PHP_FE( intltz_create_default, arginfo_tz_void )
     751             :         PHP_FE( intltz_get_id, arginfo_tz_only_tz )
     752             :         PHP_FE( intltz_get_gmt, arginfo_tz_void )
     753             : #if U_ICU_VERSION_MAJOR_NUM >= 49
     754             :         PHP_FE( intltz_get_unknown, arginfo_tz_void )
     755             : #endif
     756             :         PHP_FE( intltz_create_enumeration, arginfo_tz_create_enumeration )
     757             :         PHP_FE( intltz_count_equivalent_ids, arginfo_tz_idarg_static )
     758             : #if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
     759             :         PHP_FE( intltz_create_time_zone_id_enumeration, arginfo_tz_create_time_zone_id_enumeration )
     760             : #endif
     761             :         PHP_FE( intltz_get_canonical_id, arginfo_tz_get_canonical_id )
     762             : #if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
     763             :         PHP_FE( intltz_get_region, arginfo_tz_idarg_static )
     764             : #endif
     765             :         PHP_FE( intltz_get_tz_data_version, arginfo_tz_void )
     766             :         PHP_FE( intltz_get_equivalent_id, arginfo_tz_get_equivalent_id )
     767             :         PHP_FE( intltz_use_daylight_time, arginfo_tz_only_tz )
     768             :         PHP_FE( intltz_get_offset, arginfo_tz_get_offset )
     769             :         PHP_FE( intltz_get_raw_offset, arginfo_tz_only_tz )
     770             :         PHP_FE( intltz_has_same_rules, arginfo_tz_has_same_rules )
     771             :         PHP_FE( intltz_get_display_name, arginfo_tz_get_display_name )
     772             :         PHP_FE( intltz_get_dst_savings, arginfo_tz_only_tz )
     773             :         PHP_FE( intltz_to_date_time_zone, arginfo_tz_only_tz )
     774             :         PHP_FE( intltz_get_error_code, arginfo_tz_only_tz )
     775             :         PHP_FE( intltz_get_error_message, arginfo_tz_only_tz )
     776             : 
     777             :         PHP_FE( intlcal_create_instance, ainfo_cal_create_instance )
     778             : #if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 42
     779             :         PHP_FE( intlcal_get_keyword_values_for_locale, ainfo_cal_get_keyword_values_for_locale )
     780             : #endif
     781             :         PHP_FE( intlcal_get_now, ainfo_cal_void )
     782             :         PHP_FE( intlcal_get_available_locales, ainfo_cal_void )
     783             :         PHP_FE( intlcal_get, ainfo_cal_field )
     784             :         PHP_FE( intlcal_get_time, ainfo_cal_only_cal )
     785             :         PHP_FE( intlcal_set_time, ainfo_cal_date )
     786             :         PHP_FE( intlcal_add, ainfo_cal_add )
     787             :         PHP_FE( intlcal_set_time_zone, ainfo_cal_set_time_zone )
     788             :         PHP_FE( intlcal_after, ainfo_cal_other_cal )
     789             :         PHP_FE( intlcal_before, ainfo_cal_other_cal )
     790             :         PHP_FE( intlcal_set, ainfo_cal_set )
     791             :         PHP_FE( intlcal_roll, ainfo_cal_roll )
     792             :         PHP_FE( intlcal_clear, ainfo_cal_clear )
     793             :         PHP_FE( intlcal_field_difference, ainfo_cal_field_difference )
     794             :         PHP_FE( intlcal_get_actual_maximum, ainfo_cal_field )
     795             :         PHP_FE( intlcal_get_actual_minimum, ainfo_cal_field )
     796             : #if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
     797             :         PHP_FE( intlcal_get_day_of_week_type, ainfo_cal_dow )
     798             : #endif
     799             :         PHP_FE( intlcal_get_first_day_of_week, ainfo_cal_only_cal )
     800             :         PHP_FE( intlcal_get_greatest_minimum, ainfo_cal_field )
     801             :         PHP_FE( intlcal_get_least_maximum, ainfo_cal_field )
     802             :         PHP_FE( intlcal_get_locale, ainfo_cal_get_locale )
     803             :         PHP_FE( intlcal_get_maximum, ainfo_cal_field )
     804             :         PHP_FE( intlcal_get_minimal_days_in_first_week, ainfo_cal_only_cal )
     805             :         PHP_FE( intlcal_get_minimum, ainfo_cal_field )
     806             :         PHP_FE( intlcal_get_time_zone, ainfo_cal_only_cal )
     807             :         PHP_FE( intlcal_get_type, ainfo_cal_only_cal )
     808             : #if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
     809             :         PHP_FE( intlcal_get_weekend_transition, ainfo_cal_dow )
     810             : #endif
     811             :         PHP_FE( intlcal_in_daylight_time, ainfo_cal_only_cal )
     812             :         PHP_FE( intlcal_is_equivalent_to, ainfo_cal_other_cal )
     813             :         PHP_FE( intlcal_is_lenient, ainfo_cal_only_cal )
     814             :         PHP_FE( intlcal_is_set, ainfo_cal_field )
     815             : #if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
     816             :         PHP_FE( intlcal_is_weekend, ainfo_cal_date_optional )
     817             : #endif
     818             :         PHP_FE( intlcal_set_first_day_of_week, ainfo_cal_dow )
     819             :         PHP_FE( intlcal_set_lenient, ainfo_cal_set_lenient )
     820             :         PHP_FE( intlcal_set_minimal_days_in_first_week, ainfo_cal_set_minimal_days_in_first_week )
     821             :         PHP_FE( intlcal_equals, ainfo_cal_other_cal )
     822             :         PHP_FE( intlcal_from_date_time, ainfo_cal_from_date_time )
     823             :         PHP_FE( intlcal_to_date_time, ainfo_cal_only_cal )
     824             : #if U_ICU_VERSION_MAJOR_NUM >= 49
     825             :         PHP_FE( intlcal_get_repeated_wall_time_option, ainfo_cal_only_cal )
     826             :         PHP_FE( intlcal_get_skipped_wall_time_option, ainfo_cal_only_cal )
     827             :         PHP_FE( intlcal_set_repeated_wall_time_option, ainfo_cal_wall_time_option )
     828             :         PHP_FE( intlcal_set_skipped_wall_time_option, ainfo_cal_wall_time_option )
     829             : #endif
     830             :         PHP_FE( intlcal_get_error_code, ainfo_cal_only_cal )
     831             :         PHP_FE( intlcal_get_error_message, ainfo_cal_only_cal )
     832             : 
     833             :         PHP_FE( intlgregcal_create_instance, ainfo_gregcal_create_instance )
     834             :         PHP_FE( intlgregcal_set_gregorian_change, ainfo_gregcal_set_gregorian_change )
     835             :         PHP_FE( intlgregcal_get_gregorian_change, ainfo_gregcal_only_gregcal )
     836             :         PHP_FE( intlgregcal_is_leap_year, ainfo_gregcal_is_leap_year )
     837             : 
     838             :         /* common functions */
     839             :         PHP_FE( intl_get_error_code, intl_0_args )
     840             :         PHP_FE( intl_get_error_message, intl_0_args )
     841             :         PHP_FE( intl_is_failure, intl_1_arg )
     842             :         PHP_FE( intl_error_name, intl_1_arg )
     843             : 
     844             :         PHP_FE_END
     845             : };
     846             : /* }}} */
     847             : 
     848             : /* {{{ INI Settings */
     849             : PHP_INI_BEGIN()
     850             :     STD_PHP_INI_ENTRY(LOCALE_INI_NAME, NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_locale, zend_intl_globals, intl_globals)
     851             :     STD_PHP_INI_ENTRY("intl.error_level", "0", PHP_INI_ALL, OnUpdateLong, error_level, zend_intl_globals, intl_globals)
     852             :         STD_PHP_INI_ENTRY("intl.use_exceptions", "0", PHP_INI_ALL, OnUpdateBool, use_exceptions, zend_intl_globals, intl_globals)
     853             : PHP_INI_END()
     854             : /* }}} */
     855             : 
     856             : static PHP_GINIT_FUNCTION(intl);
     857             : 
     858             : /* {{{ intl_module_entry */
     859             : zend_module_entry intl_module_entry = {
     860             :         STANDARD_MODULE_HEADER,
     861             :         "intl",
     862             :         intl_functions,
     863             :         PHP_MINIT( intl ),
     864             :         PHP_MSHUTDOWN( intl ),
     865             :         PHP_RINIT( intl ),
     866             :         PHP_RSHUTDOWN( intl ),
     867             :         PHP_MINFO( intl ),
     868             :         INTL_MODULE_VERSION,
     869             :         PHP_MODULE_GLOBALS(intl),   /* globals descriptor */
     870             :         PHP_GINIT(intl),            /* globals ctor */
     871             :         NULL,                       /* globals dtor */
     872             :         NULL,                       /* post deactivate */
     873             :         STANDARD_MODULE_PROPERTIES_EX
     874             : };
     875             : /* }}} */
     876             : 
     877             : #ifdef COMPILE_DL_INTL
     878             : #ifdef ZTS
     879             : ZEND_TSRMLS_CACHE_DEFINE()
     880             : #endif
     881             : ZEND_GET_MODULE( intl )
     882             : #endif
     883             : 
     884             : /* {{{ intl_init_globals */
     885       23409 : static PHP_GINIT_FUNCTION(intl)
     886             : {
     887             : #if defined(COMPILE_DL_INTL) && defined(ZTS)
     888             :         ZEND_TSRMLS_CACHE_UPDATE();
     889             : #endif
     890       23409 :         memset( intl_globals, 0, sizeof(zend_intl_globals) );
     891       23409 : }
     892             : /* }}} */
     893             : 
     894             : /* {{{ PHP_MINIT_FUNCTION
     895             :  */
     896       23409 : PHP_MINIT_FUNCTION( intl )
     897             : {
     898             :         /* For the default locale php.ini setting */
     899       23409 :         REGISTER_INI_ENTRIES();
     900             : 
     901       23409 :         REGISTER_LONG_CONSTANT("INTL_MAX_LOCALE_LEN", INTL_MAX_LOCALE_LEN, CONST_PERSISTENT | CONST_CS);
     902       23409 :         REGISTER_STRING_CONSTANT("INTL_ICU_VERSION", U_ICU_VERSION, CONST_PERSISTENT | CONST_CS);
     903             : #ifdef U_ICU_DATA_VERSION
     904             :         REGISTER_STRING_CONSTANT("INTL_ICU_DATA_VERSION", U_ICU_DATA_VERSION, CONST_PERSISTENT | CONST_CS);
     905             : #endif
     906             : 
     907             :         /* Register 'Collator' PHP class */
     908       23409 :         collator_register_Collator_class(  );
     909             : 
     910             :         /* Expose Collator constants to PHP scripts */
     911       23409 :         collator_register_constants( INIT_FUNC_ARGS_PASSTHRU );
     912             : 
     913             :         /* Register 'NumberFormatter' PHP class */
     914       23409 :         formatter_register_class(  );
     915             : 
     916             :         /* Expose NumberFormatter constants to PHP scripts */
     917       23409 :         formatter_register_constants( INIT_FUNC_ARGS_PASSTHRU );
     918             : 
     919             :         /* Register 'Normalizer' PHP class */
     920       23409 :         normalizer_register_Normalizer_class(  );
     921             : 
     922             :         /* Expose Normalizer constants to PHP scripts */
     923       23409 :         normalizer_register_constants( INIT_FUNC_ARGS_PASSTHRU );
     924             : 
     925             :         /* Register 'Locale' PHP class */
     926       23409 :         locale_register_Locale_class(  );
     927             : 
     928             :         /* Expose Locale constants to PHP scripts */
     929       23409 :         locale_register_constants( INIT_FUNC_ARGS_PASSTHRU );
     930             : 
     931       23409 :         msgformat_register_class();
     932             : 
     933       23409 :         grapheme_register_constants( INIT_FUNC_ARGS_PASSTHRU );
     934             : 
     935             :         /* Register 'DateFormat' PHP class */
     936       23409 :         dateformat_register_IntlDateFormatter_class(  );
     937             : 
     938             :         /* Expose DateFormat constants to PHP scripts */
     939       23409 :         dateformat_register_constants( INIT_FUNC_ARGS_PASSTHRU );
     940             : 
     941             :         /* Register 'ResourceBundle' PHP class */
     942       23409 :         resourcebundle_register_class( );
     943             : 
     944             :         /* Register 'Transliterator' PHP class */
     945       23409 :         transliterator_register_Transliterator_class(  );
     946             : 
     947             :         /* Register Transliterator constants */
     948       23409 :         transliterator_register_constants( INIT_FUNC_ARGS_PASSTHRU );
     949             : 
     950             :         /* Register 'IntlTimeZone' PHP class */
     951       23409 :         timezone_register_IntlTimeZone_class(  );
     952             : 
     953             :         /* Register 'IntlCalendar' PHP class */
     954       23409 :         calendar_register_IntlCalendar_class(  );
     955             : 
     956             :         /* Expose ICU error codes to PHP scripts. */
     957       23409 :         intl_expose_icu_error_codes( INIT_FUNC_ARGS_PASSTHRU );
     958             : 
     959             :         /* Expose IDN constants to PHP scripts. */
     960       23409 :         idn_register_constants(INIT_FUNC_ARGS_PASSTHRU);
     961             : 
     962             : #if U_ICU_VERSION_MAJOR_NUM * 1000 + U_ICU_VERSION_MINOR_NUM >= 4002
     963             :         /* Register 'Spoofchecker' PHP class */
     964       23409 :         spoofchecker_register_Spoofchecker_class(  );
     965             : 
     966             :         /* Expose Spoofchecker constants to PHP scripts */
     967       23409 :         spoofchecker_register_constants( INIT_FUNC_ARGS_PASSTHRU );
     968             : #endif
     969             : 
     970             :         /* Register 'IntlException' PHP class */
     971       23409 :         intl_register_IntlException_class(  );
     972             : 
     973             :         /* Register 'IntlIterator' PHP class */
     974       23409 :         intl_register_IntlIterator_class(  );
     975             : 
     976             :         /* Register 'BreakIterator' class */
     977       23409 :         breakiterator_register_BreakIterator_class(  );
     978             : 
     979             :         /* Register 'IntlPartsIterator' class */
     980       23409 :         breakiterator_register_IntlPartsIterator_class(  );
     981             : 
     982             :         /* Global error handling. */
     983       23409 :         intl_error_init( NULL );
     984             : 
     985             :         /* 'Converter' class for codepage conversions */
     986       23409 :         php_converter_minit(INIT_FUNC_ARGS_PASSTHRU);
     987             : 
     988             :         /* IntlChar class */
     989       23409 :         php_uchar_minit(INIT_FUNC_ARGS_PASSTHRU);
     990             : 
     991       23409 :         return SUCCESS;
     992             : }
     993             : /* }}} */
     994             : 
     995             : #define EXPLICIT_CLEANUP_ENV_VAR "INTL_EXPLICIT_CLEANUP"
     996             : 
     997             : /* {{{ PHP_MSHUTDOWN_FUNCTION
     998             :  */
     999       23445 : PHP_MSHUTDOWN_FUNCTION( intl )
    1000             : {
    1001             :         const char *cleanup;
    1002             :     /* For the default locale php.ini setting */
    1003       23445 :     UNREGISTER_INI_ENTRIES();
    1004             : 
    1005       23445 :         cleanup = getenv(EXPLICIT_CLEANUP_ENV_VAR);
    1006       23445 :     if (cleanup != NULL && !(cleanup[0] == '0' && cleanup[1] == '\0')) {
    1007           0 :                 u_cleanup();
    1008             :     }
    1009             : 
    1010       23445 :     return SUCCESS;
    1011             : }
    1012             : /* }}} */
    1013             : 
    1014             : /* {{{ PHP_RINIT_FUNCTION
    1015             :  */
    1016       23363 : PHP_RINIT_FUNCTION( intl )
    1017             : {
    1018       23363 :         return SUCCESS;
    1019             : }
    1020             : /* }}} */
    1021             : 
    1022             : /* {{{ PHP_RSHUTDOWN_FUNCTION
    1023             :  */
    1024       23401 : PHP_RSHUTDOWN_FUNCTION( intl )
    1025             : {
    1026       23401 :         if(!Z_ISUNDEF(INTL_G(current_collator))) {
    1027           0 :                 ZVAL_UNDEF(&INTL_G(current_collator));
    1028             :         }
    1029       23401 :         if (INTL_G(grapheme_iterator)) {
    1030           5 :                 grapheme_close_global_iterator(  );
    1031           5 :                 INTL_G(grapheme_iterator) = NULL;
    1032             :         }
    1033             : 
    1034       23401 :         intl_error_reset( NULL);
    1035       23401 :         return SUCCESS;
    1036             : }
    1037             : /* }}} */
    1038             : 
    1039             : /* {{{ PHP_MINFO_FUNCTION
    1040             :  */
    1041         150 : PHP_MINFO_FUNCTION( intl )
    1042             : {
    1043         150 :         php_info_print_table_start();
    1044         150 :         php_info_print_table_header( 2, "Internationalization support", "enabled" );
    1045         150 :         php_info_print_table_row( 2, "version", INTL_MODULE_VERSION );
    1046         150 :         php_info_print_table_row( 2, "ICU version", U_ICU_VERSION );
    1047             : #ifdef U_ICU_DATA_VERSION
    1048             :         php_info_print_table_row( 2, "ICU Data version", U_ICU_DATA_VERSION );
    1049             : #endif
    1050         150 :         php_info_print_table_end();
    1051             : 
    1052             :     /* For the default locale php.ini setting */
    1053         150 :     DISPLAY_INI_ENTRIES() ;
    1054         150 : }
    1055             : /* }}} */
    1056             : 
    1057             : /*
    1058             :  * Local variables:
    1059             :  * tab-width: 4
    1060             :  * c-basic-offset: 4
    1061             :  * End:
    1062             :  * vim600: noet sw=4 ts=4 fdm=marker
    1063             :  * vim<600: noet sw=4 ts=4
    1064             :  */

Generated by: LCOV version 1.10

Generated at Wed, 20 Jul 2016 02:56:18 +0000 (6 days ago)

Copyright © 2005-2016 The PHP Group
All rights reserved.