--- /dev/null
+--TEST--
+Testing declare statement with several type values
+--FILE--
+<?php
+
+declare(encoding = 1);
+declare(encoding = 1123131232131312321);
+declare(encoding = NULL);
+declare(encoding = M_PI);
+declare(encoding = 'utf-8');
+
+print 'DONE';
+
+?>
+--EXPECT--
+DONE
zend_multibyte_yyinput_again(old_input_filter, old_encoding TSRMLS_CC);
}
}
+ efree(val->u.constant.value.str.val);
#else /* !ZEND_MULTIBYTE */
} else if (!zend_binary_strcasecmp(var->u.constant.value.str.val, var->u.constant.value.str.len, "encoding", sizeof("encoding")-1)) {
/* Do not generate any kind of warning for encoding declares */
/* zend_error(E_COMPILE_WARNING, "Declare encoding [%s] not supported", val->u.constant.value.str.val); */
+ zval_dtor(&val->u.constant);
#endif /* ZEND_MULTIBYTE */
- efree(val->u.constant.value.str.val);
} else {
zend_error(E_COMPILE_WARNING, "Unsupported declare '%s'", var->u.constant.value.str.val);
zval_dtor(&val->u.constant);