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 - Zend - zend_constants.c (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 215 251 85.7 %
Date: 2014-07-27 Functions: 11 18 61.1 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | Zend Engine                                                          |
       4             :    +----------------------------------------------------------------------+
       5             :    | Copyright (c) 1998-2013 Zend Technologies Ltd. (http://www.zend.com) |
       6             :    +----------------------------------------------------------------------+
       7             :    | This source file is subject to version 2.00 of the Zend license,     |
       8             :    | that is bundled with this package in the file LICENSE, and is        | 
       9             :    | available through the world-wide-web at the following url:           |
      10             :    | http://www.zend.com/license/2_00.txt.                                |
      11             :    | If you did not receive a copy of the Zend license and are unable to  |
      12             :    | obtain it through the world-wide-web, please send a note to          |
      13             :    | license@zend.com so we can mail you a copy immediately.              |
      14             :    +----------------------------------------------------------------------+
      15             :    | Authors: Andi Gutmans <andi@zend.com>                                |
      16             :    |          Zeev Suraski <zeev@zend.com>                                |
      17             :    +----------------------------------------------------------------------+
      18             : */
      19             : 
      20             : /* $Id$ */
      21             : 
      22             : #include "zend.h"
      23             : #include "zend_constants.h"
      24             : #include "zend_execute.h"
      25             : #include "zend_variables.h"
      26             : #include "zend_operators.h"
      27             : #include "zend_globals.h"
      28             : 
      29             : 
      30    44179760 : void free_zend_constant(zend_constant *c)
      31             : {
      32    44179760 :         if (!(c->flags & CONST_PERSISTENT)) {
      33     2637616 :                 zval_dtor(&c->value);
      34             :         }
      35    44179760 :         free(c->name);
      36    44179760 : }
      37             : 
      38             : 
      39           0 : void copy_zend_constant(zend_constant *c)
      40             : {
      41           0 :         c->name = zend_strndup(c->name, c->name_len - 1);
      42           0 :         if (!(c->flags & CONST_PERSISTENT)) {
      43           0 :                 zval_copy_ctor(&c->value);
      44             :         }
      45           0 : }
      46             : 
      47             : 
      48           0 : void zend_copy_constants(HashTable *target, HashTable *source)
      49             : {
      50             :         zend_constant tmp_constant;
      51             : 
      52           0 :         zend_hash_copy(target, source, (copy_ctor_func_t) copy_zend_constant, &tmp_constant, sizeof(zend_constant));
      53           0 : }
      54             : 
      55             : 
      56       79790 : static int clean_non_persistent_constant(const zend_constant *c TSRMLS_DC)
      57             : {
      58       79790 :         return (c->flags & CONST_PERSISTENT) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE;
      59             : }
      60             : 
      61             : 
      62           0 : static int clean_non_persistent_constant_full(const zend_constant *c TSRMLS_DC)
      63             : {
      64           0 :         return (c->flags & CONST_PERSISTENT) ? 0 : 1;
      65             : }
      66             : 
      67             : 
      68           0 : static int clean_module_constant(const zend_constant *c, int *module_number TSRMLS_DC)
      69             : {
      70           0 :         if (c->module_number == *module_number) {
      71           0 :                 return 1;
      72             :         } else {
      73           0 :                 return 0;
      74             :         }
      75             : }
      76             : 
      77             : 
      78           0 : void clean_module_constants(int module_number TSRMLS_DC)
      79             : {
      80           0 :         zend_hash_apply_with_argument(EG(zend_constants), (apply_func_arg_t) clean_module_constant, (void *) &module_number TSRMLS_CC);
      81           0 : }
      82             : 
      83             : 
      84           0 : int zend_startup_constants(TSRMLS_D)
      85             : {
      86           0 :         EG(zend_constants) = (HashTable *) malloc(sizeof(HashTable));
      87             : 
      88           0 :         if (zend_hash_init(EG(zend_constants), 20, NULL, ZEND_CONSTANT_DTOR, 1)==FAILURE) {
      89           0 :                 return FAILURE;
      90             :         }
      91           0 :         return SUCCESS;
      92             : }
      93             : 
      94             : 
      95             : 
      96       19341 : void zend_register_standard_constants(TSRMLS_D)
      97             : {
      98       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_ERROR", E_ERROR, CONST_PERSISTENT | CONST_CS);
      99       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_RECOVERABLE_ERROR", E_RECOVERABLE_ERROR, CONST_PERSISTENT | CONST_CS);
     100       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_WARNING", E_WARNING, CONST_PERSISTENT | CONST_CS);
     101       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_PARSE", E_PARSE, CONST_PERSISTENT | CONST_CS);
     102       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_NOTICE", E_NOTICE, CONST_PERSISTENT | CONST_CS);
     103       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_STRICT", E_STRICT, CONST_PERSISTENT | CONST_CS);
     104       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_DEPRECATED", E_DEPRECATED, CONST_PERSISTENT | CONST_CS);
     105       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_CORE_ERROR", E_CORE_ERROR, CONST_PERSISTENT | CONST_CS);
     106       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_CORE_WARNING", E_CORE_WARNING, CONST_PERSISTENT | CONST_CS);
     107       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_ERROR", E_COMPILE_ERROR, CONST_PERSISTENT | CONST_CS);
     108       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_WARNING", E_COMPILE_WARNING, CONST_PERSISTENT | CONST_CS);
     109       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_USER_ERROR", E_USER_ERROR, CONST_PERSISTENT | CONST_CS);
     110       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_USER_WARNING", E_USER_WARNING, CONST_PERSISTENT | CONST_CS);
     111       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_USER_NOTICE", E_USER_NOTICE, CONST_PERSISTENT | CONST_CS);
     112       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_USER_DEPRECATED", E_USER_DEPRECATED, CONST_PERSISTENT | CONST_CS);
     113             : 
     114       19341 :         REGISTER_MAIN_LONG_CONSTANT("E_ALL", E_ALL, CONST_PERSISTENT | CONST_CS);
     115             : 
     116       19341 :         REGISTER_MAIN_LONG_CONSTANT("DEBUG_BACKTRACE_PROVIDE_OBJECT", DEBUG_BACKTRACE_PROVIDE_OBJECT, CONST_PERSISTENT | CONST_CS);
     117       19341 :         REGISTER_MAIN_LONG_CONSTANT("DEBUG_BACKTRACE_IGNORE_ARGS", DEBUG_BACKTRACE_IGNORE_ARGS, CONST_PERSISTENT | CONST_CS);
     118             :         /* true/false constants */
     119             :         {
     120             :                 zend_constant c;
     121             :         
     122       19341 :                 c.flags = CONST_PERSISTENT | CONST_CT_SUBST;
     123       19341 :                 c.module_number = 0;
     124             : 
     125       19341 :                 c.name = zend_strndup(ZEND_STRL("TRUE"));
     126       19341 :                 c.name_len = sizeof("TRUE");
     127       19341 :                 c.value.value.lval = 1;
     128       19341 :                 c.value.type = IS_BOOL;
     129       19341 :                 zend_register_constant(&c TSRMLS_CC);
     130             :                 
     131       19341 :                 c.name = zend_strndup(ZEND_STRL("FALSE"));
     132       19341 :                 c.name_len = sizeof("FALSE");
     133       19341 :                 c.value.value.lval = 0;
     134       19341 :                 c.value.type = IS_BOOL;
     135       19341 :                 zend_register_constant(&c TSRMLS_CC);
     136             : 
     137       19341 :                 c.name = zend_strndup(ZEND_STRL("NULL"));
     138       19341 :                 c.name_len = sizeof("NULL");
     139       19341 :                 c.value.type = IS_NULL;
     140       19341 :                 zend_register_constant(&c TSRMLS_CC);
     141             : 
     142       19341 :                 c.flags = CONST_PERSISTENT;
     143             : 
     144       19341 :                 c.name = zend_strndup(ZEND_STRL("ZEND_THREAD_SAFE"));
     145       19341 :                 c.name_len = sizeof("ZEND_THREAD_SAFE");
     146       19341 :                 c.value.value.lval = ZTS_V;
     147       19341 :                 c.value.type = IS_BOOL;
     148       19341 :                 zend_register_constant(&c TSRMLS_CC);
     149             : 
     150       19341 :                 c.name = zend_strndup(ZEND_STRL("ZEND_DEBUG_BUILD"));
     151       19341 :                 c.name_len = sizeof("ZEND_DEBUG_BUILD");
     152       19341 :                 c.value.value.lval = ZEND_DEBUG;
     153       19341 :                 c.value.type = IS_BOOL;
     154       19341 :                 zend_register_constant(&c TSRMLS_CC);
     155             :         }
     156       19341 : }
     157             : 
     158             : 
     159           0 : int zend_shutdown_constants(TSRMLS_D)
     160             : {
     161           0 :         zend_hash_destroy(EG(zend_constants));
     162           0 :         free(EG(zend_constants));
     163           0 :         return SUCCESS;
     164             : }
     165             : 
     166             : 
     167       19362 : void clean_non_persistent_constants(TSRMLS_D)
     168             : {
     169       19362 :         if (EG(full_tables_cleanup)) {
     170           0 :                 zend_hash_apply(EG(zend_constants), (apply_func_t) clean_non_persistent_constant_full TSRMLS_CC);
     171             :         } else {
     172       19362 :                 zend_hash_reverse_apply(EG(zend_constants), (apply_func_t) clean_non_persistent_constant TSRMLS_CC);
     173             :         }
     174       19362 : }
     175             : 
     176             : 
     177    41931561 : ZEND_API void zend_register_long_constant(const char *name, uint name_len, long lval, int flags, int module_number TSRMLS_DC)
     178             : {
     179             :         zend_constant c;
     180             :         
     181    41931561 :         c.value.type = IS_LONG;
     182    41931561 :         c.value.value.lval = lval;
     183    41931561 :         c.flags = flags;
     184    41931561 :         c.name = zend_strndup(name, name_len-1);
     185    41931561 :         c.name_len = name_len;
     186    41931561 :         c.module_number = module_number;
     187    41931561 :         zend_register_constant(&c TSRMLS_CC);
     188    41931561 : }
     189             : 
     190             : 
     191      367479 : ZEND_API void zend_register_double_constant(const char *name, uint name_len, double dval, int flags, int module_number TSRMLS_DC)
     192             : {
     193             :         zend_constant c;
     194             :         
     195      367479 :         c.value.type = IS_DOUBLE;
     196      367479 :         c.value.value.dval = dval;
     197      367479 :         c.flags = flags;
     198      367479 :         c.name = zend_strndup(name, name_len-1);
     199      367479 :         c.name_len = name_len;
     200      367479 :         c.module_number = module_number;
     201      367479 :         zend_register_constant(&c TSRMLS_CC);
     202      367479 : }
     203             : 
     204             : 
     205     1644317 : ZEND_API void zend_register_stringl_constant(const char *name, uint name_len, char *strval, uint strlen, int flags, int module_number TSRMLS_DC)
     206             : {
     207             :         zend_constant c;
     208             :         
     209     1644317 :         c.value.type = IS_STRING;
     210     1644317 :         c.value.value.str.val = strval;
     211     1644317 :         c.value.value.str.len = strlen;
     212     1644317 :         c.flags = flags;
     213     1644317 :         c.name = zend_strndup(name, name_len-1);
     214     1644317 :         c.name_len = name_len;
     215     1644317 :         c.module_number = module_number;
     216     1644317 :         zend_register_constant(&c TSRMLS_CC);
     217     1644317 : }
     218             : 
     219             : 
     220     1276506 : ZEND_API void zend_register_string_constant(const char *name, uint name_len, char *strval, int flags, int module_number TSRMLS_DC)
     221             : {
     222     1276506 :         zend_register_stringl_constant(name, name_len, strval, strlen(strval), flags, module_number TSRMLS_CC);
     223     1276506 : }
     224             : 
     225             : 
     226      295006 : ZEND_API int zend_get_constant(const char *name, uint name_len, zval *result TSRMLS_DC)
     227             : {
     228             :         zend_constant *c;
     229      295006 :         int retval = 1;
     230             :         char *lookup_name;
     231             : 
     232      295006 :         if (zend_hash_find(EG(zend_constants), name, name_len+1, (void **) &c) == FAILURE) {
     233        1124 :                 lookup_name = zend_str_tolower_dup(name, name_len);
     234             : 
     235        1124 :                 if (zend_hash_find(EG(zend_constants), lookup_name, name_len+1, (void **) &c)==SUCCESS) {
     236         329 :                         if (c->flags & CONST_CS) {
     237           0 :                                 retval=0;
     238             :                         }
     239             :                 } else {
     240             :                         static char haltoff[] = "__COMPILER_HALT_OFFSET__";
     241             : 
     242         795 :                         if (!EG(in_execution)) {
     243         522 :                                 retval = 0;
     244         429 :                         } else if (name_len == sizeof("__COMPILER_HALT_OFFSET__")-1 &&
     245          78 :                                   !memcmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1)) {
     246             :                                 char *cfilename, *haltname;
     247             :                                 int len, clen;
     248             : 
     249          78 :                                 cfilename = zend_get_executed_filename(TSRMLS_C);
     250          78 :                                 clen = strlen(cfilename);
     251             :                                 /* check for __COMPILER_HALT_OFFSET__ */
     252          78 :                                 zend_mangle_property_name(&haltname, &len, haltoff,
     253             :                                         sizeof("__COMPILER_HALT_OFFSET__") - 1, cfilename, clen, 0);
     254          78 :                                 if (zend_hash_find(EG(zend_constants), haltname, len+1, (void **) &c) == SUCCESS) {
     255          77 :                                         retval = 1;
     256             :                                 } else {
     257           1 :                                         retval=0;
     258             :                                 }
     259          78 :                                 pefree(haltname, 0);
     260             :                         } else {
     261         195 :                                 retval=0;
     262             :                         }
     263             :                 }
     264        1124 :                 efree(lookup_name);
     265             :         }
     266             : 
     267      295006 :         if (retval) {
     268      294288 :                 *result = c->value;
     269      294288 :                 zval_copy_ctor(result);
     270             :                 Z_SET_REFCOUNT_P(result, 1);
     271             :                 Z_UNSET_ISREF_P(result);
     272             :         }
     273             : 
     274      295006 :         return retval;
     275             : }
     276             : 
     277      294090 : ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result, zend_class_entry *scope, ulong flags TSRMLS_DC)
     278             : {
     279             :         zend_constant *c;
     280      294090 :         int retval = 1;
     281             :         char *colon;
     282      294090 :         zend_class_entry *ce = NULL;
     283             :         char *class_name;
     284             :         zval **ret_constant;
     285             : 
     286             :         /* Skip leading \\ */
     287      294090 :         if (name[0] == '\\') {
     288           8 :                 name += 1;
     289           8 :                 name_len -= 1;
     290             :         }
     291             : 
     292             : 
     293      294278 :         if ((colon = zend_memrchr(name, ':', name_len)) &&
     294         188 :             colon > name && (*(colon - 1) == ':')) {
     295         188 :                 int class_name_len = colon - name - 1;
     296         188 :                 int const_name_len = name_len - class_name_len - 2;
     297         188 :                 char *constant_name = colon + 1;
     298             :                 char *lcname;
     299             : 
     300         188 :                 class_name = estrndup(name, class_name_len);
     301         188 :                 lcname = zend_str_tolower_dup(class_name, class_name_len);
     302         188 :                 if (!scope) {
     303         169 :                         if (EG(in_execution)) {
     304         169 :                                 scope = EG(scope);
     305             :                         } else {
     306           0 :                                 scope = CG(active_class_entry);
     307             :                         }
     308             :                 }
     309             : 
     310         301 :                 if (class_name_len == sizeof("self")-1 &&
     311          58 :                     !memcmp(lcname, "self", sizeof("self")-1)) {
     312          55 :                         if (scope) {
     313          55 :                                 ce = scope;
     314             :                         } else {
     315           0 :                                 zend_error(E_ERROR, "Cannot access self:: when no class scope is active");
     316           0 :                                 retval = 0;
     317             :                         }
     318          55 :                         efree(lcname);
     319         161 :                 } else if (class_name_len == sizeof("parent")-1 &&
     320          21 :                            !memcmp(lcname, "parent", sizeof("parent")-1)) {
     321           7 :                         if (!scope) {
     322           0 :                                 zend_error(E_ERROR, "Cannot access parent:: when no class scope is active");
     323           7 :                         } else if (!scope->parent) {
     324           0 :                                 zend_error(E_ERROR, "Cannot access parent:: when current class scope has no parent");
     325             :                         } else {
     326           7 :                                 ce = scope->parent;
     327             :                         }
     328           7 :                         efree(lcname);
     329         145 :                 } else if (class_name_len == sizeof("static")-1 &&
     330          14 :                            !memcmp(lcname, "static", sizeof("static")-1)) {
     331           5 :                         if (EG(called_scope)) {
     332           5 :                                 ce = EG(called_scope);
     333             :                         } else {
     334           0 :                                 zend_error(E_ERROR, "Cannot access static:: when no class scope is active");
     335             :                         }
     336           5 :                         efree(lcname);
     337             :                 } else {
     338         121 :                         efree(lcname);
     339         121 :                         ce = zend_fetch_class(class_name, class_name_len, flags TSRMLS_CC);
     340             :                 }
     341         360 :                 if (retval && ce) {
     342         179 :                         if (zend_hash_find(&ce->constants_table, constant_name, const_name_len+1, (void **) &ret_constant) != SUCCESS) {
     343           6 :                                 retval = 0;
     344           6 :                                 if ((flags & ZEND_FETCH_CLASS_SILENT) == 0) {
     345           1 :                                         zend_error(E_ERROR, "Undefined class constant '%s::%s'", class_name, constant_name);
     346             :                                 }
     347             :                         }
     348           3 :                 } else if (!ce) {
     349           3 :                         retval = 0;
     350             :                 }
     351         181 :                 efree(class_name);
     352         181 :                 goto finish;
     353             :         }
     354             : 
     355             :         /* non-class constant */
     356      293902 :         if ((colon = zend_memrchr(name, '\\', name_len)) != NULL) {
     357             :                 /* compound constant name */
     358         146 :                 int prefix_len = colon - name;
     359         146 :                 int const_name_len = name_len - prefix_len - 1;
     360         146 :                 char *constant_name = colon + 1;
     361             :                 char *lcname;
     362         146 :                 int found_const = 0;
     363             : 
     364         146 :                 lcname = zend_str_tolower_dup(name, prefix_len);
     365             :                 /* Check for namespace constant */
     366             : 
     367             :                 /* Concatenate lowercase namespace name and constant name */
     368         146 :                 lcname = erealloc(lcname, prefix_len + 1 + const_name_len + 1);
     369         146 :                 lcname[prefix_len] = '\\';
     370         146 :                 memcpy(lcname + prefix_len + 1, constant_name, const_name_len + 1);
     371             : 
     372         146 :                 if (zend_hash_find(EG(zend_constants), lcname, prefix_len + 1 + const_name_len + 1, (void **) &c) == SUCCESS) {
     373          97 :                         found_const = 1;
     374             :                 } else {
     375             :                         /* try lowercase */
     376          49 :                         zend_str_tolower(lcname + prefix_len + 1, const_name_len);
     377          49 :                         if (zend_hash_find(EG(zend_constants), lcname, prefix_len + 1 + const_name_len + 1, (void **) &c) == SUCCESS) {
     378           4 :                                 if ((c->flags & CONST_CS) == 0) {
     379           3 :                                         found_const = 1;
     380             :                                 }
     381             :                         }
     382             :                 }
     383         146 :                 efree(lcname);
     384         146 :                 if(found_const) {
     385         100 :                         *result = c->value;
     386         100 :                         zval_update_constant_ex(&result, (void*)1, NULL TSRMLS_CC);
     387         100 :                         zval_copy_ctor(result);
     388         100 :                         Z_SET_REFCOUNT_P(result, 1);
     389         100 :                         Z_UNSET_ISREF_P(result);
     390         100 :                         return 1;
     391             :                 }
     392             :                 /* name requires runtime resolution, need to check non-namespaced name */
     393          46 :                 if ((flags & IS_CONSTANT_UNQUALIFIED) != 0) {
     394          35 :                         name = constant_name;
     395          35 :                         name_len = const_name_len;
     396          35 :                         return zend_get_constant(name, name_len, result TSRMLS_CC);
     397             :                 }
     398          11 :                 retval = 0;
     399             : finish:
     400         192 :                 if (retval) {
     401         173 :                         zval_update_constant_ex(ret_constant, (void*)1, ce TSRMLS_CC);
     402         171 :                         *result = **ret_constant;
     403         171 :                         zval_copy_ctor(result);
     404         171 :                         INIT_PZVAL(result);
     405             :                 }
     406             : 
     407         190 :                 return retval;
     408             :         }
     409             : 
     410      293756 :         return zend_get_constant(name, name_len, result TSRMLS_CC);
     411             : }
     412             : 
     413    44099959 : ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
     414             : {
     415    44099959 :         char *lowercase_name = NULL;
     416             :         char *name;
     417    44099959 :         int ret = SUCCESS;
     418             : 
     419             : #if 0
     420             :         printf("Registering constant for module %d\n", c->module_number);
     421             : #endif
     422             : 
     423    44099959 :         if (!(c->flags & CONST_CS)) {
     424             :                 /* keep in mind that c->name_len already contains the '\0' */
     425     2166650 :                 lowercase_name = estrndup(c->name, c->name_len-1);
     426     2166650 :                 zend_str_tolower(lowercase_name, c->name_len-1);
     427     2166650 :                 name = lowercase_name;
     428             :         } else {
     429    41933309 :                 char *slash = strrchr(c->name, '\\');
     430    41933309 :                 if(slash) {
     431          29 :                         lowercase_name = estrndup(c->name, c->name_len-1);
     432          29 :                         zend_str_tolower(lowercase_name, slash-c->name);
     433          29 :                         name = lowercase_name;
     434             :                 } else {
     435    41933280 :                         name = c->name;
     436             :                 }
     437             :         }
     438             : 
     439             :         /* Check if the user is trying to define the internal pseudo constant name __COMPILER_HALT_OFFSET__ */
     440    89360378 :         if ((c->name_len == sizeof("__COMPILER_HALT_OFFSET__")
     441    45260422 :                 && !memcmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1))
     442    44099956 :                 || zend_hash_add(EG(zend_constants), name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
     443             :                 
     444             :                 /* The internal __COMPILER_HALT_OFFSET__ is prefixed by NULL byte */
     445           8 :                 if (c->name[0] == '\0' && c->name_len > sizeof("\0__COMPILER_HALT_OFFSET__")
     446           0 :                         && memcmp(name, "\0__COMPILER_HALT_OFFSET__", sizeof("\0__COMPILER_HALT_OFFSET__")) == 0) {
     447           0 :                         name++;
     448             :                 }
     449           8 :                 zend_error(E_NOTICE,"Constant %s already defined", name);
     450           8 :                 free(c->name);
     451           8 :                 if (!(c->flags & CONST_PERSISTENT)) {
     452           8 :                         zval_dtor(&c->value);
     453             :                 }
     454           8 :                 ret = FAILURE;
     455             :         }
     456    44099959 :         if (lowercase_name) {
     457     2166679 :                 efree(lowercase_name);
     458             :         }
     459    44099959 :         return ret;
     460             : }
     461             : 
     462             : 
     463             : /*
     464             :  * Local variables:
     465             :  * tab-width: 4
     466             :  * c-basic-offset: 4
     467             :  * indent-tabs-mode: t
     468             :  * End:
     469             :  */

Generated by: LCOV version 1.10

Generated at Sun, 27 Jul 2014 12:58:24 +0000 (2 days ago)

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